imagepullsecrets
by Helm
Declarative configuration for imagepullsecrets
About this chart
imagepullsecrets
Declarative configuration for imagepullsecrets
Introduction
This Helm chart is a way to declaratively deploy imagepullsecrets to a Kubernetes cluster to use in a private registry context.
TL;DR
helm install gabibbo97/imagepullsecrets \
--set imagePullSecret.registryURL="registry.k8s.example.com:5000" \
--set imagePullSecret.secretName="registry-pullsecret" \
--set imagePullSecret.username="user" \
--set imagePullSecret.password="password"
Configuration options
| Parameter | Description | Default |
|---|---|---|
addAuthField | Add auth: <base64 encode of user:pass> to the secret | true |
imagePullSecret.registryURL | URL of the registry | "" |
imagePullSecret.secretName | Name of the imagepullsecret object for the registry | "" |
imagePullSecret.username | Username for the registry | "" |
imagePullSecret.password | Password for the registry | "" |
imagePullSecret.annotations.<<KEY>> | Annotations to set on the secret for the registry | {} |
imagePullSecret.labels.<<KEY>> | Labels to set on the secret for the registry | {} |
Usage
After creating a secret registry-pullsecret you can use it in two ways
On a Pod
On the Pod, set spec.imagePullSecrets[0].name=registry-pullsecret
kind: Pod
...
spec:
...
imagePullSecrets:
- name: registry-pullsecret
...
On a ServiceAccount
On the ServiceAccount, set imagePullSecrets[0].name=registry-pullsecret
kind: ServiceAccount
---
imagePullSecrets:
- name: registry-pullsecret
Then on pods that should consume that secret add spec.serviceAccountName=my-service-account
kind: Pod
...
spec:
...
serviceAccountName: my-service-account
...
Deploy imagepullsecrets with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has imagepullsecrets on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartimagepullsecrets is pinned at v3.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply