Skip to content

Commit

Permalink
add image.registry field (#1003)
Browse files Browse the repository at this point in the history
Signed-off-by: lengrongfu <[email protected]>
  • Loading branch information
lengrongfu authored May 22, 2023
1 parent 54c117c commit 4cabfa9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions charts/harbor-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Deploy Harbor Operator
| fullnameOverride | string | `""` | |
| harborClass | string | `""` | Class name of the Harbor operator |
| image.pullPolicy | string | `"IfNotPresent"` | The image pull policy for the controller. |
| image.registry | string | `"docker.io"` | The image registry whose default is docker.io. |
| image.repository | string | `"goharbor/harbor-operator"` | The image repository whose default is the chart appVersion. |
| image.tag | string | `"dev_master"` | The image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | Reference to one or more secrets to be used when pulling images <https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/> For example: `[ {"name":"image-pull-secret"} ]` |
Expand Down
2 changes: 1 addition & 1 deletion charts/harbor-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: '{{.Values.image.repository}}:{{.Values.image.tag|default .Chart.AppVersion}}'
image: '{{.Values.image.registry}}/{{.Values.image.repository}}:{{.Values.image.tag|default .Chart.AppVersion}}'
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
livenessProbe:
httpGet:
Expand Down
2 changes: 2 additions & 0 deletions charts/harbor-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
image:
# image.registry -- The image registry whose default is docker.io.
registry: docker.io
# image.repository -- The image repository whose default is the chart appVersion.
repository: goharbor/harbor-operator
# image.pullPolicy -- The image pull policy for the controller.
Expand Down
2 changes: 1 addition & 1 deletion config/helm/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ generatorOptions:

images:
- name: goharbor/harbor-operator:dev
newName: '{{.Values.image.repository}}'
newName: '{{.Values.image.registry}}/{{.Values.image.repository}}'
newTag: '{{.Values.image.tag|default .Chart.AppVersion}}'

patches:
Expand Down

0 comments on commit 4cabfa9

Please sign in to comment.