Commit 5987edbe authored by Nane Kratzke's avatar Nane Kratzke
Browse files

Aktualisieren .gitlab-ci.yml, deploy/prime-deployment.yaml Dateien

parent 40d4d5f7
......@@ -26,4 +26,19 @@ container:
- docker push $CI_REGISTRY_IMAGE:$VERSION
- docker push $CI_REGISTRY_IMAGE:latest
codelab:
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=$REGISTRY_READ_USER \
--docker-password=$REGISTRY_READ_TOKEN \
-n $NAMESPACE"
- kubectl apply -f deploy/ -n $NAMESPACE
apiVersion: apps/v1
kind: Deployment
metadata:
name: prime-deployment
labels:
app: prime
spec:
replicas: 1
selector:
matchLabels:
app: prime
template:
metadata:
labels:
app: prime
spec:
imagePullSecrets:
- name: gitlab-registry-credentials
containers:
- name: codepad
image: git.mylab.th-luebeck.de:4181/cloud-native/lab-k8s
ports:
- containerPort: 80
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