2022-11-29 23:17:26 +08:00
|
|
|
# Copyright 2022 The cert-manager Authors.
|
2021-10-13 00:17:47 +08:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: {{ cert_manager_namespace }}
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/cainjector-serviceaccount.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
automountServiceAccountToken: true
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-cainjector
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: cainjector
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/serviceaccount.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
automountServiceAccountToken: true
|
|
|
|
metadata:
|
|
|
|
name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-serviceaccount.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
automountServiceAccountToken: true
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
---
|
2024-01-05 11:45:10 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/controller-config.yaml
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
data:
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-config.yaml
|
2022-02-04 09:24:00 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
2024-01-05 11:45:10 +08:00
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
2022-02-04 09:24:00 +08:00
|
|
|
data:
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/cainjector-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-cainjector
|
|
|
|
labels:
|
|
|
|
app: cainjector
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["get", "create", "update", "patch"]
|
|
|
|
- apiGroups: ["admissionregistration.k8s.io"]
|
|
|
|
resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
|
2024-01-05 11:45:10 +08:00
|
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["apiregistration.k8s.io"]
|
|
|
|
resources: ["apiservices"]
|
2024-01-05 11:45:10 +08:00
|
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["apiextensions.k8s.io"]
|
|
|
|
resources: ["customresourcedefinitions"]
|
2024-01-05 11:45:10 +08:00
|
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# Issuer controller role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-issuers
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["issuers", "issuers/status"]
|
2022-04-06 15:52:57 +08:00
|
|
|
verbs: ["update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["issuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "update", "delete"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["create", "patch"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# ClusterIssuer controller role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-clusterissuers
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["clusterissuers", "clusterissuers/status"]
|
2022-04-06 15:52:57 +08:00
|
|
|
verbs: ["update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["clusterissuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "update", "delete"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["create", "patch"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# Certificates controller role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-certificates
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates", "certificates/status", "certificaterequests", "certificaterequests/status"]
|
2022-04-06 15:52:57 +08:00
|
|
|
verbs: ["update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates", "certificaterequests", "clusterissuers", "issuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
# We require these rules to support users with the OwnerReferencesPermissionEnforcement
|
|
|
|
# admission controller enabled:
|
|
|
|
# https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates/finalizers", "certificaterequests/finalizers"]
|
|
|
|
verbs: ["update"]
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["orders"]
|
|
|
|
verbs: ["create", "delete", "get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
2022-02-04 09:24:00 +08:00
|
|
|
verbs: ["get", "list", "watch", "create", "update", "delete", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["create", "patch"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# Orders controller role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-orders
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["orders", "orders/status"]
|
2022-04-06 15:52:57 +08:00
|
|
|
verbs: ["update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["orders", "challenges"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["clusterissuers", "issuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["challenges"]
|
|
|
|
verbs: ["create", "delete"]
|
|
|
|
# We require these rules to support users with the OwnerReferencesPermissionEnforcement
|
|
|
|
# admission controller enabled:
|
|
|
|
# https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["orders/finalizers"]
|
|
|
|
verbs: ["update"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["create", "patch"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# Challenges controller role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-challenges
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
# Use to update challenge resource status
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["challenges", "challenges/status"]
|
2022-04-06 15:52:57 +08:00
|
|
|
verbs: ["update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
# Used to watch challenge resources
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["challenges"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
# Used to watch challenges, issuer and clusterissuer resources
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["issuers", "clusterissuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
# Need to be able to retrieve ACME account private key to complete challenges
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
# Used to create events
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["create", "patch"]
|
|
|
|
# HTTP01 rules
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["pods", "services"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "delete"]
|
|
|
|
- apiGroups: ["networking.k8s.io"]
|
|
|
|
resources: ["ingresses"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "delete", "update"]
|
2022-04-06 15:52:57 +08:00
|
|
|
- apiGroups: [ "gateway.networking.k8s.io" ]
|
2021-10-13 00:17:47 +08:00
|
|
|
resources: [ "httproutes" ]
|
|
|
|
verbs: ["get", "list", "watch", "create", "delete", "update"]
|
|
|
|
# We require the ability to specify a custom hostname when we are creating
|
|
|
|
# new ingress resources.
|
|
|
|
# See: https://github.com/openshift/origin/blob/21f191775636f9acadb44fa42beeb4f75b255532/pkg/route/apiserver/admission/ingress_admission.go#L84-L148
|
|
|
|
- apiGroups: ["route.openshift.io"]
|
|
|
|
resources: ["routes/custom-host"]
|
|
|
|
verbs: ["create"]
|
|
|
|
# We require these rules to support users with the OwnerReferencesPermissionEnforcement
|
|
|
|
# admission controller enabled:
|
|
|
|
# https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["challenges/finalizers"]
|
|
|
|
verbs: ["update"]
|
|
|
|
# DNS01 rules (duplicated above)
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# ingress-shim controller role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-ingress-shim
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates", "certificaterequests"]
|
|
|
|
verbs: ["create", "update", "delete"]
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates", "certificaterequests", "issuers", "clusterissuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["networking.k8s.io"]
|
|
|
|
resources: ["ingresses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
# We require these rules to support users with the OwnerReferencesPermissionEnforcement
|
|
|
|
# admission controller enabled:
|
|
|
|
# https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement
|
|
|
|
- apiGroups: ["networking.k8s.io"]
|
|
|
|
resources: ["ingresses/finalizers"]
|
|
|
|
verbs: ["update"]
|
2022-04-06 15:52:57 +08:00
|
|
|
- apiGroups: ["gateway.networking.k8s.io"]
|
2021-10-13 00:17:47 +08:00
|
|
|
resources: ["gateways", "httproutes"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
2022-04-06 15:52:57 +08:00
|
|
|
- apiGroups: ["gateway.networking.k8s.io"]
|
2021-10-13 00:17:47 +08:00
|
|
|
resources: ["gateways/finalizers", "httproutes/finalizers"]
|
|
|
|
verbs: ["update"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["create", "patch"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
2024-01-05 11:45:10 +08:00
|
|
|
metadata:
|
|
|
|
name: cert-manager-cluster-view
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rbac.authorization.k8s.io/aggregate-to-cluster-reader: "true"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["clusterissuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
---
|
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
2021-10-13 00:17:47 +08:00
|
|
|
metadata:
|
|
|
|
name: cert-manager-view
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
|
|
|
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
|
|
|
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
2024-01-05 11:45:10 +08:00
|
|
|
rbac.authorization.k8s.io/aggregate-to-cluster-reader: "true"
|
2021-10-13 00:17:47 +08:00
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates", "certificaterequests", "issuers"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["challenges", "orders"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-edit
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
|
|
|
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates", "certificaterequests", "issuers"]
|
|
|
|
verbs: ["create", "delete", "deletecollection", "patch", "update"]
|
2022-04-06 15:52:57 +08:00
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["certificates/status"]
|
|
|
|
verbs: ["update"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["acme.cert-manager.io"]
|
|
|
|
resources: ["challenges", "orders"]
|
|
|
|
verbs: ["create", "delete", "deletecollection", "patch", "update"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# Permission to approve CertificateRequests referencing cert-manager.io Issuers and ClusterIssuers
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-approve:cert-manager-io
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cert-manager"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["cert-manager.io"]
|
|
|
|
resources: ["signers"]
|
|
|
|
verbs: ["approve"]
|
|
|
|
resourceNames: ["issuers.cert-manager.io/*", "clusterissuers.cert-manager.io/*"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# Permission to:
|
|
|
|
# - Update and sign CertificatSigningeRequests referencing cert-manager.io Issuers and ClusterIssuers
|
|
|
|
# - Perform SubjectAccessReviews to test whether users are able to reference Namespaced Issuers
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-certificatesigningrequests
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cert-manager"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["certificates.k8s.io"]
|
|
|
|
resources: ["certificatesigningrequests"]
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
|
|
|
- apiGroups: ["certificates.k8s.io"]
|
|
|
|
resources: ["certificatesigningrequests/status"]
|
2022-04-06 15:52:57 +08:00
|
|
|
verbs: ["update", "patch"]
|
2021-10-13 00:17:47 +08:00
|
|
|
- apiGroups: ["certificates.k8s.io"]
|
|
|
|
resources: ["signers"]
|
|
|
|
resourceNames: ["issuers.cert-manager.io/*", "clusterissuers.cert-manager.io/*"]
|
|
|
|
verbs: ["sign"]
|
|
|
|
- apiGroups: ["authorization.k8s.io"]
|
|
|
|
resources: ["subjectaccessreviews"]
|
|
|
|
verbs: ["create"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook:subjectaccessreviews
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["authorization.k8s.io"]
|
|
|
|
resources: ["subjectaccessreviews"]
|
|
|
|
verbs: ["create"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/cainjector-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-cainjector
|
|
|
|
labels:
|
|
|
|
app: cainjector
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-cainjector
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager-cainjector
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-issuers
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-issuers
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2024-01-05 11:45:10 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-clusterissuers
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-clusterissuers
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-certificates
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-certificates
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-orders
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-orders
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-challenges
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-challenges
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-ingress-shim
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-ingress-shim
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-approve:cert-manager-io
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cert-manager"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-approve:cert-manager-io
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-controller-certificatesigningrequests
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cert-manager"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-controller-certificatesigningrequests
|
|
|
|
subjects:
|
|
|
|
- name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
kind: ServiceAccount
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook:subjectaccessreviews
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cert-manager-webhook:subjectaccessreviews
|
|
|
|
subjects:
|
|
|
|
- apiGroup: ""
|
|
|
|
kind: ServiceAccount
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/cainjector-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# leader election rules
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: Role
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-cainjector:leaderelection
|
2022-01-17 18:37:29 +08:00
|
|
|
namespace: {{ cert_manager_leader_election_namespace }}
|
2021-10-13 00:17:47 +08:00
|
|
|
labels:
|
|
|
|
app: cainjector
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
# Used for leader election by the controller
|
|
|
|
# cert-manager-cainjector-leader-election is used by the CertificateBased injector controller
|
|
|
|
# see cmd/cainjector/start.go#L113
|
|
|
|
# cert-manager-cainjector-leader-election-core is used by the SecretBased injector controller
|
|
|
|
# see cmd/cainjector/start.go#L137
|
|
|
|
- apiGroups: ["coordination.k8s.io"]
|
|
|
|
resources: ["leases"]
|
|
|
|
resourceNames: ["cert-manager-cainjector-leader-election", "cert-manager-cainjector-leader-election-core"]
|
|
|
|
verbs: ["get", "update", "patch"]
|
|
|
|
- apiGroups: ["coordination.k8s.io"]
|
|
|
|
resources: ["leases"]
|
|
|
|
verbs: ["create"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2022-02-04 09:24:00 +08:00
|
|
|
kind: Role
|
2021-10-13 00:17:47 +08:00
|
|
|
metadata:
|
|
|
|
name: cert-manager:leaderelection
|
2022-01-17 18:37:29 +08:00
|
|
|
namespace: {{ cert_manager_leader_election_namespace }}
|
2021-10-13 00:17:47 +08:00
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: ["coordination.k8s.io"]
|
|
|
|
resources: ["leases"]
|
|
|
|
resourceNames: ["cert-manager-controller"]
|
|
|
|
verbs: ["get", "update", "patch"]
|
|
|
|
- apiGroups: ["coordination.k8s.io"]
|
|
|
|
resources: ["leases"]
|
|
|
|
verbs: ["create"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: Role
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook:dynamic-serving
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
resourceNames:
|
|
|
|
- 'cert-manager-webhook-ca'
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
|
|
|
# It's not possible to grant CREATE permission on a single resourceName.
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["create"]
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/cainjector-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# grant cert-manager permission to manage the leaderelection configmap in the
|
|
|
|
# leader election namespace
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: RoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-cainjector:leaderelection
|
2022-01-17 18:37:29 +08:00
|
|
|
namespace: {{ cert_manager_leader_election_namespace }}
|
2021-10-13 00:17:47 +08:00
|
|
|
labels:
|
|
|
|
app: cainjector
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: Role
|
|
|
|
name: cert-manager-cainjector:leaderelection
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: cert-manager-cainjector
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
# grant cert-manager permission to manage the leaderelection configmap in the
|
|
|
|
# leader election namespace
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2022-02-04 09:24:00 +08:00
|
|
|
kind: RoleBinding
|
2021-10-13 00:17:47 +08:00
|
|
|
metadata:
|
|
|
|
name: cert-manager:leaderelection
|
2022-01-17 18:37:29 +08:00
|
|
|
namespace: {{ cert_manager_leader_election_namespace }}
|
2021-10-13 00:17:47 +08:00
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
2022-02-04 09:24:00 +08:00
|
|
|
kind: Role
|
2021-10-13 00:17:47 +08:00
|
|
|
name: cert-manager:leaderelection
|
|
|
|
subjects:
|
|
|
|
- apiGroup: ""
|
|
|
|
kind: ServiceAccount
|
|
|
|
name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-rbac.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: RoleBinding
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook:dynamic-serving
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: Role
|
|
|
|
name: cert-manager-webhook:dynamic-serving
|
|
|
|
subjects:
|
|
|
|
- apiGroup: ""
|
|
|
|
kind: ServiceAccount
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/service.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
2022-04-06 15:52:57 +08:00
|
|
|
- protocol: TCP
|
|
|
|
port: 9402
|
|
|
|
name: tcp-prometheus-servicemonitor
|
|
|
|
targetPort: 9402
|
2021-10-13 00:17:47 +08:00
|
|
|
selector:
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-service.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- name: https
|
|
|
|
port: 443
|
|
|
|
protocol: TCP
|
2022-02-04 09:24:00 +08:00
|
|
|
targetPort: "https"
|
2021-10-13 00:17:47 +08:00
|
|
|
selector:
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/cainjector-deployment.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-cainjector
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: cainjector
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: cainjector
|
|
|
|
app.kubernetes.io/name: cainjector
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "cainjector"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
spec:
|
|
|
|
serviceAccountName: cert-manager-cainjector
|
2024-01-05 11:45:10 +08:00
|
|
|
enableServiceLinks: false
|
2021-10-13 00:17:47 +08:00
|
|
|
securityContext:
|
|
|
|
runAsNonRoot: true
|
2022-11-29 23:17:26 +08:00
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
2021-10-13 00:17:47 +08:00
|
|
|
containers:
|
2022-11-29 23:17:26 +08:00
|
|
|
- name: cert-manager-cainjector
|
2021-10-13 00:17:47 +08:00
|
|
|
image: "{{ cert_manager_cainjector_image_repo }}:{{ cert_manager_cainjector_image_tag }}"
|
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
args:
|
|
|
|
- --v=2
|
2022-01-15 04:54:26 +08:00
|
|
|
- --leader-election-namespace={{ cert_manager_leader_election_namespace }}
|
2021-10-13 00:17:47 +08:00
|
|
|
env:
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2023-06-01 11:23:45 +08:00
|
|
|
{% if cert_manager_http_proxy is defined and cert_manager_http_proxy != "" %}
|
|
|
|
- name: HTTP_PROXY
|
|
|
|
value: "{{ cert_manager_http_proxy }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_https_proxy is defined and cert_manager_https_proxy != "" %}
|
|
|
|
- name: HTTPS_PROXY
|
|
|
|
value: "{{ cert_manager_https_proxy }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_no_proxy is defined and cert_manager_no_proxy != "" %}
|
|
|
|
- name: NO_PROXY
|
|
|
|
value: "{{ cert_manager_no_proxy }}"
|
|
|
|
{% endif %}
|
2022-04-06 15:52:57 +08:00
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
2022-10-20 15:57:08 +08:00
|
|
|
capabilities:
|
2022-11-29 23:17:26 +08:00
|
|
|
drop:
|
|
|
|
- ALL
|
2022-10-20 15:57:08 +08:00
|
|
|
runAsNonRoot: true
|
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
2022-01-12 01:14:26 +08:00
|
|
|
{% if cert_manager_tolerations %}
|
|
|
|
tolerations:
|
|
|
|
{{ cert_manager_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_nodeselector %}
|
|
|
|
nodeSelector:
|
|
|
|
{{ cert_manager_nodeselector | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_affinity %}
|
|
|
|
affinity:
|
|
|
|
{{ cert_manager_affinity | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
2021-10-13 00:17:47 +08:00
|
|
|
---
|
2021-11-06 00:43:52 +08:00
|
|
|
{% if cert_manager_trusted_internal_ca is defined %}
|
|
|
|
apiVersion: v1
|
|
|
|
data:
|
|
|
|
internal-ca.pem: |
|
2021-11-25 00:56:21 +08:00
|
|
|
{{ cert_manager_trusted_internal_ca | indent(width=4, first=False) }}
|
2021-11-06 00:43:52 +08:00
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: ca-internal-truststore
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
---
|
|
|
|
{% endif %}
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/deployment.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: cert-manager
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: cert-manager
|
|
|
|
app.kubernetes.io/name: cert-manager
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "controller"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
annotations:
|
|
|
|
prometheus.io/path: "/metrics"
|
|
|
|
prometheus.io/scrape: 'true'
|
|
|
|
prometheus.io/port: '9402'
|
|
|
|
spec:
|
|
|
|
serviceAccountName: cert-manager
|
2024-01-05 11:45:10 +08:00
|
|
|
enableServiceLinks: false
|
2021-10-13 00:17:47 +08:00
|
|
|
securityContext:
|
|
|
|
runAsNonRoot: true
|
2022-11-29 23:17:26 +08:00
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
2021-10-13 00:17:47 +08:00
|
|
|
containers:
|
2022-11-29 23:17:26 +08:00
|
|
|
- name: cert-manager-controller
|
2021-10-13 00:17:47 +08:00
|
|
|
image: "{{ cert_manager_controller_image_repo }}:{{ cert_manager_controller_image_tag }}"
|
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
args:
|
|
|
|
- --v=2
|
|
|
|
- --cluster-resource-namespace=$(POD_NAMESPACE)
|
2022-01-15 04:54:26 +08:00
|
|
|
- --leader-election-namespace={{ cert_manager_leader_election_namespace }}
|
2023-05-24 23:12:53 +08:00
|
|
|
{% for extra_arg in cert_manager_controller_extra_args %}
|
|
|
|
- {{ extra_arg }}
|
|
|
|
{% endfor %}
|
2021-10-13 00:17:47 +08:00
|
|
|
ports:
|
|
|
|
- containerPort: 9402
|
2022-04-06 15:52:57 +08:00
|
|
|
name: http-metrics
|
2021-10-13 00:17:47 +08:00
|
|
|
protocol: TCP
|
2024-01-05 11:45:10 +08:00
|
|
|
- containerPort: 9403
|
|
|
|
name: http-healthz
|
|
|
|
protocol: TCP
|
2022-04-06 15:52:57 +08:00
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
2022-10-20 15:57:08 +08:00
|
|
|
capabilities:
|
2022-11-29 23:17:26 +08:00
|
|
|
drop:
|
|
|
|
- ALL
|
2022-10-20 15:57:08 +08:00
|
|
|
runAsNonRoot: true
|
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
2021-10-13 00:17:47 +08:00
|
|
|
env:
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2023-06-01 11:23:45 +08:00
|
|
|
{% if cert_manager_http_proxy is defined and cert_manager_http_proxy != "" %}
|
|
|
|
- name: HTTP_PROXY
|
|
|
|
value: "{{ cert_manager_http_proxy }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_https_proxy is defined and cert_manager_https_proxy != "" %}
|
|
|
|
- name: HTTPS_PROXY
|
|
|
|
value: "{{ cert_manager_https_proxy }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_no_proxy is defined and cert_manager_no_proxy != "" %}
|
|
|
|
- name: NO_PROXY
|
|
|
|
value: "{{ cert_manager_no_proxy }}"
|
|
|
|
{% endif %}
|
2023-03-27 23:12:28 +08:00
|
|
|
{% if cert_manager_trusted_internal_ca is defined %}
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /etc/ssl/certs/internal-ca.pem
|
|
|
|
name: ca-internal-truststore
|
|
|
|
subPath: internal-ca.pem
|
|
|
|
volumes:
|
|
|
|
- configMap:
|
|
|
|
defaultMode: 420
|
|
|
|
name: ca-internal-truststore
|
|
|
|
name: ca-internal-truststore
|
|
|
|
{% endif %}
|
2022-01-12 01:14:26 +08:00
|
|
|
{% if cert_manager_tolerations %}
|
|
|
|
tolerations:
|
|
|
|
{{ cert_manager_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_nodeselector %}
|
|
|
|
nodeSelector:
|
|
|
|
{{ cert_manager_nodeselector | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_affinity %}
|
|
|
|
affinity:
|
|
|
|
{{ cert_manager_affinity | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
2023-01-24 09:42:15 +08:00
|
|
|
{% if cert_manager_dns_policy %}
|
|
|
|
dnsPolicy: {{ cert_manager_dns_policy }}
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_dns_config %}
|
|
|
|
dnsConfig:
|
|
|
|
{{ cert_manager_dns_config | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
2021-10-13 00:17:47 +08:00
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-deployment.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
spec:
|
|
|
|
serviceAccountName: cert-manager-webhook
|
2024-01-05 11:45:10 +08:00
|
|
|
enableServiceLinks: false
|
2021-10-13 00:17:47 +08:00
|
|
|
securityContext:
|
|
|
|
runAsNonRoot: true
|
2022-11-29 23:17:26 +08:00
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
2021-10-13 00:17:47 +08:00
|
|
|
containers:
|
2022-11-29 23:17:26 +08:00
|
|
|
- name: cert-manager-webhook
|
2021-10-13 00:17:47 +08:00
|
|
|
image: "{{ cert_manager_webhook_image_repo }}:{{ cert_manager_webhook_image_tag }}"
|
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
args:
|
|
|
|
- --v=2
|
|
|
|
- --secure-port=10250
|
|
|
|
- --dynamic-serving-ca-secret-namespace=$(POD_NAMESPACE)
|
|
|
|
- --dynamic-serving-ca-secret-name=cert-manager-webhook-ca
|
2022-11-29 23:17:26 +08:00
|
|
|
- --dynamic-serving-dns-names=cert-manager-webhook
|
|
|
|
- --dynamic-serving-dns-names=cert-manager-webhook.$(POD_NAMESPACE)
|
|
|
|
- --dynamic-serving-dns-names=cert-manager-webhook.$(POD_NAMESPACE).svc
|
2021-10-13 00:17:47 +08:00
|
|
|
ports:
|
|
|
|
- name: https
|
|
|
|
protocol: TCP
|
|
|
|
containerPort: 10250
|
2022-11-29 23:17:26 +08:00
|
|
|
- name: healthcheck
|
|
|
|
protocol: TCP
|
|
|
|
containerPort: 6080
|
2021-10-13 00:17:47 +08:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /livez
|
|
|
|
port: 6080
|
|
|
|
scheme: HTTP
|
|
|
|
initialDelaySeconds: 60
|
|
|
|
periodSeconds: 10
|
|
|
|
timeoutSeconds: 1
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 6080
|
|
|
|
scheme: HTTP
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
periodSeconds: 5
|
|
|
|
timeoutSeconds: 1
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|
2022-04-06 15:52:57 +08:00
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
2022-10-20 15:57:08 +08:00
|
|
|
capabilities:
|
2022-11-29 23:17:26 +08:00
|
|
|
drop:
|
|
|
|
- ALL
|
2022-10-20 15:57:08 +08:00
|
|
|
runAsNonRoot: true
|
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
2021-10-13 00:17:47 +08:00
|
|
|
env:
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2023-06-01 11:23:45 +08:00
|
|
|
{% if cert_manager_http_proxy is defined and cert_manager_http_proxy != "" %}
|
|
|
|
- name: HTTP_PROXY
|
|
|
|
value: "{{ cert_manager_http_proxy }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_https_proxy is defined and cert_manager_https_proxy != "" %}
|
|
|
|
- name: HTTPS_PROXY
|
|
|
|
value: "{{ cert_manager_https_proxy }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_no_proxy is defined and cert_manager_no_proxy != "" %}
|
|
|
|
- name: NO_PROXY
|
|
|
|
value: "{{ cert_manager_no_proxy }}"
|
|
|
|
{% endif %}
|
2022-01-12 01:14:26 +08:00
|
|
|
{% if cert_manager_tolerations %}
|
|
|
|
tolerations:
|
|
|
|
{{ cert_manager_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_nodeselector %}
|
|
|
|
nodeSelector:
|
|
|
|
{{ cert_manager_nodeselector | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if cert_manager_affinity %}
|
|
|
|
affinity:
|
|
|
|
{{ cert_manager_affinity | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
2021-10-13 00:17:47 +08:00
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-mutating-webhook.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: admissionregistration.k8s.io/v1
|
|
|
|
kind: MutatingWebhookConfiguration
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/inject-ca-from-secret: "{{ cert_manager_namespace }}/cert-manager-webhook-ca"
|
|
|
|
webhooks:
|
|
|
|
- name: webhook.cert-manager.io
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- "cert-manager.io"
|
|
|
|
- "acme.cert-manager.io"
|
|
|
|
apiVersions:
|
|
|
|
- "v1"
|
|
|
|
operations:
|
|
|
|
- CREATE
|
|
|
|
- UPDATE
|
|
|
|
resources:
|
|
|
|
- "*/*"
|
2022-02-04 09:24:00 +08:00
|
|
|
admissionReviewVersions: ["v1"]
|
2021-10-13 00:17:47 +08:00
|
|
|
# This webhook only accepts v1 cert-manager resources.
|
|
|
|
# Equivalent matchPolicy ensures that non-v1 resource requests are sent to
|
|
|
|
# this webhook (after the resources have been converted to v1).
|
|
|
|
matchPolicy: Equivalent
|
|
|
|
timeoutSeconds: 10
|
|
|
|
failurePolicy: Fail
|
|
|
|
# Only include 'sideEffects' field in Kubernetes 1.12+
|
|
|
|
sideEffects: None
|
|
|
|
clientConfig:
|
|
|
|
service:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
path: /mutate
|
|
|
|
---
|
2023-01-16 18:36:51 +08:00
|
|
|
# Source: cert-manager/deploy/charts/cert-manager/templates/webhook-validating-webhook.yaml
|
2021-10-13 00:17:47 +08:00
|
|
|
apiVersion: admissionregistration.k8s.io/v1
|
|
|
|
kind: ValidatingWebhookConfiguration
|
|
|
|
metadata:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
labels:
|
|
|
|
app: webhook
|
|
|
|
app.kubernetes.io/name: webhook
|
|
|
|
app.kubernetes.io/instance: cert-manager
|
|
|
|
app.kubernetes.io/component: "webhook"
|
|
|
|
app.kubernetes.io/version: "{{ cert_manager_version }}"
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/inject-ca-from-secret: "{{ cert_manager_namespace }}/cert-manager-webhook-ca"
|
|
|
|
webhooks:
|
|
|
|
- name: webhook.cert-manager.io
|
|
|
|
namespaceSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: "cert-manager.io/disable-validation"
|
|
|
|
operator: "NotIn"
|
|
|
|
values:
|
|
|
|
- "true"
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- "cert-manager.io"
|
|
|
|
- "acme.cert-manager.io"
|
|
|
|
apiVersions:
|
|
|
|
- "v1"
|
|
|
|
operations:
|
|
|
|
- CREATE
|
|
|
|
- UPDATE
|
|
|
|
resources:
|
|
|
|
- "*/*"
|
2022-02-04 09:24:00 +08:00
|
|
|
admissionReviewVersions: ["v1"]
|
2021-10-13 00:17:47 +08:00
|
|
|
# This webhook only accepts v1 cert-manager resources.
|
|
|
|
# Equivalent matchPolicy ensures that non-v1 resource requests are sent to
|
|
|
|
# this webhook (after the resources have been converted to v1).
|
|
|
|
matchPolicy: Equivalent
|
|
|
|
timeoutSeconds: 10
|
|
|
|
failurePolicy: Fail
|
|
|
|
sideEffects: None
|
|
|
|
clientConfig:
|
|
|
|
service:
|
|
|
|
name: cert-manager-webhook
|
|
|
|
namespace: {{ cert_manager_namespace }}
|
|
|
|
path: /validate
|