Skip to content

Commit 7f71fe2

Browse files
committed
update kustomize syntax
1 parent 606f2b9 commit 7f71fe2

File tree

5 files changed

+30
-51
lines changed

5 files changed

+30
-51
lines changed

config/crd/kustomization.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
# since it depends on service name and namespace that are out of this kustomize package.
77
# It should be run by config/default
88
resources:
9-
- bases/kne.srlinux.dev_srlinuxes.yaml
9+
- bases/kne.srlinux.dev_srlinuxes.yaml
1010
#+kubebuilder:scaffold:crdkustomizeresource
1111

12-
patchesStrategicMerge:
1312
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1413
# patches here are for enabling the conversion webhook for each CRD
1514
#- patches/webhook_in_srlinuxes.yaml
@@ -22,4 +21,6 @@ patchesStrategicMerge:
2221

2322
# the following config is for teaching kustomize how to do kustomization for CRDs.
2423
configurations:
25-
- kustomizeconfig.yaml
24+
- kustomizeconfig.yaml
25+
apiVersion: kustomize.config.k8s.io/v1beta1
26+
kind: Kustomization

config/default/kustomization.yaml

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ namePrefix: srlinux-controller-
1616
#commonLabels:
1717
# someName: someValue
1818

19-
bases:
20-
- ../crd
21-
- ../rbac
22-
- ../manager
2319
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
2420
# crd/kustomization.yaml
2521
#- ../webhook
@@ -28,11 +24,9 @@ bases:
2824
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2925
#- ../prometheus
3026

31-
patchesStrategicMerge:
32-
# Protect the /metrics endpoint by putting it behind auth.
33-
# If you want your controller-manager to expose the /metrics
34-
# endpoint w/o any authn/z, please comment the following line.
35-
- manager_auth_proxy_patch.yaml
27+
# Protect the /metrics endpoint by putting it behind auth.
28+
# If you want your controller-manager to expose the /metrics
29+
# endpoint w/o any authn/z, please comment the following line.
3630

3731
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
3832
# crd/kustomization.yaml
@@ -44,31 +38,11 @@ patchesStrategicMerge:
4438
#- webhookcainjection_patch.yaml
4539

4640
# 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
41+
apiVersion: kustomize.config.k8s.io/v1beta1
42+
kind: Kustomization
43+
resources:
44+
- ../crd
45+
- ../rbac
46+
- ../manager
47+
patches:
48+
- path: manager_auth_proxy_patch.yaml

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ kind: Kustomization
1010
images:
1111
- name: controller
1212
newName: ghcr.io/srl-labs/srl-controller
13-
newTag: v0.7.0
13+
newTag: v0.7.1

config/prometheus/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44

55
resources:
66
- monitor.yaml
7+
apiVersion: kustomize.config.k8s.io/v1beta1
8+
kind: Kustomization

config/rbac/kustomization.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22
# Licensed under the BSD 3-Clause License.
33
# SPDX-License-Identifier: BSD-3-Clause
44

5-
resources:
65
# All RBAC will be applied under this service account in
76
# the deployment namespace. You may comment out this resource
87
# if your manager will use a service account that exists at
98
# runtime. Be sure to update RoleBinding and ClusterRoleBinding
109
# subjects if changing service account names.
11-
- service_account.yaml
12-
- role.yaml
13-
- role_binding.yaml
14-
- leader_election_role.yaml
15-
- leader_election_role_binding.yaml
1610
# Comment the following 4 lines if you want to disable
1711
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
1812
# which protects your /metrics endpoint.
19-
- auth_proxy_service.yaml
20-
- auth_proxy_role.yaml
21-
- auth_proxy_role_binding.yaml
22-
- auth_proxy_client_clusterrole.yaml
13+
resources:
14+
- service_account.yaml
15+
- role.yaml
16+
- role_binding.yaml
17+
- leader_election_role.yaml
18+
- leader_election_role_binding.yaml
19+
- auth_proxy_service.yaml
20+
- auth_proxy_role.yaml
21+
- auth_proxy_role_binding.yaml
22+
- auth_proxy_client_clusterrole.yaml
23+
apiVersion: kustomize.config.k8s.io/v1beta1
24+
kind: Kustomization

0 commit comments

Comments
 (0)