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

Katib manifests #6

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion charts/kubeflow/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.2.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
300 changes: 300 additions & 0 deletions charts/kubeflow/templates/_helpers/kubeflow.katib.controller.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
{{/*
Kubeflow Katib Controller object names.
*/}}
{{- define "kubeflow.katib.controller.baseName" -}}
{{- printf "katib-controller" }}
{{- end }}

{{- define "kubeflow.katib.controller.name" -}}
{{- include "kubeflow.component.name" (
list
(include "kubeflow.katib.controller.baseName" .)
.
)}}
{{- end }}

{{- define "kubeflow.katib.controller.serviceAccountName" -}}
{{- include "kubeflow.component.serviceAccountName" (
list
(include "kubeflow.katib.controller.name" .)
.Values.katib.controller.serviceAccount
)}}
{{- end }}

{{- define "kubeflow.katib.controller.serviceAccountPrincipal" -}}
{{- include "kubeflow.component.serviceAccountPrincipal" (
list
.
(include "kubeflow.katib.controller.serviceAccountName" .)
)}}
{{- end }}

{{- define "kubeflow.katib.controller.mainClusterRoleName" -}}
{{- include "kubeflow.katib.controller.name" . }}
{{- end }}

{{- define "kubeflow.katib.controller.mainClusterRoleBindingName" -}}
{{- include "kubeflow.katib.controller.mainClusterRoleName" . }}
{{- end }}

{{- define "kubeflow.katib.controller.leaderElectionRoleName" -}}
{{- printf "%s-%s-%s"
(include "kubeflow.fullname" .)
(include "kubeflow.katib.controller.name" .)
"leader-election"
}}
{{- end }}

{{- define "kubeflow.katib.controller.leaderElectionRoleBindingName" -}}
{{- include "kubeflow.katib.controller.leaderElectionRoleName" . }}
{{- end }}

{{- define "kubeflow.katib.controller.kfNbAdminClusterRoleName" -}}
{{- printf "%s-%s" (include "kubeflow.fullname" .) "katib-admin" }}
{{- end }}

{{- define "kubeflow.katib.controller.kfNbEditClusterRoleName" -}}
{{- printf "%s-%s" (include "kubeflow.fullname" .) "katib-edit" }}
{{- end }}

{{- define "kubeflow.katib.controller.kfNbViewClusterRoleName" -}}
{{- printf "%s-%s" (include "kubeflow.fullname" .) "katib-view" }}
{{- end }}

{{/*
Role Aggregation Rule Labels
*/}}
{{- define "kubeflow.katib.controller.kfNbAdminClusterRoleLabel" -}}
{{- include "kubeflow.aggregationRule.labelBase" (include "kubeflow.katib.controller.kfNbAdminClusterRoleName" .) -}}
{{- end }}

{{/*
Kubeflow Katib Controller Service.
*/}}
{{- define "kubeflow.katib.controller.svc.name" -}}
{{ include "kubeflow.component.svc.name" (
include "kubeflow.katib.controller.name" .
)}}
{{- end }}

{{- define "kubeflow.katib.controller.svc.addressWithNs" -}}
{{ include "kubeflow.component.svc.addressWithNs" (
list
.
(include "kubeflow.katib.controller.name" .)
)}}
{{- end }}

{{- define "kubeflow.katib.controller.svc.addressWithSvc" -}}
{{ include "kubeflow.component.svc.addressWithSvc" (
list
.
(include "kubeflow.katib.controller.name" .)
)}}
{{- end }}

{{- define "kubeflow.katib.controller.svc.fqdn" -}}
{{ include "kubeflow.component.svc.fqdn" (
list
.
(include "kubeflow.katib.controller.name" .)
)}}
{{- end }}

{{/*
Kubeflow Katib Controller object labels.
*/}}
{{- define "kubeflow.katib.controller.labels" -}}
{{ include "kubeflow.common.labels" . }}
{{ include "kubeflow.component.labels" (include "kubeflow.katib.name" .) }}
{{ include "kubeflow.component.subcomponent.labels" (include "kubeflow.katib.controller.name" .) }}
{{- end }}

{{- define "kubeflow.katib.controller.selectorLabels" -}}
{{ include "kubeflow.common.selectorLabels" . }}
{{ include "kubeflow.component.selectorLabels" (include "kubeflow.katib.name" .) }}
{{ include "kubeflow.component.subcomponent.labels" (include "kubeflow.katib.controller.name" .) }}
{{- end }}

{{/*
Kubeflow Katib Controller container image settings.
*/}}
{{- define "kubeflow.katib.controller.image" -}}
{{ include "kubeflow.component.image" (
list
.Values.defaults.image
.Values.katib.controller.image
)}}
{{- end }}

{{- define "kubeflow.katib.controller.imagePullPolicy" -}}
{{ include "kubeflow.component.imagePullPolicy" (
list
.Values.defaults.image
.Values.katib.controller.image
)}}
{{- end }}

{{/*
Kubeflow Katib Controller Autoscaling and Availability.
*/}}
{{- define "kubeflow.katib.controller.autoscaling.minReplicas" -}}
{{ include "kubeflow.component.autoscaling.minReplicas" (
list
.Values.defaults.autoscaling
.Values.katib.controller.autoscaling
)}}
{{- end }}

