Skip to content

Commit

Permalink
FIX deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrovgp committed Feb 6, 2025
1 parent 36e18c7 commit b496f43
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 85 deletions.
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
168 changes: 104 additions & 64 deletions manifests/v1beta1/installs/katib-cert-manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,109 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
resources:
# Namespace.
- ../../components/namespace
# Katib controller.
- ../../components/controller/
# Katib CRDs.
- ../../components/crd/
# Katib DB manager.
- ../../components/db-manager/
# Katib DB mysql.
- ../../components/mysql/
# Katib UI.
- ../../components/ui/
# Katib webhooks.
- ../../components/webhook/
# Cert-manager certificate for webhooks
- certificate.yaml
images:
- name: docker.io/kubeflowkatib/katib-controller
newName: docker.io/kubeflowkatib/katib-controller
newTag: latest
- name: docker.io/kubeflowkatib/katib-db-manager
newName: docker.io/kubeflowkatib/katib-db-manager
newTag: latest
- name: docker.io/kubeflowkatib/katib-ui
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

configurations:
- params.yaml

configMapGenerator:
- name: katib-config
behavior: create
files:
- katib-config.yaml
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:
disableNameSuffixHash: true
delimiter: /
index: 1
select:
kind: MutatingWebhookConfiguration
name: katib.kubeflow.org
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
34 changes: 21 additions & 13 deletions manifests/v1beta1/installs/katib-with-kubeflow/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ resources:
images:
- name: docker.io/kubeflowkatib/katib-controller
newName: docker.io/kubeflowkatib/katib-controller
newTag: latest
newTag: v0.17.0
- name: docker.io/kubeflowkatib/katib-db-manager
newName: docker.io/kubeflowkatib/katib-db-manager
newTag: latest
newTag: v0.17.0
- name: docker.io/kubeflowkatib/katib-ui
newName: docker.io/kubeflowkatib/katib-ui
newTag: latest

patchesStrategicMerge:
- patches/remove-namespace.yaml
newTag: v0.17.0

patches:
- path: patches/remove-namespace.yaml
# Extend RBAC permission list of katib-ui so it can
# create SubjectAccessReview resources.
- target:
Expand Down Expand Up @@ -54,14 +52,24 @@ patches:
namespace: kubeflow
path: patches/katib-mysql-service-select-app.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

0 comments on commit b496f43

Please sign in to comment.