-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- make controller a Deployment instead of StatefulSet - switch to new certmanager API - fix permissions for leader election - fix webhook service account - fix webhook port
- Loading branch information
Showing
19 changed files
with
195 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
# The following manifests contain a self-signed issuer CR and a certificate CR. | ||
# More document can be found at https://docs.cert-manager.io | ||
apiVersion: certmanager.k8s.io/v1alpha1 | ||
# WARNING: Targets CertManager v1.0. Check https://cert-manager.io/docs/installation/upgrading/ for breaking changes. | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: issuer | ||
app.kubernetes.io/instance: selfsigned-issuer | ||
app.kubernetes.io/component: certificate | ||
app.kubernetes.io/created-by: project | ||
app.kubernetes.io/part-of: project | ||
app.kubernetes.io/managed-by: kustomize | ||
name: selfsigned-issuer | ||
namespace: system | ||
spec: | ||
selfSigned: {} | ||
--- | ||
apiVersion: certmanager.k8s.io/v1alpha1 | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: certificate | ||
app.kubernetes.io/instance: serving-cert | ||
app.kubernetes.io/component: certificate | ||
app.kubernetes.io/created-by: project | ||
app.kubernetes.io/part-of: project | ||
app.kubernetes.io/managed-by: kustomize | ||
name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml | ||
namespace: system | ||
spec: | ||
# $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize | ||
commonName: $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc | ||
dnsNames: | ||
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc | ||
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local | ||
issuerRef: | ||
kind: Issuer | ||
name: selfsigned-issuer | ||
secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize | ||
secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# This configuration is for teaching kustomize how to update name ref and var substitution | ||
nameReference: | ||
- kind: Issuer | ||
group: certmanager.k8s.io | ||
group: cert-manager.io | ||
fieldSpecs: | ||
- kind: Certificate | ||
group: certmanager.k8s.io | ||
group: cert-manager.io | ||
path: spec/issuerRef/name | ||
|
||
varReference: | ||
- kind: Certificate | ||
group: certmanager.k8s.io | ||
group: cert-manager.io | ||
path: spec/commonName | ||
- kind: Certificate | ||
group: certmanager.k8s.io | ||
path: spec/dnsNames | ||
group: cert-manager.io | ||
path: spec/dnsNames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,54 @@ | ||
# This patch inject a sidecar container which is a HTTP proxy for the controller manager, | ||
# it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. | ||
# This patch inject a sidecar container which is a HTTP proxy for the | ||
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
spec: | ||
template: | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- amd64 | ||
- arm64 | ||
- ppc64le | ||
- s390x | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: | ||
- linux | ||
containers: | ||
- name: kube-rbac-proxy | ||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0 | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- "ALL" | ||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 | ||
args: | ||
- "--secure-listen-address=0.0.0.0:8443" | ||
- "--upstream=http://127.0.0.1:8080/" | ||
- "--logtostderr=true" | ||
- "--v=10" | ||
- "--v=0" | ||
ports: | ||
- containerPort: 8443 | ||
protocol: TCP | ||
name: https | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
requests: | ||
cpu: 5m | ||
memory: 64Mi | ||
- name: manager | ||
args: | ||
- "--metrics-bind-address=127.0.0.1:8080" | ||
- "--leader-elect" | ||
- "--leader-elect" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.