diff --git a/charts/talos/.helmignore b/charts/talos/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/talos/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/talos/Chart.yaml b/charts/talos/Chart.yaml new file mode 100644 index 0000000..ad9407c --- /dev/null +++ b/charts/talos/Chart.yaml @@ -0,0 +1,26 @@ +apiVersion: v2 +name: talos +description: A Helm chart for talos +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.1.0 +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.0.0" +annotations: + cluster.x-k8s.io/provider: bootstrap-talos, control-plane-talos + cluster.x-k8s.io/v1beta1: v1beta1 +maintainers: + - name: improwised diff --git a/charts/talos/templates/providers.yaml b/charts/talos/templates/providers.yaml new file mode 100644 index 0000000..2280290 --- /dev/null +++ b/charts/talos/templates/providers.yaml @@ -0,0 +1,23 @@ +apiVersion: operator.cluster.x-k8s.io/v1alpha2 +kind: BootstrapProvider +metadata: + name: talos +spec: + version: v0.6.7 + {{- if .Values.configSecret.name }} + configSecret: + name: {{ .Values.configSecret.name }} + namespace: {{ .Values.configSecret.namespace | default .Release.Namespace | trunc 63 }} + {{- end }} +--- +apiVersion: operator.cluster.x-k8s.io/v1alpha2 +kind: ControlPlaneProvider +metadata: + name: talos +spec: + version: v0.5.8 + {{- if .Values.configSecret.name }} + configSecret: + name: {{ .Values.configSecret.name }} + namespace: {{ .Values.configSecret.namespace | default .Release.Namespace | trunc 63 }} + {{- end }} diff --git a/charts/talos/templates/secret.yaml b/charts/talos/templates/secret.yaml new file mode 100644 index 0000000..f5780d5 --- /dev/null +++ b/charts/talos/templates/secret.yaml @@ -0,0 +1,9 @@ +{{- if and .Values.configSecret.create .Values.configSecret.name }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.configSecret.name }} + namespace: {{ .Values.configSecret.namespace | default .Release.Namespace | trunc 63 }} +stringData: +{{ toYaml .Values.config | indent 2 }} +{{- end }} diff --git a/charts/talos/values.schema.json b/charts/talos/values.schema.json new file mode 100644 index 0000000..e0e8920 --- /dev/null +++ b/charts/talos/values.schema.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "properties": { + "configSecret": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } +} diff --git a/charts/talos/values.yaml b/charts/talos/values.yaml new file mode 100644 index 0000000..dac04d5 --- /dev/null +++ b/charts/talos/values.yaml @@ -0,0 +1,6 @@ +configSecret: + create: false + name: "" + namespace: "" + +config: {}