{{- define "kubeflow.katib.controller.autoscaling.maxReplicas" -}}
{{ include "kubeflow.component.autoscaling.maxReplicas" (
list
.Values.defaults.autoscaling
.Values.katib.controller.autoscaling
)}}
{{- end }}

{{- define "kubeflow.katib.controller.autoscaling.targetCPUUtilizationPercentage" -}}
{{ include "kubeflow.component.autoscaling.targetCPUUtilizationPercentage" (
list
.Values.defaults.autoscaling
.Values.katib.controller.autoscaling
)}}
{{- end }}

{{- define "kubeflow.katib.controller.autoscaling.targetMemoryUtilizationPercentage" -}}
{{ include "kubeflow.component.autoscaling.targetMemoryUtilizationPercentage" (
list
.Values.defaults.autoscaling
.Values.katib.controller.autoscaling
)}}
{{- end }}

{{- define "kubeflow.katib.controller.pdb.values" -}}
{{- include "kubeflow.component.pdb.values" (
list
.Values.defaults.podDisruptionBudget
.Values.katib.controller.podDisruptionBudget
)}}
{{- end }}

{{/*
Kubeflow Katib Controller Security Context.
*/}}
{{- define "kubeflow.katib.controller.containerSecurityContext" -}}
{{ include "kubeflow.component.containerSecurityContext" (
list
.Values.defaults.containerSecurityContext
.Values.katib.controller.containerSecurityContext
)}}
{{- end }}

{{/*
Kubeflow Katib Controller Scheduling.
*/}}
{{- define "kubeflow.katib.controller.topologySpreadConstraints" -}}
{{ include "kubeflow.component.topologySpreadConstraints" (
list
.Values.defaults.topologySpreadConstraints
.Values.katib.controller.topologySpreadConstraints
)}}
{{- end }}

{{- define "kubeflow.katib.controller.nodeSelector" -}}
{{ include "kubeflow.component.nodeSelector" (
list
.Values.defaults.nodeSelector
.Values.katib.controller.nodeSelector
)}}
{{- end }}

{{- define "kubeflow.katib.controller.tolerations" -}}
{{ include "kubeflow.component.tolerations" (
list
.Values.defaults.tolerations
.Values.katib.controller.tolerations
)}}
{{- end }}

{{- define "kubeflow.katib.controller.affinity" -}}
{{ include "kubeflow.component.affinity" (
list
.Values.defaults.affinity
.Values.katib.controller.affinity
)}}
{{- end }}

{{/*
Kubeflow Katib Controller enable and create toggles.
*/}}
{{- define "kubeflow.katib.controller.enabled" -}}
{{- ternary true "" (
and
(include "kubeflow.katib.enabled" . | eq "true")
.Values.katib.controller.enabled
)}}
{{- end }}

{{- define "kubeflow.katib.controller.autoscaling.enabled" -}}
{{ include "kubeflow.component.autoscaling.enabled" (
list
.Values.defaults.autoscaling
.Values.katib.controller.autoscaling
)}}
{{- end }}

{{- define "kubeflow.katib.controller.rbac.createRoles" -}}
{{- ternary true "" (
and
(include "kubeflow.katib.controller.enabled" . | eq "true")
.Values.katib.controller.rbac.create
)}}
{{- end }}

{{- define "kubeflow.katib.controller.createServiceAccount" -}}
{{- ternary true "" (
and
(include "kubeflow.katib.controller.enabled" . | eq "true")
.Values.katib.controller.serviceAccount.create
)}}
{{- end }}

{{- define "kubeflow.katib.controller.pdb.create" -}}
{{- include "kubeflow.component.pdb.create" (
list
(include "kubeflow.katib.controller.enabled" .)
.Values.defaults.podDisruptionBudget
.Values.katib.controller.podDisruptionBudget
)}}
{{- end }}

{{/*
Kubeflow Katib Controller certificate manager.
*/}}
{{- define "kubeflow.katib.controller.enabledWithCertManager" -}}
{{- ternary true "" (
and
(include "kubeflow.katib.controller.enabled" . | eq "true" )
(include "kubeflow.certManagerIntegration.enabled" . | eq "true" )
)}}
{{- end }}

{{- define "kubeflow.katib.controller.certIssuerName" -}}
{{ printf "%s-%s" (include "kubeflow.katib.controller.name" .) "selfsigned-issuer" }}
{{- end }}

{{- define "kubeflow.katib.controller.tlsCertSecretName" -}}
{{ printf "%s-%s" (include "kubeflow.katib.controller.name" .) "tls-certs" }}
{{- end }}

{{- define "kubeflow.katib.controller.validatingWebhookName" -}}
{{ printf "%s-%s" (include "kubeflow.katib.controller.name" .) "validating" }}
{{- end }}

{{- define "kubeflow.katib.controller.mutatingWebhookName" -}}
{{ printf "%s-%s" (include "kubeflow.katib.controller.name" .) "mutating" }}
{{- end }}

{{- define "kubeflow.katib.controller.certName" -}}
{{ printf "%s-%s" (include "kubeflow.katib.controller.name" .) "cert" }}
{{- end }}
Loading