Commit b0a8fdd1 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Kustomize

parent 739a45a0
apiVersion: v1
kind: ConfigMap
metadata:
name: ws-logstodb-map
data:
database_uri: postgresql://baseuri
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
app: ws-logstodb
environment: default
resources:
- ws-logstodb.yaml
- configMap.yaml
...@@ -3,7 +3,6 @@ kind: Deployment ...@@ -3,7 +3,6 @@ kind: Deployment
metadata: metadata:
labels: labels:
app: ws-logstodb app: ws-logstodb
environment: preprod
name: ws-logstodb-deployment name: ws-logstodb-deployment
spec: spec:
replicas: 1 replicas: 1
...@@ -17,13 +16,16 @@ spec: ...@@ -17,13 +16,16 @@ spec:
spec: spec:
containers: containers:
- name: ws-logstodb - name: ws-logstodb
image: gricad-registry.univ-grenoble-alpes.fr/osug/resif/ws-logstodb/ws-logstodb:fc496249 image: ws-logstodb-image-to-kustomize
ports: ports:
- containerPort: 8000 - containerPort: 8000
protocol: TCP protocol: TCP
env: env:
- name: DATABASE_URI - name: DATABASE_URI
value: postgresql://resifstats@resif-pgpreprod.u-ga.fr:5432/resifstats valueFrom:
configMapKeyRef:
name: ws-logstodb-map
key: database_uri
- name: PGPASSWORD - name: PGPASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
...@@ -36,7 +38,6 @@ metadata: ...@@ -36,7 +38,6 @@ metadata:
labels: labels:
app: ws-logstodb app: ws-logstodb
name: ws-logstodb-service name: ws-logstodb-service
namespace: default
spec: spec:
ports: ports:
- nodePort: 30004 - nodePort: 30004
......
nameSuffix: -preprod
commonLabels:
environment: preprod
bases:
- ../../base
images:
- name: ws-logstodb-image-to-kustomize
newName: gricad-registry.univ-grenoble-alpes.fr/osug/resif/ws-logstodb/ws-logstodb
newTag: fc496249
patches:
- ws-logstodb.yaml
- map.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: ws-logstodb-map
data:
database_uri: postgresql://resifstats@resif-pgpreprod.u-ga.fr:5432/resifstats
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ws-logstodb-deployment
spec:
template:
spec:
containers:
- name: ws-logstodb
env:
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: ws-logstodb-secrets-preprod
Markdown is supported
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