Skip to content
Closed
Show file tree
Hide file tree
Changes from 13 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
31 changes: 31 additions & 0 deletions .github/workflows/helm_charts_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test Helm Charts
on:
pull_request:
paths:
- experimental/helm/kubeflow/**
- experimental/helm/scripts/**
- .github/workflows/helm_charts_test.yaml

jobs:
test-helm-charts:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Helm
run: |
./tests/helm_install.sh

- name: Run Helm Chart Tests
run: |
cd experimental/helm
./scripts/test-helm-charts.sh

- name: Upload artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: helm-test-logs
path: /tmp/helm-test-*.log
52 changes: 52 additions & 0 deletions .github/workflows/helm_vs_kustomize_verification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Verify Helm vs Kustomize Manifests

on:
pull_request:
paths:
- tests/install_KinD_create_KinD_cluster_install_kustomize.sh
- tests/helm_install.sh
- .github/workflows/helm_vs_kustomize_verification.yaml
- apps/spark/spark-operator/**
- apps/centraldashboard/**
- common/cert-manager/**
- experimental/helm/kubeflow/**
- experimental/helm/scripts/**
- tests/helm_kustomize_compare_manifests.sh
- tests/helm_kustomize_compare_manifests.py

jobs:
verify-components:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
component: [spark-operator, cert-manager, centraldashboard, centraldashboard-istio, centraldashboard-kserve, centraldashboard-oauth2-proxy]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install KinD, Create KinD cluster and Install kustomize
run: |
chmod +x tests/install_KinD_create_KinD_cluster_install_kustomize.sh
./tests/install_KinD_create_KinD_cluster_install_kustomize.sh

- name: Install Helm
run: |
chmod +x tests/helm_install.sh
./tests/helm_install.sh

- name: Run Helm vs Kustomize verification for ${{ matrix.component }}
run: |
chmod +x tests/helm_kustomize_compare_manifests.sh
./tests/helm_kustomize_compare_manifests.sh ${{ matrix.component }}

- name: Upload artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.component }}-manifest-comparison-artifacts
path: |
/tmp/kustomize-${{ matrix.component }}.yaml
/tmp/helm-aio-${{ matrix.component }}.yaml
7 changes: 7 additions & 0 deletions experimental/helm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Helm dependency charts
**/charts/*.tgz
**/Chart.lock

# Helm temporary files
*.tmp
*.backup
6 changes: 6 additions & 0 deletions experimental/helm/kubeflow/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: kubeflow
description: All-in-One Helm chart for deploying Kubeflow Platform
type: application
version: 0.1.0
appVersion: "1.10.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master instead of 1.10.0 i assume

77 changes: 77 additions & 0 deletions experimental/helm/kubeflow/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "kubeflow.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "kubeflow.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kubeflow.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "kubeflow.labels" -}}
helm.sh/chart: {{ include "kubeflow.chart" . }}
{{ include "kubeflow.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "kubeflow.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kubeflow.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Get the namespace for Kubeflow components
*/}}
{{- define "kubeflow.namespace" -}}
{{- .Values.global.kubeflowNamespace | default "kubeflow" }}
{{- end }}

{{/*
Get the namespace for Istio components
*/}}
{{- define "kubeflow.istioNamespace" -}}
{{- .Values.global.istioNamespace | default "istio-system" }}
{{- end }}

{{/*
Get the namespace for cert-manager components
*/}}
{{- define "kubeflow.certManagerNamespace" -}}
{{- .Values.global.certManagerNamespace | default "cert-manager" }}
{{- end }}

{{/*
Get the domain for Kubeflow
*/}}
{{- define "kubeflow.domain" -}}
{{- .Values.global.domain | default "example.com" }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if and .Values.centraldashboard.enabled .Values.centraldashboard.istio.enabled }}
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: central-dashboard
namespace: {{ .Values.global.kubeflowNamespace }}
labels:
app: centraldashboard
app.kubernetes.io/component: centraldashboard
app.kubernetes.io/name: centraldashboard
kustomize.component: centraldashboard
spec:
action: ALLOW
rules:
- from:
- source:
principals:
- cluster.local/ns/{{ .Values.global.istioNamespace }}/sa/istio-ingressgateway-service-account
selector:
matchLabels:
app: centraldashboard
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.centraldashboard.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: centraldashboard
labels:
app: centraldashboard
app.kubernetes.io/component: centraldashboard
app.kubernetes.io/name: centraldashboard
kustomize.component: centraldashboard
rules:
- apiGroups:
- ""
resources:
- events
- namespaces
- nodes
verbs:
- get
- list
- watch
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.centraldashboard.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: centraldashboard
labels:
app: centraldashboard
app.kubernetes.io/component: centraldashboard
app.kubernetes.io/name: centraldashboard
kustomize.component: centraldashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: centraldashboard
subjects:
- kind: ServiceAccount
name: centraldashboard
namespace: {{ .Values.global.kubeflowNamespace }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.centraldashboard.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: centraldashboard-parameters
namespace: {{ .Values.global.kubeflowNamespace }}
labels:
app: centraldashboard
app.kubernetes.io/component: centraldashboard
app.kubernetes.io/name: centraldashboard
kustomize.component: centraldashboard
data:
CD_CLUSTER_DOMAIN: {{ .Values.centraldashboard.config.clusterDomain | quote }}
CD_USERID_HEADER: {{ .Values.centraldashboard.config.useridHeader | quote }}
CD_USERID_PREFIX: {{ .Values.centraldashboard.config.useridPrefix | quote }}
CD_REGISTRATION_FLOW: {{ .Values.centraldashboard.config.registrationFlow | quote }}
CD_COLLECT_METRICS: {{ .Values.centraldashboard.config.collectMetrics | quote }}
{{- end }}
Loading
Loading