Skip to content

Commit

Permalink
Merge pull request #72 from rollandf/image-name
Browse files Browse the repository at this point in the history
Helm: split repository and image name
  • Loading branch information
adrianchiris authored Feb 3, 2025
2 parents 6bfcb8a + c26ceee commit de87cf5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,10 @@ deploy-operator-e2e: helm kubectl kind ## Deploy operator to test cluster
echo "Upload test image to kind cluster"; \
$(KIND) load docker-image $(IMAGE_TAG_BASE):test --name $(TEST_CLUSTER_NAME); \
echo "deploy operator to kind cluster"; \
IMAGE_NAME=$$(echo $(IMAGE_TAG_BASE) | awk -F'/' '{print $$NF}'); \
IMAGE_REPO=$$(echo $(IMAGE_TAG_BASE) | awk -F'/' 'NF>1{NF--; print $0}' OFS='/'); \
$(HELM) upgrade -i --create-namespace -n maintenance-operator \
--set operator.image.repository=$(IMAGE_TAG_BASE) --set operator.image.tag=test --set operator.image.imagePullPolicy=Never \
--set operator.image.repository=$$IMAGE_REPO --set operator.image.name=$$IMAGE_NAME --set operator.image.tag=test --set operator.image.imagePullPolicy=Never \
maintenance-operator $(CURDIR)/deployment/maintenance-operator-chart; \
}

Expand Down
3 changes: 2 additions & 1 deletion deployment/maintenance-operator-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Maintenance Operator Helm Chart
| operator.admissionController.enable | bool | `true` | enable admission controller of the operator |
| operator.affinity | object | `{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"node-role.kubernetes.io/master","operator":"Exists"}]},"weight":1},{"preference":{"matchExpressions":[{"key":"node-role.kubernetes.io/control-plane","operator":"Exists"}]},"weight":1}]}}` | node affinity for the operator |
| operator.image.imagePullPolicy | string | `nil` | image pull policy for the operator image |
| operator.image.repository | string | `"ghcr.io/mellanox/maintenance-operator"` | repository to use for the operator image |
| operator.image.repository | string | `"ghcr.io/mellanox"` | repository to use for the operator image |
| operator.image.name | string | `"maintenance-operator"` | image name to use for the operator image |
| operator.image.tag | string | `nil` | image tag to use for the operator image |
| operator.nodeSelector | object | `{}` | node selector for the operator |
| operator.replicas | int | `1` | operator deployment number of repplicas |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
fieldPath: metadata.namespace
- name: ENABLE_WEBHOOKS
value: {{ quote .Values.operator.admissionController.enable }}
image: {{ .Values.operator.image.repository }}:{{ .Values.operator.image.tag | default .Chart.AppVersion }}
image: {{ .Values.operator.image.repository }}/{{ .Values.operator.image.name }}:{{ .Values.operator.image.tag | default .Chart.AppVersion }}
{{- if .Values.operator.image.imagePullPolicy }}
imagePullPolicy: {{ .Values.operator.image.imagePullPolicy }}
{{- end }}
Expand Down
4 changes: 3 additions & 1 deletion deployment/maintenance-operator-chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
operator:
image:
# -- repository to use for the operator image
repository: ghcr.io/mellanox/maintenance-operator
repository: ghcr.io/mellanox
# -- image name to use for the operator image
name: maintenance-operator
# -- image tag to use for the operator image
tag: null
# -- image pull policy for the operator image
Expand Down

0 comments on commit de87cf5

Please sign in to comment.