Skip to content

Commit 33c1d57

Browse files
authored
feat: Allow cert-manager certs to be issued by a cluster issuer (#158)
1 parent c646252 commit 33c1d57

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

charts/k8s-image-swapper/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: k8s-image-swapper
33
description: Mirror images into your own registry and swap image references automatically.
44
type: application
5-
version: 1.10.3
5+
version: 1.11.0
66
appVersion: 1.5.10
77
home: https://github.com/estahn/charts/tree/main/charts/k8s-image-swapper
88
keywords:
@@ -15,7 +15,7 @@ maintainers:
1515
name: estahn
1616
annotations:
1717
artifacthub.io/changes: |
18-
- "Add webhook timeoutSeconds to allow configuration how long the api server should wait for webhook"
18+
- "Allow cert-manager certs to be issued by a cluster issuer"
1919
artifacthub.io/images: |
2020
- name: k8s-image-webhook
2121
image: ghcr.io/estahn/k8s-image-swapper:1.5.10

charts/k8s-image-swapper/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# k8s-image-swapper
22

3-
![Version: 1.10.3](https://img.shields.io/badge/Version-1.10.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.10](https://img.shields.io/badge/AppVersion-1.5.10-informational?style=flat-square)
3+
![Version: 1.11.0](https://img.shields.io/badge/Version-1.11.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.10](https://img.shields.io/badge/AppVersion-1.5.10-informational?style=flat-square)
44

55
Mirror images into your own registry and swap image references automatically.
66

@@ -27,6 +27,7 @@ Mirror images into your own registry and swap image references automatically.
2727
| awsSecretName | string | `""` | If set, the secret will be used as environment variables, see awsSecretKeys. |
2828
| cacheVolume | object | `{"emptyDir":{}}` | The type of volume to be used for caching images |
2929
| certmanager.enabled | bool | `false` | Should cert-manager be used to issue the certificate use by the k8s-image-swapper endpoints |
30+
| certmanager.issuerKind | string | `"Issuer"` | Whether cert-manager should use an Issuer or ClusterIssuer to issue the cert |
3031
| certmanager.issuerName | string | `""` | If set, the name of the cert-manager issuer to use to issue the cert, otherwise a self-signed issuer will be created |
3132
| clusterSuffix | string | `"cluster.local"` | The DNS suffix of cluster addresses |
3233
| commonLabels | object | `{}` | Labels that will be added on all the resources (not in selectors) |

charts/k8s-image-swapper/templates/cert-manager-cert.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ spec:
1414
- {{ printf "%s.%s" (include "k8s-image-swapper.fullname" .) .Release.Namespace }}
1515
- {{ include "k8s-image-swapper.fullname" . }}
1616
issuerRef:
17+
kind: {{ .Values.certmanager.issuerKind }}
1718
name: {{ default (printf "%s-%s" (include "k8s-image-swapper.fullname" .) "issuer") .Values.certmanager.issuerName }}
1819
{{- end -}}

charts/k8s-image-swapper/values.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949
"enabled": {
5050
"type": "boolean"
5151
},
52+
"issuerKind": {
53+
"type": "string",
54+
"enum": [
55+
"ClusterIssuer",
56+
"Issuer"
57+
]
58+
},
5259
"issuerName": {
5360
"type": "string"
5461
}

charts/k8s-image-swapper/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ patch:
110110
certmanager:
111111
# -- Should cert-manager be used to issue the certificate use by the k8s-image-swapper endpoints
112112
enabled: false
113+
# -- Whether cert-manager should use an Issuer or ClusterIssuer to issue the cert
114+
issuerKind: Issuer
113115
# -- If set, the name of the cert-manager issuer to use to issue the cert, otherwise a self-signed issuer will be created
114116
issuerName: ""
115117

0 commit comments

Comments
 (0)