Skip to content

Commit 7465483

Browse files
author
Misha6Sharma
committed
Fixing in kubeflow/dashboard
1 parent f4aa50b commit 7465483

File tree

5 files changed

+63
-64
lines changed

5 files changed

+63
-64
lines changed

components/poddefaults-webhooks/manifests/overlays/cert-manager/kustomization.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@
44
# the certificate.
55
# TODO(jlewi): We should eventually refactor the manifests to delete
66
# bootstrap and use certmanager by default.
7-
bases:
7+
resources:
88
- ../../base
99

10+
1011
resources:
1112
- certificate.yaml
1213

1314
namespace: kubeflow
1415

15-
commonLabels:
16+
labels:
1617
app: poddefaults
1718
kustomize.component: poddefaults
1819
app.kubernetes.io/component: poddefaults
1920
app.kubernetes.io/name: poddefaults
2021

21-
patchesStrategicMerge:
22-
- mutating-webhook-configuration.yaml
23-
- deployment.yaml
22+
patches:
23+
- path: mutating-webhook-configuration.yaml
24+
- path: deployment.yaml
2425

2526
generatorOptions:
2627
disableNameSuffixHash: true

components/profile-controller/config/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
66
kind: Kustomization
77
resources:
88
- ../default
9-
patchesStrategicMerge:
10-
- patches/manager.yaml
9+
patches:
10+
patches:
11+
- path: patches/manager.yaml
12+
1113

1214
images:
1315
- name: ghcr.io/kubeflow/dashboard/profile-controller
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
# This kustomization.yaml is not intended to be run by itself,
22
# since it depends on service name and namespace that are out of this kustomize package.
3-
# It should be run by config/default
3+
# It should be run by config/default.
4+
45
resources:
5-
- bases/kubeflow.org_profiles.yaml
6+
- bases/kubeflow.org_profiles.yaml
67
#+kubebuilder:scaffold:crdkustomizeresource
78

8-
patchesStrategicMerge:
9-
- patches/trivial_conversion_patch.yaml
10-
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
11-
# patches here are for enabling the conversion webhook for each CRD
12-
#- patches/webhook_in_profiles.yaml
9+
patches:
10+
- path: patches/trivial_conversion_patch.yaml
11+
# Enable webhook conversion for CRD
12+
- path: patches/webhook_in_profiles.yaml
13+
# Enable CA injection for CRD using cert-manager
14+
- path: patches/cainjection_in_profiles.yaml
1315
#+kubebuilder:scaffold:crdkustomizewebhookpatch
14-
15-
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
16-
# patches here are for enabling the CA injection for each CRD
17-
#- patches/cainjection_in_profiles.yaml
1816
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
1917

20-
# the following config is for teaching kustomize how to do kustomization for CRDs.
18+
# This configuration teaches Kustomize how to process CRDs.
2119
configurations:
22-
- kustomizeconfig.yaml
20+
- kustomizeconfig.yaml
Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Adds namespace to all resources.
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
24
namespace: profiles-system
35

46
# Value of this field is prepended to the
@@ -9,10 +11,10 @@ namespace: profiles-system
911
namePrefix: profiles-
1012

1113
# Labels to add to all resources and selectors.
12-
commonLabels:
14+
labels:
1315
kustomize.component: profiles
1416

15-
bases:
17+
resources:
1618
- ../crd
1719
- ../rbac
1820
- ../manager
@@ -24,7 +26,7 @@ bases:
2426
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2527
#- ../prometheus
2628

27-
patchesStrategicMerge:
29+
patches:
2830
# Protect the /metrics endpoint by putting it behind auth.
2931
# If you want your controller-manager to expose the /metrics
3032
# endpoint w/o any authn/z, please comment the following line.
@@ -45,32 +47,20 @@ patchesStrategicMerge:
4547
# 'CERTMANAGER' needs to be enabled to use ca injection
4648
#- webhookcainjection_patch.yaml
4749

48-
# the following config is for teaching kustomize how to do var substitution
49-
vars:
50-
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
51-
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
52-
# objref:
53-
# kind: Certificate
54-
# group: cert-manager.io
55-
# version: v1
56-
# name: serving-cert # this name should match the one in certificate.yaml
57-
# fieldref:
58-
# fieldpath: metadata.namespace
59-
#- name: CERTIFICATE_NAME
60-
# objref:
61-
# kind: Certificate
62-
# group: cert-manager.io
63-
# version: v1
64-
# name: serving-cert # this name should match the one in certificate.yaml
65-
#- name: SERVICE_NAMESPACE # namespace of the service
66-
# objref:
67-
# kind: Service
68-
# version: v1
69-
# name: webhook-service
70-
# fieldref:
71-
# fieldpath: metadata.namespace
72-
#- name: SERVICE_NAME
73-
# objref:
74-
# kind: Service
75-
# version: v1
76-
# name: webhook-service
50+
# The following config is for teaching Kustomize how to perform replacements
51+
replacements:
52+
# [CERTMANAGER] Uncomment if enabling cert-manager.
53+
# - source:
54+
# kind: Certificate
55+
# group: cert-manager.io
56+
# version: v1
57+
# name: serving-cert
58+
# fieldPath: metadata.namespace
59+
# targets:
60+
# - select:
61+
# kind: MutatingWebhookConfiguration
62+
# fieldPaths:
63+
# - metadata.annotations.[cert-manager.io/inject-ca-from]
64+
# options:
65+
# delimiter: /
66+
# index: 0

components/profile-controller/config/overlays/kubeflow/kustomization.yaml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
namespace: kubeflow
4+
45
resources:
56
- ../../base
67
- service.yaml
78
- virtual-service.yaml
89
- authorizationpolicy.yaml
910

10-
commonLabels:
11-
kustomize.component: profiles
11+
labels:
12+
- includeSelectors: true
13+
pairs:
14+
kustomize.component: profiles
1215

13-
patchesStrategicMerge:
14-
- patches/kfam.yaml
15-
- patches/remove-namespace.yaml
16+
patches:
17+
- path: patches/kfam.yaml
18+
- path: patches/remove-namespace.yaml
1619

1720
configurations:
1821
- params.yaml
1922

20-
vars:
21-
- name: PROFILES_NAMESPACE
22-
fieldref:
23-
fieldpath: metadata.namespace
24-
objref:
25-
name: profiles-kfam
23+
replacements:
24+
- source:
25+
fieldPath: metadata.namespace
2626
kind: Service
27-
apiVersion: v1
27+
name: profiles-kfam
28+
version: v1
29+
targets:
30+
- fieldPaths:
31+
- metadata.namespace
32+
select:
33+
kind: Service
34+
name: profiles-kfam
35+
version: v1
2836

2937
images:
3038
- name: ghcr.io/kubeflow/dashboard/access-management

0 commit comments

Comments
 (0)