Generate static manifest with webhook disabled
Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
parent
557c6297cc
commit
7431dafb3a
@ -11,3 +11,11 @@ The [helm-values.yaml](./helm-values.yaml) file in this directory is used to
|
|||||||
generate the [cert-manager.yaml](./cert-manager.yaml) manifest.
|
generate the [cert-manager.yaml](./cert-manager.yaml) manifest.
|
||||||
|
|
||||||
They are automatically generated using `bazel run //hack:update-deploy-gen`.
|
They are automatically generated using `bazel run //hack:update-deploy-gen`.
|
||||||
|
|
||||||
|
The [cert-manager-no-webhook.yaml](./cert-manager-no-webhook.yaml) file should
|
||||||
|
only be used in cases where you are deploying to a cluster **older than v1.9**
|
||||||
|
or otherwise are not able to make use of ValidatingWebhookConfiguration
|
||||||
|
resources due to your apiserver not being configured properly.
|
||||||
|
For more information on the webhook component, please read the 'Resource
|
||||||
|
Validation Webhook' document under the 'Administrative tasks' section of the
|
||||||
|
documentation.
|
||||||
|
|||||||
276
deploy/manifests/cert-manager-no-webhook.yaml
Normal file
276
deploy/manifests/cert-manager-no-webhook.yaml
Normal file
@ -0,0 +1,276 @@
|
|||||||
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
name: certificates.certmanager.k8s.io
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
spec:
|
||||||
|
additionalPrinterColumns:
|
||||||
|
- JSONPath: .status.conditions[?(@.type=="Ready")].status
|
||||||
|
name: Ready
|
||||||
|
type: string
|
||||||
|
- JSONPath: .spec.secretName
|
||||||
|
name: Secret
|
||||||
|
type: string
|
||||||
|
- JSONPath: .spec.issuerRef.name
|
||||||
|
name: Issuer
|
||||||
|
type: string
|
||||||
|
priority: 1
|
||||||
|
- JSONPath: .status.conditions[?(@.type=="Ready")].message
|
||||||
|
name: Status
|
||||||
|
type: string
|
||||||
|
priority: 1
|
||||||
|
- JSONPath: .metadata.creationTimestamp
|
||||||
|
description: |-
|
||||||
|
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
|
||||||
|
|
||||||
|
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
|
group: certmanager.k8s.io
|
||||||
|
version: v1alpha1
|
||||||
|
scope: Namespaced
|
||||||
|
names:
|
||||||
|
kind: Certificate
|
||||||
|
plural: certificates
|
||||||
|
shortNames:
|
||||||
|
- cert
|
||||||
|
- certs
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
name: issuers.certmanager.k8s.io
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
spec:
|
||||||
|
group: certmanager.k8s.io
|
||||||
|
version: v1alpha1
|
||||||
|
names:
|
||||||
|
kind: Issuer
|
||||||
|
plural: issuers
|
||||||
|
scope: Namespaced
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
name: clusterissuers.certmanager.k8s.io
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
spec:
|
||||||
|
group: certmanager.k8s.io
|
||||||
|
version: v1alpha1
|
||||||
|
names:
|
||||||
|
kind: ClusterIssuer
|
||||||
|
plural: clusterissuers
|
||||||
|
scope: Cluster
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
name: orders.certmanager.k8s.io
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
spec:
|
||||||
|
additionalPrinterColumns:
|
||||||
|
- JSONPath: .status.state
|
||||||
|
name: State
|
||||||
|
type: string
|
||||||
|
- JSONPath: .spec.issuerRef.name
|
||||||
|
name: Issuer
|
||||||
|
type: string
|
||||||
|
priority: 1
|
||||||
|
- JSONPath: .status.reason
|
||||||
|
name: Reason
|
||||||
|
type: string
|
||||||
|
priority: 1
|
||||||
|
- JSONPath: .metadata.creationTimestamp
|
||||||
|
description: |-
|
||||||
|
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
|
||||||
|
|
||||||
|
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
|
group: certmanager.k8s.io
|
||||||
|
version: v1alpha1
|
||||||
|
names:
|
||||||
|
kind: Order
|
||||||
|
plural: orders
|
||||||
|
scope: Namespaced
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
name: challenges.certmanager.k8s.io
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
spec:
|
||||||
|
additionalPrinterColumns:
|
||||||
|
- JSONPath: .status.state
|
||||||
|
name: State
|
||||||
|
type: string
|
||||||
|
- JSONPath: .spec.dnsName
|
||||||
|
name: Domain
|
||||||
|
type: string
|
||||||
|
- JSONPath: .status.reason
|
||||||
|
name: Reason
|
||||||
|
type: string
|
||||||
|
- JSONPath: .metadata.creationTimestamp
|
||||||
|
description: |-
|
||||||
|
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
|
||||||
|
|
||||||
|
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
|
group: certmanager.k8s.io
|
||||||
|
version: v1alpha1
|
||||||
|
names:
|
||||||
|
kind: Challenge
|
||||||
|
plural: challenges
|
||||||
|
scope: Namespaced
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
|
labels:
|
||||||
|
certmanager.k8s.io/disable-validation: "true"
|
||||||
|
|
||||||
|
---
|
||||||
|
---
|
||||||
|
# Source: cert-manager/templates/serviceaccount.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
|
namespace: "cert-manager"
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
chart: cert-manager-v0.6.0-beta.2
|
||||||
|
release: cert-manager
|
||||||
|
heritage: Tiller
|
||||||
|
---
|
||||||
|
# Source: cert-manager/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
chart: cert-manager-v0.6.0-beta.2
|
||||||
|
release: cert-manager
|
||||||
|
heritage: Tiller
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["certmanager.k8s.io"]
|
||||||
|
resources: ["certificates", "issuers", "clusterissuers", "orders", "challenges"]
|
||||||
|
verbs: ["*"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps", "secrets", "events", "services", "pods"]
|
||||||
|
verbs: ["*"]
|
||||||
|
- apiGroups: ["extensions"]
|
||||||
|
resources: ["ingresses"]
|
||||||
|
verbs: ["*"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
chart: cert-manager-v0.6.0-beta.2
|
||||||
|
release: cert-manager
|
||||||
|
heritage: Tiller
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cert-manager
|
||||||
|
subjects:
|
||||||
|
- name: cert-manager
|
||||||
|
namespace: "cert-manager"
|
||||||
|
kind: ServiceAccount
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: cert-manager-view
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
chart: cert-manager-v0.6.0-beta.2
|
||||||
|
release: cert-manager
|
||||||
|
heritage: Tiller
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["certmanager.k8s.io"]
|
||||||
|
resources: ["certificates", "issuers"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: cert-manager-edit
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
chart: cert-manager-v0.6.0-beta.2
|
||||||
|
release: cert-manager
|
||||||
|
heritage: Tiller
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["certmanager.k8s.io"]
|
||||||
|
resources: ["certificates", "issuers"]
|
||||||
|
verbs: ["create", "delete", "deletecollection", "patch", "update"]
|
||||||
|
---
|
||||||
|
# Source: cert-manager/templates/deployment.yaml
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
|
namespace: "cert-manager"
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
chart: cert-manager-v0.6.0-beta.2
|
||||||
|
release: cert-manager
|
||||||
|
heritage: Tiller
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: cert-manager
|
||||||
|
release: cert-manager
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: cert-manager
|
||||||
|
release: cert-manager
|
||||||
|
annotations:
|
||||||
|
spec:
|
||||||
|
serviceAccountName: cert-manager
|
||||||
|
containers:
|
||||||
|
- name: cert-manager
|
||||||
|
image: "quay.io/jetstack/cert-manager-controller:v0.6.0-beta.0"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
args:
|
||||||
|
- --cluster-resource-namespace=$(POD_NAMESPACE)
|
||||||
|
- --leader-election-namespace=$(POD_NAMESPACE)
|
||||||
|
env:
|
||||||
|
- name: POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 32Mi
|
||||||
|
|
||||||
|
|
||||||
@ -29,6 +29,7 @@ KUBE_VERSION=1.9
|
|||||||
|
|
||||||
gen() {
|
gen() {
|
||||||
OUTPUT=$1
|
OUTPUT=$1
|
||||||
|
shift
|
||||||
TMP_OUTPUT=$(mktemp)
|
TMP_OUTPUT=$(mktemp)
|
||||||
mkdir -p "$(dirname ${OUTPUT})"
|
mkdir -p "$(dirname ${OUTPUT})"
|
||||||
helm template \
|
helm template \
|
||||||
@ -36,7 +37,8 @@ gen() {
|
|||||||
--values "${REPO_ROOT}/deploy/manifests/helm-values.yaml" \
|
--values "${REPO_ROOT}/deploy/manifests/helm-values.yaml" \
|
||||||
--kube-version "${KUBE_VERSION}" \
|
--kube-version "${KUBE_VERSION}" \
|
||||||
--namespace "cert-manager" \
|
--namespace "cert-manager" \
|
||||||
--name "cert-manager" > "${TMP_OUTPUT}"
|
--name "cert-manager" \
|
||||||
|
"$@" > "${TMP_OUTPUT}"
|
||||||
cat "${REPO_ROOT}/deploy/manifests/00-crds.yaml" \
|
cat "${REPO_ROOT}/deploy/manifests/00-crds.yaml" \
|
||||||
"${REPO_ROOT}/deploy/manifests/01-namespace.yaml" \
|
"${REPO_ROOT}/deploy/manifests/01-namespace.yaml" \
|
||||||
"${TMP_OUTPUT}" > "${OUTPUT}"
|
"${TMP_OUTPUT}" > "${OUTPUT}"
|
||||||
@ -46,3 +48,4 @@ export HELM_HOME="$(mktemp -d)"
|
|||||||
helm init --client-only
|
helm init --client-only
|
||||||
helm dep update "${REPO_ROOT}/deploy/charts/cert-manager"
|
helm dep update "${REPO_ROOT}/deploy/charts/cert-manager"
|
||||||
gen "${REPO_ROOT}/deploy/manifests/cert-manager.yaml"
|
gen "${REPO_ROOT}/deploy/manifests/cert-manager.yaml"
|
||||||
|
gen "${REPO_ROOT}/deploy/manifests/cert-manager-no-webhook.yaml" --set webhook.enabled=false
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user