Skip to content
Snippets Groups Projects
Unverified Commit 67ffc8cd authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'deployment' of https://edugit.org/Teckids/team-pr/teckids.org into deployment

parents bb7c4e36 a0236478
No related branches found
No related tags found
1 merge request!50Add k8s deployment
Pipeline #179575 passed
......@@ -83,6 +83,7 @@ deploy review:
script:
- cd deploy/overlays/review
- kustomize edit set image registry.edugit.org/teckids/team-pr/teckids.org:$CI_COMMIT_REF_NAME@$(cat ../../../DIGESTFILE)
- kustomize edit set nameprefix $CI_COMMIT_REF_SLUG
- kustomize build | sed s/__REVIEW_NAME__/$CI_COMMIT_REF_SLUG/g > output.yaml
- kubectl --kubeconfig=/tmp/kubeconfig apply -f output.yaml
......@@ -95,7 +96,7 @@ delete review:
before_script:
- echo $KUBECONFIG | base64 -d > /tmp/kubeconfig
- cd deploy/overlays/review
- kustomize build | envsubst > output.yaml
- kustomize build | sed s/__REVIEW_NAME__/$CI_COMMIT_REF_SLUG/g > output.yaml
script:
- kubectl --kubeconfig=/tmp/kubeconfig delete -f output.yaml
when: manual
......
......@@ -19,22 +19,19 @@ spec:
- name: caddy
image: registry.edugit.org/teckids/team-pr/teckids.org:IMAGE_TAG
ports:
- containerPort: 80
livenessProbe:
httpGet:
scheme: HTTP
port: http
path: /
timeoutSeconds: 10
initialDelaySeconds: 60
name: adressbuch
ports:
- containerPort: 80
name: http
readinessProbe:
httpGet:
scheme: HTTP
port: http
path: /
timeoutSeconds: 10
initialDelaySeconds: 120
- containerPort: 80
name: http
livenessProbe:
httpGet:
scheme: HTTP
port: http
path: /
timeoutSeconds: 10
initialDelaySeconds: 60
readinessProbe:
httpGet:
scheme: HTTP
port: http
path: /
timeoutSeconds: 10
initialDelaySeconds: 120
......@@ -2,9 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonAnnotations:
source-repository: https://edugit.org/Teckids/team-pr/teckids.org
commonLabels:
app: teckids-website
resources:
- deployment.yaml
- service.yaml
- ingress.yaml
- deployment.yaml
- service.yaml
- ingress.yaml
labels:
- includeSelectors: true
pairs:
app: teckids-website
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
commonAnnotations:
source-repository: https://edugit.org/Teckids/team-pr/teckids.org
commonLabels:
app: teckids-website
environment: production
namespace: teckids-website
patches:
- target:
kind: Ingress
name: teckids-website-caddy
patch: |-
- patch: |-
- op: replace
path: /spec/rules/0/host
value: teckids.org
- op: replace
path: /spec/tls/0/hosts/0
value: teckids.org
target:
kind: Ingress
name: teckids-website-caddy
resources:
- ../../base
labels:
- includeSelectors: true
pairs:
app: teckids-website
environment: production
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
commonAnnotations:
source-repository: https://edugit.org/Teckids/team-pr/teckids.org
commonLabels:
app: teckids-website
environment: __REVIEW_NAME__
namespace: teckids-website
patches:
- target:
kind: Ingress
name: teckids-website-caddy
patch: |-
- patch: |-
- op: replace
path: /spec/rules/0/host
value: __REVIEW_NAME__.review.teckids.org
......@@ -22,3 +14,13 @@ patches:
- op: replace
path: /spec/tls/0/secretName
value: __REVIEW_NAME__-website-tls
target:
kind: Ingress
name: teckids-website-caddy
resources:
- ../../base
labels:
- includeSelectors: true
pairs:
app: teckids-website
environment: __REVIEW_NAME__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment