diff --git a/manifests/function/helm-chart-collator/helm-chart-collator.yaml b/manifests/function/helm-chart-collator/helm-chart-collator.yaml new file mode 100644 index 000000000..9cd3c231b --- /dev/null +++ b/manifests/function/helm-chart-collator/helm-chart-collator.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: helm-chart-collator +spec: + selector: + matchLabels: + app: helm-chart-collator + replicas: 2 + template: + metadata: + labels: + app: helm-chart-collator + spec: + tolerations: + - key: node-role.kubernetes.io/master + effect: NoSchedule + containers: + - name: helm-chart-collator + image: quay.io/airshipit/helm-chart-collator:latest + ports: + - containerPort: 8080 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: helm-chart-collator + name: helm-chart-collator +spec: + ports: + - port: 8080 + targetPort: 8080 + selector: + app: helm-chart-collator + type: ClusterIP \ No newline at end of file diff --git a/manifests/function/helm-chart-collator/kustomization.yaml b/manifests/function/helm-chart-collator/kustomization.yaml new file mode 100644 index 000000000..51831340d --- /dev/null +++ b/manifests/function/helm-chart-collator/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - helm-chart-collator.yaml +namespace: helm-chart-collator \ No newline at end of file diff --git a/manifests/function/helm-chart-collator/namespace.yaml b/manifests/function/helm-chart-collator/namespace.yaml new file mode 100644 index 000000000..38e416e9e --- /dev/null +++ b/manifests/function/helm-chart-collator/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: helm-chart-collator \ No newline at end of file diff --git a/manifests/function/helm-chart-collator/replacements/kustomization.yaml b/manifests/function/helm-chart-collator/replacements/kustomization.yaml new file mode 100644 index 000000000..cce41d7ba --- /dev/null +++ b/manifests/function/helm-chart-collator/replacements/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - versions.yaml \ No newline at end of file diff --git a/manifests/function/helm-chart-collator/replacements/versions.yaml b/manifests/function/helm-chart-collator/replacements/versions.yaml new file mode 100644 index 000000000..9ca8defca --- /dev/null +++ b/manifests/function/helm-chart-collator/replacements/versions.yaml @@ -0,0 +1,19 @@ +apiVersion: airshipit.org/v1alpha1 +kind: ReplacementTransformer +metadata: + name: helm-chart-collator-versions-replacements + annotations: + config.kubernetes.io/function: |- + container: + image: localhost/replacement-transformer +replacements: +- source: + objref: + kind: VersionsCatalogue + name: versions-treasuremap + fieldref: "{.spec.images.helm_chart_collator.helm_chart_collator.helm_chart_collator.image}" + target: + objref: + kind: Deployment + name: helm-chart-collator + fieldrefs: ["{.spec.template.spec.containers[?(.name == 'helm-chart-collator')].image}"] \ No newline at end of file diff --git a/manifests/function/helm-chart-repository/helm-repository.yaml b/manifests/function/helm-chart-repository/helm-repository.yaml new file mode 100644 index 000000000..be0dcd150 --- /dev/null +++ b/manifests/function/helm-chart-repository/helm-repository.yaml @@ -0,0 +1,9 @@ +# Helm Charts from Helm Repository (Helm Collator) +apiVersion: source.toolkit.fluxcd.io/v1beta1 +kind: HelmRepository +metadata: + name: collator + namespace: helm-chart-collator +spec: + interval: 5m + url: http://helm-chart-collator.helm-chart-collator.svc:8080 \ No newline at end of file diff --git a/manifests/function/helm-chart-repository/kustomization.yaml b/manifests/function/helm-chart-repository/kustomization.yaml new file mode 100644 index 000000000..305e2fffd --- /dev/null +++ b/manifests/function/helm-chart-repository/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - helm-repository.yaml \ No newline at end of file diff --git a/manifests/function/helm-chart-repository/replacements/kustomization.yaml b/manifests/function/helm-chart-repository/replacements/kustomization.yaml new file mode 100644 index 000000000..cce41d7ba --- /dev/null +++ b/manifests/function/helm-chart-repository/replacements/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - versions.yaml \ No newline at end of file diff --git a/manifests/function/helm-chart-repository/replacements/versions.yaml b/manifests/function/helm-chart-repository/replacements/versions.yaml new file mode 100644 index 000000000..6247b663e --- /dev/null +++ b/manifests/function/helm-chart-repository/replacements/versions.yaml @@ -0,0 +1,19 @@ +apiVersion: airshipit.org/v1alpha1 +kind: ReplacementTransformer +metadata: + name: helm-repository-versions-replacements + annotations: + config.kubernetes.io/function: |- + container: + image: localhost/replacement-transformer +replacements: +- source: + objref: + kind: VersionsCatalogue + name: versions-treasuremap + fieldref: "{.spec.helm_repositories.helm_chart_collator.url}" + target: + objref: + kind: HelmRepository + name: collator + fieldrefs: ["{.spec.url}"] \ No newline at end of file diff --git a/manifests/function/treasuremap-base-catalogues/versions-treasuremap.yaml b/manifests/function/treasuremap-base-catalogues/versions-treasuremap.yaml index e0b6fac89..135ee405c 100644 --- a/manifests/function/treasuremap-base-catalogues/versions-treasuremap.yaml +++ b/manifests/function/treasuremap-base-catalogues/versions-treasuremap.yaml @@ -29,6 +29,8 @@ spec: url: https://charts.rook.io/release dex-aio: url: http://helm-chart-collator.collator.svc:8080 + helm_chart_collator: + url: http://helm-chart-collator.helm-chart-collator.svc:8080 charts: elasticsearch: @@ -70,6 +72,10 @@ spec: # : # : # : + helm_chart_collator: + helm_chart_collator: + helm_chart_collator: + image: quay.io/airshipit/helm-chart-collator:latest kube_prometheus_stack: prometheus_operator: # NOTE: For prometheus and alertmanager instances managed by the operator diff --git a/manifests/type/airship-core/target/initinfra/kustomization.yaml b/manifests/type/airship-core/target/initinfra/kustomization.yaml index 5c941ea9b..7e35dbf32 100644 --- a/manifests/type/airship-core/target/initinfra/kustomization.yaml +++ b/manifests/type/airship-core/target/initinfra/kustomization.yaml @@ -2,7 +2,7 @@ resources: - ../../../../composite/initinfra - ../../../../function/hostconfig-operator - ../../../../../../airshipctl/manifests/composite/flux-helm/ - - ../../../../../../airshipctl/manifests/function/helm-chart-collator/ + - ../../../../function/helm-chart-collator/ - ../../../../function/rook-operator commonLabels: diff --git a/manifests/type/airship-core/target/initinfra/replacements/kustomization.yaml b/manifests/type/airship-core/target/initinfra/replacements/kustomization.yaml index 66d17935c..83935fe7f 100644 --- a/manifests/type/airship-core/target/initinfra/replacements/kustomization.yaml +++ b/manifests/type/airship-core/target/initinfra/replacements/kustomization.yaml @@ -1,5 +1,5 @@ resources: - ../../../../../composite/initinfra/replacements - - ../../../../../../../airshipctl/manifests/function/helm-chart-collator/replacements + - ../../../../../function/helm-chart-collator/replacements - ../../../../../function/hostconfig-operator/replacements - ../../../../../function/rook-operator/replacements diff --git a/manifests/type/multi-tenant/target/initinfra/kustomization.yaml b/manifests/type/multi-tenant/target/initinfra/kustomization.yaml index 5c941ea9b..7e35dbf32 100644 --- a/manifests/type/multi-tenant/target/initinfra/kustomization.yaml +++ b/manifests/type/multi-tenant/target/initinfra/kustomization.yaml @@ -2,7 +2,7 @@ resources: - ../../../../composite/initinfra - ../../../../function/hostconfig-operator - ../../../../../../airshipctl/manifests/composite/flux-helm/ - - ../../../../../../airshipctl/manifests/function/helm-chart-collator/ + - ../../../../function/helm-chart-collator/ - ../../../../function/rook-operator commonLabels: diff --git a/manifests/type/multi-tenant/target/initinfra/replacements/kustomization.yaml b/manifests/type/multi-tenant/target/initinfra/replacements/kustomization.yaml index 66d17935c..83935fe7f 100644 --- a/manifests/type/multi-tenant/target/initinfra/replacements/kustomization.yaml +++ b/manifests/type/multi-tenant/target/initinfra/replacements/kustomization.yaml @@ -1,5 +1,5 @@ resources: - ../../../../../composite/initinfra/replacements - - ../../../../../../../airshipctl/manifests/function/helm-chart-collator/replacements + - ../../../../../function/helm-chart-collator/replacements - ../../../../../function/hostconfig-operator/replacements - ../../../../../function/rook-operator/replacements