diff --git a/infra/argocd/templates/crossplane.yaml b/infra/argocd/templates/crossplane.yaml new file mode 100644 index 0000000..11a311a --- /dev/null +++ b/infra/argocd/templates/crossplane.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: crossplane + namespace: argocd +spec: + project: default + source: + repoURL: https://gitlab.com/developerdurp/homelab.git + targetRevision: main + path: infra/crossplane + destination: + namespace: crossplane + name: in-cluster + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/infra/crossplane/Chart.yaml b/infra/crossplane/Chart.yaml new file mode 100644 index 0000000..8e724e3 --- /dev/null +++ b/infra/crossplane/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: crossplane +description: A Helm chart for Kubernetes +type: application + +version: 0.1.0 +appVersion: "1.16.0" + +dependencies: + - name: crossplane + repository: https://charts.crossplane.io/stable + version: 1.19.1 diff --git a/infra/crossplane/templates/gitlab.yml b/infra/crossplane/templates/gitlab.yml new file mode 100644 index 0000000..d0c486e --- /dev/null +++ b/infra/crossplane/templates/gitlab.yml @@ -0,0 +1,52 @@ +apiVersion: pkg.crossplane.io/v1 +kind: Provider +metadata: + name: provider-gitlab +spec: + package: xpkg.upbound.io/crossplane-contrib/provider-gitlab:v0.5.0 +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: gitlab-secret +spec: + secretStoreRef: + name: vault + kind: ClusterSecretStore + target: + name: gitlab-secret + data: + - secretKey: RENOVATE_TOKEN + remoteRef: + key: kv/renovate + property: accesstoken + +--- +apiVersion: gitlab.crossplane.io/v1beta1 +kind: ProviderConfig +metadata: + name: gitlab-provider +spec: + baseURL: https://gitlab.com/ + credentials: + source: Secret + secretRef: + namespace: crossplane + name: gitlab-secret + key: accesstoken +#--- +# +#apiVersion: projects.gitlab.crossplane.io/v1alpha1 +#kind: Project +#metadata: +# name: example-project +#spec: +# deletionPolicy: Orphan +# forProvider: +# name: "Example Project" +# description: "example project description" +# providerConfigRef: +# name: gitlab-provider +# policy: +# resolution: Optional +# resolve: Always