Skip to content

Commit

Permalink
wip: add mockup station adgs
Browse files Browse the repository at this point in the history
  • Loading branch information
nleconte-csgroup committed Feb 15, 2024
1 parent 7d661de commit d53df0b
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 9 deletions.
23 changes: 23 additions & 0 deletions charts/mockup-station-adgs/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
7 changes: 7 additions & 0 deletions charts/mockup-station-adgs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
appVersion: {{CHART_VERSION}}
description: MOCKUP STATION ADGS
name: mockup-station-adgs
version: {{CHART_VERSION}}
maintainers:
- name: CS GROUP
4 changes: 4 additions & 0 deletions charts/mockup-station-adgs/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ .Chart.Name }}
======

This is a chart for the installation of {{ .Release.Name }} in version {{ .Chart.Version}}
12 changes: 12 additions & 0 deletions charts/mockup-station-adgs/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-service-config
namespace: {{ .Values.namespace }}

data:
{{ .Values.app.authConfigFile }}: |-
{
"test": "$2b$12$MfKwr.11KN7OjCqLLwh/yuLhXasqSzTTdsz71YlnoeZdqlELqlyQi",
"ovidiu": "$2b$12$KNiiNLAIbJDj/ftcVidt1.mVxSn4rttIByudz9GAx5IqPEsWg38jW"
}
72 changes: 72 additions & 0 deletions charts/mockup-station-adgs/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}
namespace: {{ .Values.namespace }}
generation: 1
labels:
app: {{ .Release.Name }}
annotations:
deployment.kubernetes.io/revision: '1'
spec:
selector:
matchLabels:
app: {{ .Release.Name }}
replicas: {{ .Values.replicaCount }}
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 100%
maxUnavailable: 50%
template:
metadata:
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}
type: {{ .Values.namespace }}
spec:
terminationGracePeriodSeconds: 30
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image.registry }}/{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.PullPolicy }}
resources:
requests:
memory: {{ .Values.resources.request.ram }}
cpu: {{ .Values.resources.request.cpu }}
limits:
memory: {{ .Values.resources.limit.ram }}
cpu: {{ .Values.resources.limit.cpu }}
volumeMounts:
- name: service-config-volume
mountPath: {{ .Values.app.confDir }}/{{ .Values.app.authConfigFile }}
subPath: {{ .Values.app.authConfigFile }}
ports:
- name: web
protocol: TCP
containerPort: {{ .Values.app.port }}
securityContext:
privileged: false
#livenessProbe:
#httpGet:
#path: {{ .Values.probe.liveness.path }}
#port: {{ .Values.probe.liveness.port }}
#initialDelaySeconds: {{ .Values.probe.liveness.initialDelaySeconds }}
#periodSeconds: {{ .Values.probe.liveness.periodSeconds }}
#timeoutSeconds: {{ .Values.probe.liveness.timeoutSeconds }}
#readinessProbe:
#httpGet:
#path: {{ .Values.probe.readiness.path }}
#port: {{ .Values.probe.readiness.port }}
#initialDelaySeconds: {{ .Values.probe.readiness.initialDelaySeconds }}
#periodSeconds: {{ .Values.probe.readiness.periodSeconds }}
#timeoutSeconds: {{ .Values.probe.readiness.timeoutSeconds }}
#imagePullSecrets:
#- name: {{ .Values.image.imagePullSecrets }}
restartPolicy: Always
securityContext: {}
volumes:
- name: service-config-volume
configMap:
name: {{ .Release.Name }}-service-config
revisionHistoryLimit: 10
14 changes: 14 additions & 0 deletions charts/mockup-station-adgs/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: Service
apiVersion: v1
metadata:
name: {{ .Release.Name }}-svc
labels:
app: {{ .Release.Name }}-svc
spec:
selector:
app: {{ .Release.Name }}
ports:
- name: {{ .Release.Name }}-service
protocol: TCP
port: {{ .Values.service.port }}
targetPort: {{ .Values.app.port }}
42 changes: 42 additions & 0 deletions charts/mockup-station-adgs/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
namespace: processing

replicaCount: 1

service:
port: 8080

app:
port: 5000
workDir: /app
confDir: /opt/adgs/config
authConfigFile: auth.json

probe:
liveness:
path: /app/ping
port: 8080
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
readiness:
path: /app/ping
port: 8080
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5

image:
registry: ghcr.io
repository: rs-python
name: rs-testmeans_adgs-station-mock
tag: latest
PullPolicy: Always
#imagePullSecrets: regcred

resources:
request:
ram: "256Mi"
cpu: "100m"
limit:
ram: "1000Mi"
cpu: "500m"
3 changes: 2 additions & 1 deletion charts/mockup-station-cadip/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ spec:
cpu: {{ .Values.resources.limit.cpu }}
volumeMounts:
- name: service-config-volume
mountPath: {{ .Values.app.confDir }}
mountPath: {{ .Values.app.confDir }}/{{ .Values.app.authConfigFile }}
subPath: {{ .Values.app.authConfigFile }}
ports:
- name: web
protocol: TCP
Expand Down
10 changes: 2 additions & 8 deletions charts/mockup-station-cadip/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ service:
app:
port: 5000
workDir: /app
confDir: /opt/adgs/config
confDir: /opt/cadip/config
authConfigFile: auth.json
station:
endpoint:
url: http://127.0.0.1:5000/Files
secret:
username: test
password: test

probe:
liveness:
Expand All @@ -34,7 +28,7 @@ probe:
image:
registry: ghcr.io
repository: rs-python
name: rs-testmeans_adgs-station-mock
name: rs-testmeans_cadip-station-mock
tag: latest
PullPolicy: Always
#imagePullSecrets: regcred
Expand Down

0 comments on commit d53df0b

Please sign in to comment.