Skip to content
Merged
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 helm/charts/flux-config/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ icon: "https://avatars.githubusercontent.com/u/52158677?s=200&v=4"
# 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.0.17
version: 0.0.18
# 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.
Expand Down
8 changes: 7 additions & 1 deletion helm/charts/flux-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# flux-config

![Version: 0.0.17](https://img.shields.io/badge/Version-0.0.17-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.3.0](https://img.shields.io/badge/AppVersion-2.3.0-informational?style=flat-square)
![Version: 0.0.18](https://img.shields.io/badge/Version-0.0.18-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.3.0](https://img.shields.io/badge/AppVersion-2.3.0-informational?style=flat-square)

A Helm Chart to template flux manifests to leverage GitOps on a OpenMCP cluster.

Expand Down Expand Up @@ -54,6 +54,9 @@ A Helm Chart to template flux manifests to leverage GitOps on a OpenMCP cluster.
| gitRepositorys[0].spec.secretRef | object | `{"name":""}` | *(optional)* [SecretRef](https://fluxcd.io/flux/components/source/api/v1/#source.toolkit.fluxcd.io/v1.GitRepositorySpec) specifies the Secret containing authentication credentials for the GitRepository. For HTTPS repositories the Secret must contain ‘username’ and ‘password’ fields for basic auth or ‘bearerToken’ field for token auth. For SSH repositories the Secret must contain ‘identity’ and ‘known_hosts’ fields. |
| gitRepositorys[0].spec.secretRef.name | string | `""` | [`type SecretKeySelector `](https://pkg.go.dev/github.com/external-secrets/external-secrets/apis/meta/v1#SecretKeySelector) |
| gitRepositorys[0].spec.url | string | `""` | [URL]() specifies the Git repository URL, it can be an HTTP/S or SSH address. |
| helmReleases[0].name | string | `""` | defines k8s [`metadata.name`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository` |
| helmReleases[0].namespace | string | `"default"` | *(optional)* defines k8s [`metadata.namespace`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository` |
| helmReleases[0].spec | string | `nil` | |
| kustomizations | list | `[{"commonMetadata":[],"components":{},"decryption":[],"dependsOn":{},"force":null,"healthChecks":{},"images":{},"interval":null,"kubeConfig":[],"name":"","namePrefix":null,"nameSuffix":null,"namespace":"ns1","patches":null,"path":"","postBuild":[],"prune":null,"retryInterval":null,"serviceAccountName":null,"sourceRef":{"apiVersion":"","kind":"GitRepository","name":"","namespace":"ns1"},"suspend":null,"targetnamespace":"ns1","timeout":null,"wait":null}]` | defines independent [`kind: Kustomization`](https://fluxcd.io/flux/components/kustomize/api/v1/#kustomize.toolkit.fluxcd.io/v1.Kustomization) manifest without the generation of `kind: GitRepository`. |
| kustomizations[0].commonMetadata | list | `[]` | [commonMetadata](https://fluxcd.io/flux/components/kustomize/kustomizations/#common-metadata) is an *(optional)*field used to specify any metadata that should be applied to all the Kustomization’s resources. |
| kustomizations[0].components | object | `{}` | [components](https://fluxcd.io/flux/components/kustomize/kustomizations/#components) is an *(optional)*list used to specify Kustomize components. This allows using reusable pieces of configuration logic that can be included from multiple overlays. |
Expand Down Expand Up @@ -83,6 +86,9 @@ A Helm Chart to template flux manifests to leverage GitOps on a OpenMCP cluster.
| kustomizations[0].targetnamespace | string | `"ns1"` | *(optional)* targetNamespace defines the namespace in the `kind: Kustomization` manifests. |
| kustomizations[0].timeout | string | `nil` | *(optional)* [Timeout](https://fluxcd.io/flux/components/kustomize/api/v1/#kustomize.toolkit.fluxcd.io/v1.KustomizationSpec) for validation, apply and health checking operations. Defaults to ‘Interval’ duration. e.g. 1m |
| kustomizations[0].wait | string | `nil` | [wait](https://fluxcd.io/flux/components/kustomize/kustomizations/#wait) is an *(optional)*boolean field to perform health checks for all reconciled resources as part of the Kustomization. If set to true, .spec.healthChecks is ignored. |
| ociRepositorys[0].name | string | `""` | defines k8s [`metadata.name`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository` |
| ociRepositorys[0].namespace | string | `"default"` | *(optional)* defines k8s [`metadata.namespace`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository` |
| ociRepositorys[0].spec | string | `nil` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
15 changes: 15 additions & 0 deletions helm/charts/flux-config/templates/helm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- range $item := .Values.helmReleases}}
{{- if and ($item) (ne $item.name "")}}
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: {{required "A valid value is required! (.Values.helmReleases[].name)" $item.name | lower | quote}}
namespace: {{ $item.namespace | default $.Values.defaults.namespace | lower | quote }}
labels:
openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}"
openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}"
spec:
{{- toYaml $item.spec | nindent 2 }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions helm/charts/flux-config/templates/oci-repository.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- range $item := .Values.ociRepositorys}}
{{- if and ($item) (ne $item.name "")}}
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata:
name: {{required "A valid value is required! (.Values.ociRepositorys[].name)" $item.name | lower | quote}}
namespace: {{ $item.namespace | default $.Values.defaults.namespace | lower | quote }}
labels:
openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}"
openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}"
spec:
{{- toYaml $item.spec | nindent 2 }}
{{- end }}
{{- end }}
41 changes: 41 additions & 0 deletions helm/charts/flux-config/values.ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
---
###! /!\ this file is only used in github pipeline to template a valid and NOT empty helm manifest! #####
########################################################################################################################
ociRepositorys:
- name: podinfo
namespace: "default"
spec:
interval: 5m0s
url: oci://ghcr.io/stefanprodan/manifests/podinfo
ref:
tag: lates
########################################################################################################################
helmReleases:
- name: podinfo
namespace: "default"
spec:
interval: 10m
timeout: 5m
chart:
spec:
chart: podinfo
version: '6.5.*'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 5m
releaseName: podinfo
install:
remediation:
retries: 3
upgrade:
remediation:
retries: 3
test:
enable: true
driftDetection:
mode: enabled
ignore:
- paths: ["/spec/replicas"]
target:
kind: Deployment
values:
replicaCount: 2
########################################################################################################################
kustomizations:
- name: chrome-hub-root-app
namespace: "default"
Expand Down
18 changes: 17 additions & 1 deletion helm/charts/flux-config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,28 @@ defaults:
# -- targetNamespace sets or overrides the default namespace in the `kind: Kustomization` manifests.
targetNamespace: "default"
########################################################################################################################
ociRepositorys:
# ociRepositorys[0].name -- defines k8s [`metadata.name`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository`
- name: ""
# -- *(optional)* defines k8s [`metadata.namespace`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository`
namespace: "default"
# spec -- defines k8s `spec` structured value of `kind: OCIRepository`. See [API browser](https://fluxcd.io/flux/components/source/ocirepositories/)
spec:
########################################################################################################################
helmReleases:
# helmReleases[0].name -- defines k8s [`metadata.name`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository`
- name: ""
# -- *(optional)* defines k8s [`metadata.namespace`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository`
namespace: "default"
# spec -- defines k8s `spec` structured value of `kind: HelmRelease`. See [API browser](https://fluxcd.io/flux/components/helm/helmreleases/)
spec:
########################################################################################################################
gitRepositorys:
# gitRepositorys[0].name -- defines k8s [`metadata.name`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository`
- name: ""
# -- *(optional)* defines k8s [`metadata.namespace`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: GitRepository`
namespace: "ns1"
# spec -- defines k8s `spec` structured value of `kind: GitRepository`. See [API broswer](https://fluxcd.io/flux/components/source/api/v1/#source.toolkit.fluxcd.io/v1.GitRepositorySpec)
# spec -- defines k8s `spec` structured value of `kind: GitRepository`. See [API browser](https://fluxcd.io/flux/components/source/api/v1/#source.toolkit.fluxcd.io/v1.GitRepositorySpec)
spec:
# -- [Interval](https://fluxcd.io/flux/components/source/api/v1/#source.toolkit.fluxcd.io/v1.GitRepositorySpec) at which the GitRepository URL is checked for updates. This interval is approximate and may be subject to jitter to ensure efficient use of resources.
interval: 1m
Expand Down