Commit b0a1ca9d authored by Nane Kratzke's avatar Nane Kratzke
Browse files

Aktualisieren deploy/dev/prime-dev-deployment.yaml,...

Aktualisieren deploy/dev/prime-dev-deployment.yaml, deploy/prod/prime-deployment.yaml, deploy/prod/prime-service.yaml, deploy/dev/prime-dev-service.yaml, deploy/dev/prime-dev-ingress.yaml, .gitlab-ci.yml, deploy/prod/prime-ingress.yaml Dateien
Gelöscht deploy/overlays/dev/kustomization.yaml, deploy/base/kustomization.yaml, deploy/overlays/prod/kustomization.yaml, deploy/overlays/prod/prime-ingress.yaml Dateien
parent 75547718
......@@ -24,7 +24,9 @@ prime-container:
- docker push $CI_REGISTRY_IMAGE/prime-$BRANCH:$VERSION
- docker push $CI_REGISTRY_IMAGE/prime-$BRANCH:latest
prime:
prime-dev:
only:
- dev
stage: deploy
image:
name: $KUBECTL
......@@ -37,6 +39,25 @@ prime:
--docker-username=image-registry \
--docker-password=$CI_REGISTRY_TOKEN \
-n $NAMESPACE"
- kubectl apply -k deploy/overlays/dev -n $NAMESPACE
- kubectl delete -f deploy/dev -n $NAMESPACE
- kubectl apply -f deploy/dev -n $NAMESPACE
prime-prod:
only:
- master
stage: deploy
image:
name: $KUBECTL
entrypoint: [""]
script:
- echo "Deploying to Kubernetes"
- kubectl delete secret gitlab-registry-credentials -n $NAMESPACE || true
- "kubectl create secret docker-registry gitlab-registry-credentials \
--docker-server=$CI_REGISTRY \
--docker-username=image-registry \
--docker-password=$CI_REGISTRY_TOKEN \
-n $NAMESPACE"
- kubectl apply -f deploy/prod -n $NAMESPACE
resources:
- prime-deployment.yaml
- prime-service.yaml
- prime-ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: prime-ingress
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-staging"
spec:
rules:
- host: "put.your.url.here"
http:
paths:
- backend:
serviceName: prime-service
servicePort: 80
tls:
- secretName: prime-ingress-cert
hosts: ["put.your.url.here"]
apiVersion: v1
kind: Service
metadata:
name: prime-dev-service
labels:
branch: dev
spec:
selector:
app: prime
branch: dev
ports:
- protocol: TCP
port: 80
targetPort: 80
resources:
- prime-deployment.yaml
- prime-ingress.yaml
......@@ -2,8 +2,10 @@ apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: prime-ingress
labels:
branch: master
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-production"
cert-manager.io/cluster-issuer: "letsencrypt-staging"
spec:
rules:
- host: "prime.loki.th-luebeck.dev"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment