Skip to content

Commit

Permalink
fix: add registries for helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbaehler committed Oct 18, 2023
1 parent 9607e04 commit 09482c5
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ run: generate manifests

# Creates the single file to install Capsule without any external dependency
installer: manifests kustomize
cd config/manager && $(KUSTOMIZE) edit set image controller=${LOCAL_CAPSULE_IMG}
cd config/manager && $(KUSTOMIZE) edit set image controller=${CAPSULE_IMG}:${VERSION}
$(KUSTOMIZE) build config/default > config/install.yaml

# Install CRDs into a cluster
Expand Down
4 changes: 3 additions & 1 deletion charts/capsule/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Here the values you can override:
| customLabels | object | `{}` | Additional labels which will be added to all resources created by Capsule helm chart |
| imagePullSecrets | list | `[]` | Configuration for `imagePullSecrets` so that you can use a private images registry. |
| jobs.image.pullPolicy | string | `"IfNotPresent"` | Set the image pull policy of the helm chart job |
| jobs.image.registry | string | `"docker.io"` | Set the image repository of the helm chart job |
| jobs.image.repository | string | `"clastix/kubectl"` | Set the image repository of the helm chart job |
| jobs.image.tag | string | `""` | Set the image tag of the helm chart job |
| mutatingWebhooksTimeoutSeconds | int | `30` | Timeout in seconds for mutating webhooks |
Expand All @@ -102,7 +103,8 @@ Here the values you can override:
|-----|------|---------|-------------|
| manager.hostNetwork | bool | `false` | Specifies if the container should be started in hostNetwork mode. Required for use in some managed kubernetes clusters (such as AWS EKS) with custom CNI (such as calico), because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working |
| manager.image.pullPolicy | string | `"IfNotPresent"` | Set the image pull policy. |
| manager.image.repository | string | `"projectcapsule/capsule"` | Set the image repository of the capsule. |
| manager.image.registry | string | `"ghcr.io"` | Set the image registry of capsule. |
| manager.image.repository | string | `"projectcapsule/capsule"` | Set the image repository of capsule. |
| manager.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| manager.kind | string | `"Deployment"` | Set the controller deployment mode as `Deployment` or `DaemonSet`. |
| manager.livenessProbe | object | `{"httpGet":{"path":"/healthz","port":10080}}` | Configure the liveness probe using Deployment probe spec |
Expand Down
6 changes: 3 additions & 3 deletions charts/capsule/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Create the name of the service account to use
Create the manager fully-qualified Docker image to use
*/}}
{{- define "capsule.managerFullyQualifiedDockerImage" -}}
{{- printf "%s:%s" .Values.manager.image.repository ( .Values.manager.image.tag | default (printf "v%s" .Chart.AppVersion) ) -}}
{{- printf "%s/%s:%s" .Values.manager.image.registry .Values.manager.image.repository ( .Values.manager.image.tag | default (printf "v%s" .Chart.AppVersion) ) -}}
{{- end }}

{{/*
Expand All @@ -106,9 +106,9 @@ Create the jobs fully-qualified Docker image to use
*/}}
{{- define "capsule.jobsFullyQualifiedDockerImage" -}}
{{- if .Values.jobs.image.tag }}
{{- printf "%s:%s" .Values.jobs.image.repository .Values.jobs.image.tag -}}
{{- printf "%s/%s:%s" .Values.jobs.image.registry .Values.jobs.image.repository .Values.jobs.image.tag -}}
{{- else }}
{{- printf "%s:%s" .Values.jobs.image.repository (include "capsule.jobsTagKubeVersion" .) -}}
{{- printf "%s/%s:%s" .Values.jobs.image.registry .Values.jobs.image.repository (include "capsule.jobsTagKubeVersion" .) -}}
{{- end }}
{{- end }}

Expand Down
6 changes: 5 additions & 1 deletion charts/capsule/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ manager:
kind: Deployment

image:
# -- Set the image repository of the capsule.
# -- Set the image registry of capsule.
registry: ghcr.io
# -- Set the image repository of capsule.
repository: projectcapsule/capsule
# -- Set the image pull policy.
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -135,6 +137,8 @@ podSecurityPolicy:

jobs:
image:
# -- Set the image repository of the helm chart job
registry: docker.io
# -- Set the image repository of the helm chart job
repository: clastix/kubectl
# -- Set the image pull policy of the helm chart job
Expand Down
2 changes: 1 addition & 1 deletion config/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: clastix/capsule:v0.3.3
image: ghcr.io/projectcapsule/capsule
imagePullPolicy: IfNotPresent
name: manager
ports:
Expand Down
3 changes: 1 addition & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: clastix/capsule
newTag: v0.3.3
newName: ghcr.io/projectcapsule/capsule

0 comments on commit 09482c5

Please sign in to comment.