Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up non-core helm charts handles global image config #3229

Closed
8 tasks done
t83714 opened this issue Oct 1, 2021 · 1 comment
Closed
8 tasks done

Tidy up non-core helm charts handles global image config #3229

t83714 opened this issue Oct 1, 2021 · 1 comment
Assignees

Comments

@t83714
Copy link
Contributor

t83714 commented Oct 1, 2021

Tidy up non-core helm charts handles global image config

We have the following image config:

  • .Values.defaultImage: individual chart's default image config.
    • repository is set to docker.io/data61
    • tag is set to .Chart.Version
    • pullPolicy is set to IfNotPresent
    • imagePullSecret is set to false
  • .Values.image: individual chart's own image runtime config.
  • .Values.global.image: for overriding image config of all sub charts.
    • It's priority is lower than the 3 below
  • .Values.global.connectors.image: for overriding image config of all connectors charts
  • .Values.global.minions.image: for overriding image config of all minions charts
  • .Values.global.urlProcessors.image: for overriding image config of all urlProcessors charts

Each of the image config can have the following fields:

  • repository: e.g. docker.io/data61
  • tag: Sub module version e.g. 0.0.57-0
    • tag field is not available to all types of image config. And only available to (and will be used for) the followings:
      • .Values.image
      • .Values.global.image
      • And when there is no other image config available, .Chart.Version will be used as default value.
  • pullPolicy: image pull policy e.g.IfNotPresent
  • imagePullSecret: can be either:
    • a list of pull secret names
    • or a string that is one pull secret name
    • or boolean false which presents no pull secret is set / provided.

To avoid confusion and make it more consistent across all Magda core charts & plugins, we will make the following changes.

  • For backward compatibility reason, imagePullSecret will still be supported. But we will auto check the following fields:
    • pullSecret
    • pullSecrets
    • imagePullSecrets
    • We still can passing either string, list of string or boolean false type as before.
  • When set, .Values.image always has top priority. i.e. if it's set, its value will be the final value.
  • When .Values.image is not set:
    • If no any other image config (e.g. .Values.global.image, .Values.global.connectors.image etc.) has been set, the chart's default image config (.Values.defaultImage) will be used.
    • When .Values.global.image is set, its value will only be used if magdaModuleType of the chart is core.
      • We will only set the magdaModuleType of charts in Magda's core repo to core.
    • When .Values.global.connectors.image is set, its value will only be used if magdaModuleType of the chart is connector.
    • When .Values.global.minions.image is set, its value will only be used if magdaModuleType of the chart is minion.
    • When .Values.global.urlProcessors.image is set, its value will only be used if magdaModuleType of the chart is urlProcessor.

Here, magdaModuleType is an annotation set to Chart.yaml.

Todo:

  • Implement above logic as Helm chart template in chart magda-common. They are:
    • magda.imagePullSecrets
    • magda.image
    • magda.imagePullPolicy
  • Use above templates to replace all relevant logic in magda repo charts
  • Use above templates to update all auth plugins
  • Use above templates to update all connectors
  • Use above templates to update all minions
t83714 added a commit that referenced this issue Oct 1, 2021
- "magda.imagePullSecrets"
- "magda.image"
- "magda.imagePullPolicy"
according to #3229
@t83714 t83714 self-assigned this Oct 1, 2021
t83714 added a commit that referenced this issue Oct 2, 2021
@t83714 t83714 mentioned this issue Oct 2, 2021
2 tasks
t83714 added a commit to magda-io/magda-ckan-connector that referenced this issue Oct 5, 2021
t83714 added a commit that referenced this issue Oct 8, 2021
t83714 added a commit to magda-io/magda-csw-connector that referenced this issue Oct 11, 2021
t83714 added a commit to magda-io/magda-project-open-data-connector that referenced this issue Oct 11, 2021
- Related to magda-io/magda#3229, Use magda-common for docker image related logic
t83714 added a commit to magda-io/magda-dap-connector that referenced this issue Oct 11, 2021
t83714 added a commit to magda-io/magda-preview-map that referenced this issue Oct 11, 2021
t83714 added a commit to magda-io/magda-function-esri-url-processor that referenced this issue Oct 11, 2021
t83714 added a commit to magda-io/magda-function-history-report that referenced this issue Oct 11, 2021
t83714 added a commit to magda-io/magda-minion-visualization that referenced this issue Oct 12, 2021
t83714 added a commit to magda-io/magda-minion-broken-link that referenced this issue Oct 12, 2021
t83714 added a commit to magda-io/magda-minion-format that referenced this issue Oct 12, 2021
t83714 added a commit to magda-io/magda-minion-linked-data-rating that referenced this issue Oct 12, 2021
t83714 added a commit to magda-io/magda-minion-ckan-exporter that referenced this issue Oct 12, 2021
t83714 added a commit that referenced this issue Oct 12, 2021
@t83714
Copy link
Contributor Author

t83714 commented Oct 17, 2021

closed via PR: #3240

@t83714 t83714 closed this as completed Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant