Skip to content

Commit 41e43ea

Browse files
dimakisanishasthana
authored andcommitted
refactor: updates to the makefile, along with kustomize updates
1 parent 4595dbc commit 41e43ea

File tree

3 files changed

+18
-38
lines changed

3 files changed

+18
-38
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ endif
101101

102102
.PHONY: install
103103
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
104-
$(KUSTOMIZE) build config/crd | kubectl apply -f -
104+
$(KUSTOMIZE) build config/default | kubectl apply -f -
105105

106106
.PHONY: uninstall
107107
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
108-
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
108+
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
109109

110110
.PHONY: deploy
111111
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.

config/default/kustomization.yaml

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ namePrefix: instascale-1-
1212
#commonLabels:
1313
# someName: someValue
1414

15-
bases:
16-
- ../crd
17-
- ../rbac
18-
- ../manager
15+
# - ../crd
1916
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
2017
# crd/kustomization.yaml
2118
#- ../webhook
@@ -24,11 +21,9 @@ bases:
2421
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2522
#- ../prometheus
2623

27-
patchesStrategicMerge:
2824
# Protect the /metrics endpoint by putting it behind auth.
2925
# If you want your controller-manager to expose the /metrics
3026
# endpoint w/o any authn/z, please comment the following line.
31-
- manager_auth_proxy_patch.yaml
3227

3328
# Mount the controller config file for loading manager configurations
3429
# through a ComponentConfig type
@@ -44,31 +39,10 @@ patchesStrategicMerge:
4439
#- webhookcainjection_patch.yaml
4540

4641
# the following config is for teaching kustomize how to do var substitution
47-
vars:
48-
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
49-
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
50-
# objref:
51-
# kind: Certificate
52-
# group: cert-manager.io
53-
# version: v1
54-
# name: serving-cert # this name should match the one in certificate.yaml
55-
# fieldref:
56-
# fieldpath: metadata.namespace
57-
#- name: CERTIFICATE_NAME
58-
# objref:
59-
# kind: Certificate
60-
# group: cert-manager.io
61-
# version: v1
62-
# name: serving-cert # this name should match the one in certificate.yaml
63-
#- name: SERVICE_NAMESPACE # namespace of the service
64-
# objref:
65-
# kind: Service
66-
# version: v1
67-
# name: webhook-service
68-
# fieldref:
69-
# fieldpath: metadata.namespace
70-
#- name: SERVICE_NAME
71-
# objref:
72-
# kind: Service
73-
# version: v1
74-
# name: webhook-service
42+
apiVersion: kustomize.config.k8s.io/v1beta1
43+
kind: Kustomization
44+
resources:
45+
- ../rbac
46+
- ../manager
47+
patches:
48+
- path: manager_auth_proxy_patch.yaml

config/manager/kustomization.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ generatorOptions:
55
disableNameSuffixHash: true
66

77
configMapGenerator:
8-
- name: manager-config
9-
files:
8+
- files:
109
- controller_manager_config.yaml
10+
name: manager-config
11+
apiVersion: kustomize.config.k8s.io/v1beta1
12+
kind: Kustomization
13+
images:
14+
- name: controller
15+
newName: controller
16+
newTag: latest

0 commit comments

Comments
 (0)