From ec46fce86b66444cb636ff2258ee6493e33ff363 Mon Sep 17 00:00:00 2001 From: rblundon Date: Sun, 20 Apr 2025 12:31:18 -0500 Subject: [PATCH] intiial exernal secrets helm deployment (it won't work...) --- cluster/external-secrets.yaml | 34 ++++++++++++++++++++++++++ cluster/external-secrets/Chart.yaml | 30 +++++++++++++++++++++++ cluster/temp/cluster-secret-store.yaml | 13 ++++++++++ cluster/temp/kustomization.yaml | 14 +++++++++++ cluster/temp/namespace.yaml | 14 +++++++++++ cluster/temp/operatorconfig.yaml | 16 ++++++++++++ cluster/temp/subscription.yaml | 14 +++++++++++ step-by-step.md | 6 ++--- 8 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 cluster/external-secrets.yaml create mode 100644 cluster/external-secrets/Chart.yaml create mode 100644 cluster/temp/cluster-secret-store.yaml create mode 100644 cluster/temp/kustomization.yaml create mode 100644 cluster/temp/namespace.yaml create mode 100644 cluster/temp/operatorconfig.yaml create mode 100644 cluster/temp/subscription.yaml diff --git a/cluster/external-secrets.yaml b/cluster/external-secrets.yaml new file mode 100644 index 0000000..1e49733 --- /dev/null +++ b/cluster/external-secrets.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: external-secrets + namespace: openshift-gitops + finalizers: + - resources-finalizer.argocd.argoproj.io + annotations: + argocd.argoproj.io/sync-wave: "1" +spec: + destination: + name: in-cluster + namespace: external-secrets + project: default + source: + path: cluster/external-secrets + repoURL: git@github.com:rblundon/homelab.git + targetRevision: HEAD + syncPolicy: + automated: + prune: false + selfHeal: true + syncOptions: + - RespectIgnoreDifferences=true + - CreateNamespace=true + managedNamespaceMetadata: + labels: + argocd.argoproj.io/managed-by: openshift-gitops + ignoreDifferences: + - group: apps + kind: Deployment + jsonPointers: + - /spec/replicas \ No newline at end of file diff --git a/cluster/external-secrets/Chart.yaml b/cluster/external-secrets/Chart.yaml new file mode 100644 index 0000000..7006e89 --- /dev/null +++ b/cluster/external-secrets/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 +name: external-secrets +description: A Helm chart for Kubernetes + +# 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: "0.16.1" + +dependencies: +- name: external-secrets + version: "0.16.1" + repository: https://charts.external-secrets.io/ + condition: external-secrets.enabled diff --git a/cluster/temp/cluster-secret-store.yaml b/cluster/temp/cluster-secret-store.yaml new file mode 100644 index 0000000..1a93cd8 --- /dev/null +++ b/cluster/temp/cluster-secret-store.yaml @@ -0,0 +1,13 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ClusterSecretStore +metadata: + name: doppler-cluster +spec: + provider: + doppler: + auth: + secretRef: + dopplerToken: + name: doppler-cluster-token + key: dopplerToken + namespace: external-secrets diff --git a/cluster/temp/kustomization.yaml b/cluster/temp/kustomization.yaml new file mode 100644 index 0000000..fd82630 --- /dev/null +++ b/cluster/temp/kustomization.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonAnnotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + +resources: +# Operator deployment +- namespace.yaml +- subscription.yaml +- operatorconfig.yaml +# Deploy cluster resources +- cluster-secret-store.yaml diff --git a/cluster/temp/namespace.yaml b/cluster/temp/namespace.yaml new file mode 100644 index 0000000..de28405 --- /dev/null +++ b/cluster/temp/namespace.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + argocd.argoproj.io/tracking-id: 'external-secrets:/Namespace:openshift-operators/external-secrets' + name: external-secrets + labels: + argocd.argoproj.io/managed-by: openshift-gitops-operator + kubernetes.io/metadata.name: external-secrets +spec: + finalizers: + - kubernetes diff --git a/cluster/temp/operatorconfig.yaml b/cluster/temp/operatorconfig.yaml new file mode 100644 index 0000000..5d761cf --- /dev/null +++ b/cluster/temp/operatorconfig.yaml @@ -0,0 +1,16 @@ +apiVersion: operator.external-secrets.io/v1alpha1 +kind: OperatorConfig +metadata: + name: cluster +spec: + prometheus: + enabled: true + service: + port: 8080 + resources: + requests: + cpu: 10m + memory: 96Mi + limits: + cpu: 100m + memory: 256Mi \ No newline at end of file diff --git a/cluster/temp/subscription.yaml b/cluster/temp/subscription.yaml new file mode 100644 index 0000000..ea424dd --- /dev/null +++ b/cluster/temp/subscription.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + labels: + operators.coreos.com/external-secrets-operator.openshift-operators: '' + name: external-secrets-operator + namespace: openshift-operators +spec: + channel: stable + installPlanApproval: Automatic + name: external-secrets-operator + source: community-operators + sourceNamespace: openshift-marketplace diff --git a/step-by-step.md b/step-by-step.md index 66be01d..e98478b 100644 --- a/step-by-step.md +++ b/step-by-step.md @@ -76,11 +76,11 @@ Other needed software: - ansible - terraform -## [FreeIPA](04-free-ipa/README.md) *Manual* +### [FreeIPA](04-free-ipa/README.md) *Manual* -## [Templates](05-templates/README.md) *Manual* +### [Templates](05-templates/README.md) *Manual* -## [Matchbox](06-matchbox/README.md) *Manual* +### [Matchbox](06-matchbox/README.md) *Manual* - Downloading the Agent-based Installer