diff --git a/kubevirt-dashboard-extension-chart/Chart.yaml b/kubevirt-dashboard-extension-chart/Chart.yaml new file mode 100644 index 0000000..9e98d54 --- /dev/null +++ b/kubevirt-dashboard-extension-chart/Chart.yaml @@ -0,0 +1,20 @@ +#!BuildTag: %%IMG_PREFIX%%kubevirt-dashboard-extension-chart:1.2.0 +#!BuildTag: %%IMG_PREFIX%%kubevirt-dashboard-extension-chart:1.2.0-%RELEASE% +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: KubeVirt + catalog.cattle.io/kube-version: '>= v1.26.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.10.0-0' + catalog.cattle.io/scope: management + catalog.cattle.io/ui-component: plugins + catalog.cattle.io/ui-extensions-version: '>= 3.0.0' +apiVersion: v2 +appVersion: 1.2.0 +description: 'SUSE Edge: KubeVirt extension for Rancher Dashboard' +icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/kubevirt/icon/color/kubevirt-icon-color.svg +name: kubevirt-dashboard-extension +type: application +version: 1.2.0 diff --git a/kubevirt-dashboard-extension-chart/README.md b/kubevirt-dashboard-extension-chart/README.md new file mode 100644 index 0000000..84361ca --- /dev/null +++ b/kubevirt-dashboard-extension-chart/README.md @@ -0,0 +1,6 @@ +# SUSE Edge: KubeVirt extension for Rancher Dashboard + +An Edge focused extension for Rancher Dashboard allowing to monitor and interact virtual machine based workloads. + +For more information on SUSE Edge see https://suse-edge.github.io/ \ +For more information on Kubevirt see https://kubevirt.io/ diff --git a/kubevirt-dashboard-extension-chart/_service b/kubevirt-dashboard-extension-chart/_service new file mode 100644 index 0000000..4f6fb26 --- /dev/null +++ b/kubevirt-dashboard-extension-chart/_service @@ -0,0 +1,15 @@ + + + + values.yaml + IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix}) + IMG_PREFIX + IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo) + IMG_REPO + + + Chart.yaml + IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix}) + IMG_PREFIX + + diff --git a/kubevirt-dashboard-extension-chart/templates/_helpers.tpl b/kubevirt-dashboard-extension-chart/templates/_helpers.tpl new file mode 100644 index 0000000..3ccd515 --- /dev/null +++ b/kubevirt-dashboard-extension-chart/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "extension-server.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "extension-server.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 "extension-server.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "extension-server.labels" -}} +helm.sh/chart: {{ include "extension-server.chart" . }} +{{ include "extension-server.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "extension-server.selectorLabels" -}} +app.kubernetes.io/name: {{ include "extension-server.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Pkg annotations +*/}} +{{- define "extension-server.pluginMetadata" -}} +{{- with .Values.plugin.metadata }} +{{- range $key, $value := . }} +{{ $key }}: {{ $value | quote }} +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/kubevirt-dashboard-extension-chart/templates/cr.yaml b/kubevirt-dashboard-extension-chart/templates/cr.yaml new file mode 100644 index 0000000..4a3a91e --- /dev/null +++ b/kubevirt-dashboard-extension-chart/templates/cr.yaml @@ -0,0 +1,14 @@ +apiVersion: catalog.cattle.io/v1 +kind: UIPlugin +metadata: + name: {{ include "extension-server.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: {{ include "extension-server.labels" . | nindent 4 }} +spec: + plugin: + name: {{ include "extension-server.fullname" . }} + version: {{ (semver (default .Chart.AppVersion .Values.plugin.versionOverride)).Original }} + endpoint: https://raw.githubusercontent.com/suse-edge/dashboard-extensions/gh-pages/extensions/kubevirt-dashboard-extension/1.2.0 + noCache: {{ .Values.plugin.noCache }} + noAuth: {{ .Values.plugin.noAuth }} + metadata: {{ include "extension-server.pluginMetadata" . | indent 6 }} \ No newline at end of file diff --git a/kubevirt-dashboard-extension-chart/values.yaml b/kubevirt-dashboard-extension-chart/values.yaml new file mode 100644 index 0000000..2926239 --- /dev/null +++ b/kubevirt-dashboard-extension-chart/values.yaml @@ -0,0 +1,12 @@ +nameOverride: "" +fullnameOverride: "" +plugin: + enabled: true + versionOverride: "" + noCache: false + noAuth: false + metadata: + catalog.cattle.io/display-name: KubeVirt + catalog.cattle.io/rancher-version: ">= 2.10.0-0" + catalog.cattle.io/ui-extensions-version: ">= 3.0.0" + catalog.cattle.io/kube-version: ">= v1.26.0-0"