Fix to use created serviceaccount (#829)

Co-authored-by: angelnu <git@angelnucom>
This commit is contained in:
Vegetto 2021-04-25 16:21:56 +02:00 committed by GitHub
parent d55b98d49e
commit 2a88f60800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 16 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.0.0 appVersion: 1.0.0
description: Cert-Manager Webhook for DNSMadeEasy description: Cert-Manager Webhook for DNSMadeEasy
name: dnsmadeeasy-webhook name: dnsmadeeasy-webhook
version: 2.3.1 version: 2.3.2
keywords: keywords:
- cert-manager - cert-manager
- dnsmadeeasy - dnsmadeeasy

View File

@ -1,6 +1,6 @@
# dnsmadeeasy-webhook # dnsmadeeasy-webhook
![Version: 2.2.0](https://img.shields.io/badge/Version-2.2.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square) ![Version: 2.3.2](https://img.shields.io/badge/Version-2.3.2-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
Cert-Manager Webhook for DNSMadeEasy Cert-Manager Webhook for DNSMadeEasy
@ -17,7 +17,7 @@ Cert-Manager Webhook for DNSMadeEasy
| Repository | Name | Version | | Repository | Name | Version |
|------------|------|---------| |------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.2.0 | | https://library-charts.k8s-at-home.com | common | 2.3.1 |
## TL;DR ## TL;DR
@ -102,6 +102,7 @@ N/A
| service.port.name | string | `"https"` | | | service.port.name | string | `"https"` | |
| service.port.port | int | `443` | | | service.port.port | int | `443` | |
| service.port.targetPort | int | `4443` | | | service.port.targetPort | int | `4443` | |
| serviceAccount.create | bool | `true` | Create service account |
## Changelog ## Changelog
@ -139,7 +140,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A - N/A
[1.1.1]: #1.1.1 [2.3.2]: #2.3.2
### [2.3.2]
#### Changed
- Fix: use created service account
[2.3.2]: #2.3.2
## Support ## Support

View File

@ -39,5 +39,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A - N/A
[1.1.1]: #1.1.1 [2.3.2]: #2.3.2
### [2.3.2]
#### Changed
- Fix: use created service account
[2.3.2]: #2.3.2
{{- end -}} {{- end -}}

View File

@ -1,11 +1,3 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
@ -35,7 +27,7 @@ roleRef:
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.fullname" . }}
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.serviceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
--- ---
# Grant the webhook permission to read the ConfigMap containing the Kubernetes # Grant the webhook permission to read the ConfigMap containing the Kubernetes
@ -55,7 +47,7 @@ roleRef:
subjects: subjects:
- apiGroup: "" - apiGroup: ""
kind: ServiceAccount kind: ServiceAccount
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.serviceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
--- ---
# apiserver gets the auth-delegator role to delegate auth decisions to # apiserver gets the auth-delegator role to delegate auth decisions to
@ -73,7 +65,7 @@ roleRef:
subjects: subjects:
- apiGroup: "" - apiGroup: ""
kind: ServiceAccount kind: ServiceAccount
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.serviceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
--- ---
# Grant cert-manager permission to validate using our apiserver # Grant cert-manager permission to validate using our apiserver

View File

@ -16,6 +16,10 @@ certManager:
# Default values for dnsmadeeasy-webhook. # Default values for dnsmadeeasy-webhook.
serviceAccount:
# -- Create service account
create: true
image: image:
# -- Image repository # -- Image repository
repository: ghcr.io/k8s-at-home/dnsmadeeasy-webhook repository: ghcr.io/k8s-at-home/dnsmadeeasy-webhook