Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX deprecation warnings in kustomize 5 #2511

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ metadata:
name: katib-webhook-cert
spec:
isCA: true
commonName: $(KATIB_SERVICE_NAME).$(KATIB_NAMESPACE).svc
commonName: KATIB_SERVICE_NAME_PLACEHOLDER.KATIB_NAMESPACE_PLACEHOLDER.svc
dnsNames:
- $(KATIB_SERVICE_NAME).$(KATIB_NAMESPACE).svc
- $(KATIB_SERVICE_NAME).$(KATIB_NAMESPACE).svc.cluster.local
- KATIB_SERVICE_NAME_PLACEHOLDER.KATIB_NAMESPACE_PLACEHOLDER.svc
- KATIB_SERVICE_NAME_PLACEHOLDER.KATIB_NAMESPACE_PLACEHOLDER.svc.cluster.local
issuerRef:
kind: Issuer
name: katib-selfsigned-issuer
Expand Down
127 changes: 105 additions & 22 deletions manifests/v1beta1/installs/katib-cert-manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,115 @@ images:
newName: docker.io/kubeflowkatib/katib-ui
newTag: latest

patchesStrategicMerge:
- patches/katib-cert-injection.yaml

vars:
- fieldref:
fieldPath: metadata.namespace
name: KATIB_NAMESPACE
objref:
apiVersion: v1
kind: Service
name: katib-controller
- fieldref:
fieldPath: metadata.name
name: KATIB_SERVICE_NAME
objref:
apiVersion: v1
kind: Service
name: katib-controller
- name: KATIB_CERT_NAME
objref:
patches:
- path: patches/katib-cert-injection.yaml
replacements:
- source:
fieldPath: metadata.namespace
kind: Service
name: katib-controller
version: v1
targets:
- fieldPaths:
- spec.commonName
options:
delimiter: .
index: 1
select:
group: cert-manager.io
kind: Certificate
name: katib-webhook-cert
version: v1
- fieldPaths:
- spec.dnsNames.0
options:
delimiter: .
index: 1
select:
group: cert-manager.io
kind: Certificate
name: katib-webhook-cert
version: v1
- fieldPaths:
- spec.dnsNames.1
options:
delimiter: .
index: 1
select:
group: cert-manager.io
kind: Certificate
name: katib-webhook-cert
fieldref:
fieldpath: metadata.name
version: v1
- fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: /
index: 1
select:
kind: ValidatingWebhookConfiguration
name: katib.kubeflow.org
- fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: /
index: 1
select:
kind: MutatingWebhookConfiguration
name: katib.kubeflow.org
- source:
fieldPath: metadata.name
kind: Service
name: katib-controller
version: v1
targets:
- fieldPaths:
- spec.commonName
options:
delimiter: .
select:
group: cert-manager.io
kind: Certificate
name: katib-webhook-cert
version: v1
- fieldPaths:
- spec.dnsNames.0
options:
delimiter: .
select:
group: cert-manager.io
kind: Certificate
name: katib-webhook-cert
version: v1
- fieldPaths:
- spec.dnsNames.1
options:
delimiter: .
select:
group: cert-manager.io
kind: Certificate
name: katib-webhook-cert
version: v1
- source:
fieldPath: metadata.name
kind: Certificate
name: katib-webhook-cert
targets:
- fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: /
index: 1
select:
kind: ValidatingWebhookConfiguration
name: katib.kubeflow.org
- fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: /
index: 1
select:
kind: MutatingWebhookConfiguration
name: katib.kubeflow.org

configurations:
- params.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ kind: ValidatingWebhookConfiguration
metadata:
name: katib.kubeflow.org
annotations:
cert-manager.io/inject-ca-from: $(KATIB_NAMESPACE)/$(KATIB_CERT_NAME)
cert-manager.io/inject-ca-from: KATIB_NAMESPACE_PLACEHOLDER/KATIB_CERT_NAME_PLACEHOLDER
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: katib.kubeflow.org
annotations:
cert-manager.io/inject-ca-from: $(KATIB_NAMESPACE)/$(KATIB_CERT_NAME)
cert-manager.io/inject-ca-from: KATIB_NAMESPACE_PLACEHOLDER/KATIB_CERT_NAME_PLACEHOLDER
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ images:
- name: docker.io/kubeflowkatib/katib-ui
newName: docker.io/kubeflowkatib/katib-ui
newTag: latest
patchesStrategicMerge:
- patches/db-manager.yaml
patches:
- path: patches/db-manager.yaml
# Modify katib-mysql-secrets with parameters for the DB.
secretGenerator:
- name: katib-mysql-secrets
Expand Down
28 changes: 18 additions & 10 deletions manifests/v1beta1/installs/katib-with-kubeflow/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ images:
newName: docker.io/kubeflowkatib/katib-ui
newTag: latest

patchesStrategicMerge:
- patches/remove-namespace.yaml

patches:
- path: patches/remove-namespace.yaml
# Extend RBAC permission list of katib-ui so it can
# create SubjectAccessReview resources.
- target:
Expand All @@ -43,14 +41,24 @@ patches:
name: katib-ui
path: patches/istio-sidecar-injection.yaml

vars:
- fieldref:
fieldPath: metadata.namespace
name: KATIB_UI_NAMESPACE
objref:
apiVersion: apps/v1
kind: Deployment
replacements:
- source:
fieldPath: metadata.namespace
group: apps
kind: Deployment
name: katib-ui
version: v1
targets:
- fieldPaths:
- spec.http.0.route.0.destination.host
options:
delimiter: .
index: 1
select:
group: networking.istio.io
kind: VirtualService
name: katib-ui
version: v1alpha3

configurations:
- params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ spec:
uri: /katib/
route:
- destination:
host: katib-ui.$(KATIB_UI_NAMESPACE).svc.cluster.local
host: katib-ui.KATIB_UI_NAMESPACE_PLACEHOLDER.svc.cluster.local
port:
number: 80
Loading