Skip to content

Commit

Permalink
Simplify and add prefix to names
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinvaneyk committed Dec 24, 2019
1 parent dee2160 commit d7b343c
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 255 deletions.
25 changes: 0 additions & 25 deletions config/certmanager/certificate.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions config/certmanager/kustomization.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions config/certmanager/kustomizeconfig.yaml

This file was deleted.

71 changes: 2 additions & 69 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,73 +1,6 @@
# Adds namespace to all resources.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default

# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: cert-completer-

# Labels to add to all resources and selectors.
#commonLabels:
# someName: someValue

bases:
- ../rbac
- ../manager
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in crd/kustomization.yaml
#- ../webhook
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
#- ../certmanager
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus

patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
# Only one of manager_auth_proxy_patch.yaml and
# manager_prometheus_metrics_patch.yaml should be enabled.
#- manager_auth_proxy_patch.yaml
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, uncomment the following line and
# comment manager_auth_proxy_patch.yaml.
# Only one of manager_auth_proxy_patch.yaml and
# manager_prometheus_metrics_patch.yaml should be enabled.
#- manager_prometheus_metrics_patch.yaml

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in crd/kustomization.yaml
#- manager_webhook_patch.yaml

# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
# 'CERTMANAGER' needs to be enabled to use ca injection
#- webhookcainjection_patch.yaml

# the following config is for teaching kustomize how to do var substitution
vars:
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
# objref:
# kind: Certificate
# group: cert-manager.io
# version: v1alpha2
# name: serving-cert # this name should match the one in certificate.yaml
# fieldref:
# fieldpath: metadata.namespace
#- name: CERTIFICATE_NAME
# objref:
# kind: Certificate
# group: cert-manager.io
# version: v1alpha2
# name: serving-cert # this name should match the one in certificate.yaml
#- name: SERVICE_NAMESPACE # namespace of the service
# objref:
# kind: Service
# version: v1
# name: webhook-service
# fieldref:
# fieldpath: metadata.namespace
#- name: SERVICE_NAME
# objref:
# kind: Service
# version: v1
# name: webhook-service
25 changes: 0 additions & 25 deletions config/default/manager_auth_proxy_patch.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions config/default/manager_webhook_patch.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions config/default/webhookcainjection_patch.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: cert-completer-controller-manager
namespace: system
labels:
control-plane: controller-manager
control-plane: cert-completer-controller-manager
spec:
selector:
matchLabels:
control-plane: controller-manager
control-plane: cert-completer-controller-manager
replicas: 1
template:
metadata:
labels:
control-plane: controller-manager
control-plane: cert-completer-controller-manager
spec:
containers:
- command:
Expand Down
2 changes: 0 additions & 2 deletions config/prometheus/kustomization.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions config/prometheus/monitor.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions config/rbac/auth_proxy_role.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/rbac/auth_proxy_role_binding.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions config/rbac/auth_proxy_service.yaml

This file was deleted.

8 changes: 1 addition & 7 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@ resources:
- role.yaml
- role_binding.yaml
- leader_election_role.yaml
- leader_election_role_binding.yaml
# Comment the following 3 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- leader_election_role_binding.yaml
2 changes: 1 addition & 1 deletion config/rbac/leader_election_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: leader-election-role
name: cert-completer-leader-election-role
rules:
- apiGroups:
- ""
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: leader-election-rolebinding
name: cert-completer-leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
name: cert-completer-leader-election-role
subjects:
- kind: ServiceAccount
name: default
Expand Down
5 changes: 1 addition & 4 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
name: cert-completer-manager-role
rules:
- apiGroups:
- ""
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: manager-rolebinding
name: cert-completer-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: manager-role
name: cert-completer-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: system
name: default
Empty file removed config/webhook/manifests.yaml
Empty file.

0 comments on commit d7b343c

Please sign in to comment.