Skip to content

Commit

Permalink
Change deploymentconfigs
Browse files Browse the repository at this point in the history
Deploymentconfigs are deprecated and cause some issues when deploying
the pattern.
There is a workaround that is needed for the db password to not contain
special characters due to some bug in the python container.
  • Loading branch information
darkdoc committed Jan 15, 2025
1 parent b899fb4 commit 5adc0de
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 194 deletions.
7 changes: 4 additions & 3 deletions charts/all/kafdrop/templates/kafdrop.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.kafka.app }}
namespace: {{ .Values.global.xraylab.namespace }}
spec:
selector:
app: {{ .Values.kafka.app }}
matchLabels:
app: {{ .Values.kafka.app }}
replicas: {{ .Values.kafka.deployment.replicas }}
template:
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ spec:
storageClassName: {{ .Values.global.datacenter.storageClassName }}
volumeMode: Filesystem
---
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Values.database.name }}
namespace: "{{ .Values.global.xraylab.namespace }}"
Expand All @@ -30,17 +30,11 @@ metadata:
spec:
strategy:
type: Recreate
recreateParams:
timeoutSeconds: 600
resources: {}
activeDeadlineSeconds: 21600
triggers:
- type: ConfigChange
replicas: 1
revisionHistoryLimit: 3
test: false
selector:
app: {{ .Values.database.name }}
matchLabels:
app: {{ .Values.database.name }}
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
argocd.argoproj.io/compare-options: IgnoreExtraneous
argocd.argoproj.io/sync-wave: '5'
name: image-generator
namespace: {{ .Values.global.xraylab.namespace }}
spec:
replicas: 0
revisionHistoryLimit: 3
selector:
matchLabels:
app: image-generator
template:
metadata:
labels:
app: image-generator
spec:
containers:
- env:
- name: SECONDS_WAIT
value: '10'
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
key: AWS_ACCESS_KEY_ID
name: s3-secret-bck
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
key: AWS_SECRET_ACCESS_KEY
name: s3-secret-bck
- name: SERVICE_POINT
valueFrom:
configMapKeyRef:
key: url
name: service-point
- name: DATABASE_USER
valueFrom:
secretKeyRef:
key: database-user
name: db-secret
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: db-secret
- name: DATABASE_HOST
valueFrom:
secretKeyRef:
key: database-host
name: db-secret
- name: DATABASE_DB
valueFrom:
secretKeyRef:
key: database-db
name: db-secret
- name: BUCKET_BASE_NAME
valueFrom:
configMapKeyRef:
key: bucket-base-name
name: buckets-config
- name: BUCKET_SOURCE
valueFrom:
configMapKeyRef:
key: bucket-source
name: buckets-config
image: image-generator:latest
imagePullPolicy: IfNotPresent
name: image-generator
resources:
limits:
cpu: '2'
memory: 1G
requests:
cpu: 400m
memory: 100M
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
argocd.argoproj.io/compare-options: IgnoreExtraneous
argocd.argoproj.io/sync-wave: '10'
name: image-server
namespace: '{{ .Values.global.xraylab.namespace }}'
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: image-server
template:
metadata:
labels:
app: image-server
spec:
containers:
- env:
- name: database-user
valueFrom:
secretKeyRef:
key: database-user
name: db-secret
- name: database-password
valueFrom:
secretKeyRef:
key: database-password
name: db-secret
- name: database-host
valueFrom:
secretKeyRef:
key: database-host
name: db-secret
- name: database-db
valueFrom:
secretKeyRef:
key: database-db
name: db-secret
- name: service_point
valueFrom:
configMapKeyRef:
key: url-external
name: service-point
- name: bucket-base-name
valueFrom:
configMapKeyRef:
key: bucket-base-name
name: buckets-config
image: image-server:latest
imagePullPolicy: IfNotPresent
name: image-server
ports:
- containerPort: 5000
protocol: TCP
resources:
limits:
cpu: '2'
memory: 1G
requests:
cpu: 400m
memory: 100M
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30

Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
port: 80
targetPort: 5000
selector:
name: image-server
app: image-server
Loading

0 comments on commit 5adc0de

Please sign in to comment.