Skip to content

Commit

Permalink
Merge pull request #72 from chaen/splitImage
Browse files Browse the repository at this point in the history
Have a global image section
  • Loading branch information
chaen authored Nov 28, 2023
2 parents c91d5c2 + 16fe2a3 commit e479ca1
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,17 @@ TODO
| diracx.settings.DIRACX_CONFIG_BACKEND_URL | string | `"git+file:///cs_store/initialRepo"` | |
| diracx.settings.DIRACX_SERVICE_AUTH_ALLOWED_REDIRECTS | string | `"[\"http://anything:8000/docs/oauth2-redirect\"]"` | |
| diracx.settings.DIRACX_SERVICE_AUTH_TOKEN_KEY | string | `"file:///signing-key/rsa256.key"` | |
| diracxWeb.image.repository | string | `"ghcr.io/diracgrid/diracx-web/static"` | |
| diracxWeb.image.tag | string | `"latest"` | |
| diracxWeb.service.port | int | `8080` | |
| diracxWeb.service.type | string | `"ClusterIP"` | |
| fullnameOverride | string | `""` | |
| global.activeDeadlineSeconds | int | `900` | |
| global.batchJobTTL | int | `600` | |
| global.imagePullPolicy | string | `"Always"` | |
| image.repository | string | `"ghcr.io/diracgrid/diracx/server"` | |
| image.tag | string | `"latest"` | |
| global.images.client | string | `"ghcr.io/diracgrid/diracx/client"` | |
| global.images.services | string | `"ghcr.io/diracgrid/diracx/services"` | |
| global.images.tag | string | `"dev"` | |
| global.images.web.repository | string | `"ghcr.io/diracgrid/diracx-web/static"` | |
| global.images.web.tag | string | `"latest"` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `"nginx"` | |
| ingress.enabled | bool | `true` | |
Expand Down
4 changes: 2 additions & 2 deletions diracx/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
initContainers:
{{- if .Values.diracx.manageOSIndices }}
- name: create-os-db-indices
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.global.images.services }}:{{ .Values.global.images.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command: ["bash", "/entrypoint.sh"]
args: ["python", "-m", "diracx.db", "init-os"]
Expand All @@ -101,7 +101,7 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.global.images.services }}:{{ .Values.global.images.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
ports:
- name: http
Expand Down
2 changes: 1 addition & 1 deletion diracx/templates/init-cs/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
restartPolicy: Never
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.global.images.client }}:{{ .Values.global.images.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command: ["/bin/bash", "/entrypoint.sh"]
args: ["/bin/bash", "/scripts/init-cs"]
Expand Down
2 changes: 1 addition & 1 deletion diracx/templates/init-sql/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
restartPolicy: Never
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.global.images.services }}:{{ .Values.global.images.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command: ["/bin/bash", "/entrypoint.sh"]
args: ["/bin/bash", "/scripts/init-sql"]
Expand Down
2 changes: 1 addition & 1 deletion diracx/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
{{- if $nodeDevInstall }}
image: {{ .Values.developer.nodeImage }}
{{- else }}
image: {{ .Values.diracxWeb.image.repository }}:{{ .Values.diracxWeb.image.tag }}
image: {{ .Values.global.images.web.repository }}:{{ .Values.global.images.web.tag }}
{{- end }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
ports:
Expand Down
16 changes: 9 additions & 7 deletions diracx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ global:
imagePullPolicy: Always
# timeout for job deadlines
activeDeadlineSeconds: 900
images:
tag: "dev"
services: ghcr.io/diracgrid/diracx/services
client: ghcr.io/diracgrid/diracx/client
web:
tag: "latest"
repository: ghcr.io/diracgrid/diracx-web/static

replicaCount: 1

image:
repository: ghcr.io/diracgrid/diracx/server
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

# Created with
# kubectl create secret generic regcred \
Expand Down Expand Up @@ -58,6 +61,7 @@ securityContext: {}
#################

init-cs:

# Automatically initialize the repository in the CS volume
enabled: true
# Users which should be automatically added to the CS
Expand Down Expand Up @@ -103,6 +107,7 @@ developer:
ipAlias: null

diracx:

# Required: The hostname where the webapp/API is running
# hostname:
# Settings to inject into the API container via environment variables
Expand Down Expand Up @@ -138,9 +143,6 @@ ingress:
annotations: {}

diracxWeb:
image:
repository: ghcr.io/diracgrid/diracx-web/static
tag: latest
service:
type: ClusterIP
port: 8080
Expand Down

0 comments on commit e479ca1

Please sign in to comment.