From 4e2f8420e1a098faff0a7faf1d1e2fe427f3e0e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Tue, 30 Aug 2022 16:59:05 +0200 Subject: [PATCH] initial commit --- simple-app.yaml | 20 +++++++++++++++++++ simple-app/deployment.yaml | 37 +++++++++++++++++++++++++++++++++++ simple-app/kustomization.yaml | 4 ++++ simple-app/route.yaml | 15 ++++++++++++++ simple-app/service.yaml | 18 +++++++++++++++++ 5 files changed, 94 insertions(+) create mode 100644 simple-app.yaml create mode 100644 simple-app/deployment.yaml create mode 100644 simple-app/kustomization.yaml create mode 100644 simple-app/route.yaml create mode 100644 simple-app/service.yaml diff --git a/simple-app.yaml b/simple-app.yaml new file mode 100644 index 0000000..24e2c0d --- /dev/null +++ b/simple-app.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: tekton +spec: + destination: + name: '' + namespace: simple-app + server: 'https://kubernetes.default.svc' + source: + path: simple-app + repoURL: 'https://github.com/nmasse-itix/ArgoCD-Examples.git' + targetRevision: HEAD + project: default + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + prune: true + selfHeal: false diff --git a/simple-app/deployment.yaml b/simple-app/deployment.yaml new file mode 100644 index 0000000..3b398cc --- /dev/null +++ b/simple-app/deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx +spec: + replicas: 1 + selector: + matchLabels: + name: nginx + template: + metadata: + labels: + name: nginx + spec: + containers: + - name: nginx + image: docker.io/nginxinc/nginx-unprivileged:1.23-alpine + ports: + - containerPort: 8080 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 8080 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 15 + successThreshold: 1 + timeoutSeconds: 5 + securityContext: + capabilities: + drop: [ALL] + readOnlyRootFilesystem: false + runAsNonRoot: true + allowPrivilegeEscalation: false + terminationGracePeriodSeconds: 30 + diff --git a/simple-app/kustomization.yaml b/simple-app/kustomization.yaml new file mode 100644 index 0000000..e756ba5 --- /dev/null +++ b/simple-app/kustomization.yaml @@ -0,0 +1,4 @@ +resources: +- deployment.yaml +- service.yaml +- route.yaml diff --git a/simple-app/route.yaml b/simple-app/route.yaml new file mode 100644 index 0000000..a1b6a06 --- /dev/null +++ b/simple-app/route.yaml @@ -0,0 +1,15 @@ +kind: Route +apiVersion: route.openshift.io/v1 +metadata: + name: nginx +spec: + to: + kind: Service + name: nginx + weight: 100 + port: + targetPort: 8080 + tls: + termination: edge + insecureEdgeTerminationPolicy: Redirect + wildcardPolicy: None diff --git a/simple-app/service.yaml b/simple-app/service.yaml new file mode 100644 index 0000000..c49857e --- /dev/null +++ b/simple-app/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: nginx +spec: + type: ClusterIP + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: nginx + sessionAffinity: None +