Skip to content
Snippets Groups Projects
Commit a313f297 authored by ludo8147's avatar ludo8147
Browse files

corrected secret

parent 281b963a
No related branches found
No related tags found
No related merge requests found
Pipeline #68950 passed
......@@ -156,7 +156,7 @@ deploy_to_staging:
kubectl wait --for=condition=Available --timeout=300s deployment/cert-manager-webhook -n cert-manager
echo "Validating and applying Kubernetes manifests..."
for file in deployment.yaml service.yaml secret-staging.yaml secret-production.yaml ingress.yaml redis.yaml redis-configmap.yaml prometheus.yaml network-policy.yaml redis-pv-pvc.yaml cluster-issuer.yaml; do
for file in deployment.yaml service.yaml ingress.yaml redis.yaml redis-configmap.yaml prometheus.yaml network-policy.yaml redis-pv-pvc.yaml cluster-issuer.yaml; do
echo "Applying $file"
envsubst < $file | kubectl apply -f -
done
......@@ -194,7 +194,7 @@ deploy_to_production:
kubectl wait --for=condition=Available --timeout=300s deployment/cert-manager-webhook -n cert-manager
echo "Validating and applying Kubernetes manifests..."
for file in deployment.yaml service.yaml secret-staging.yaml secret-production.yaml ingress.yaml redis.yaml redis-configmap.yaml prometheus.yaml network-policy.yaml redis-pv-pvc.yaml cluster-issuer.yaml; do
for file in deployment.yaml service.yaml ingress.yaml redis.yaml redis-configmap.yaml prometheus.yaml network-policy.yaml redis-pv-pvc.yaml cluster-issuer.yaml; do
echo "Applying $file"
envsubst < $file | kubectl apply -f -
done
......
......@@ -40,7 +40,10 @@ spec:
name: webservice-config
key: DB_PORT
- name: DB_PASSWORD
value: /etc/secrets/db-password
valueFrom:
secretKeyRef:
name: webservice-secrets
key: db-password
- name: ENV_NAME
valueFrom:
configMapKeyRef:
......@@ -48,11 +51,11 @@ spec:
key: ENV_NAME
resources:
requests:
cpu: 200m
memory: 256Mi
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: 500m
memory: 512Mi
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
livenessProbe:
httpGet:
path: /health
......@@ -68,15 +71,6 @@ spec:
volumeMounts:
- name: tmp
mountPath: /tmp
- name: db-password
mountPath: /etc/secrets
readOnly: true
volumes:
- name: tmp
emptyDir: {}
- name: db-password
secret:
secretName: webservice-secrets
items:
- key: DB_PASSWORD
path: db-password
\ No newline at end of file
emptyDir: {}
\ No newline at end of file
......@@ -5,4 +5,4 @@ metadata:
namespace: production
type: Opaque
stringData:
DB_PASSWORD: ${PRODUCTION_DB_PASSWORD}
\ No newline at end of file
db-password: ${PRODUCTION_DB_PASSWORD}
\ No newline at end of file
......@@ -5,4 +5,4 @@ metadata:
namespace: staging
type: Opaque
stringData:
DB_PASSWORD: ${STAGING_DB_PASSWORD}
\ No newline at end of file
db-password: ${STAGING_DB_PASSWORD}
\ No newline at end of file
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