diff --git a/infra/argocd/templates/octopusdeploy.yaml b/infra/argocd/templates/octopusdeploy.yaml index 69a7a4f..87d1add 100644 --- a/infra/argocd/templates/octopusdeploy.yaml +++ b/infra/argocd/templates/octopusdeploy.yaml @@ -19,3 +19,26 @@ spec: syncOptions: - CreateNamespace=true +--- + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: octopusdeploy-agent + namespace: argocd +spec: + project: default + source: + repoURL: https://gitlab.com/developerdurp/homelab.git + targetRevision: main + path: infra/octopus-agent + destination: + namespace: octpus-agent + name: in-cluster + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + diff --git a/infra/octopus-agent/Chart.yaml b/infra/octopus-agent/Chart.yaml new file mode 100644 index 0000000..c33a417 --- /dev/null +++ b/infra/octopus-agent/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: octopusdeploy +description: A Helm chart for Kubernetes +type: application + +version: 0.1.0 +appVersion: "1.16.0" + +dependencies: + - name: kubernetes-agent + repository: oci://ghcr.io/octopusdeploy + version: 2.*.* diff --git a/infra/octopus-agent/templates/secret.yaml b/infra/octopus-agent/templates/secret.yaml new file mode 100644 index 0000000..68ca864 --- /dev/null +++ b/infra/octopus-agent/templates/secret.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: vault + +--- + +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: agent-token +spec: + secretStoreRef: + name: vault + kind: ClusterSecretStore + target: + name: agent-token + data: + - secretKey: bearer-token + remoteRef: + key: kv/octopusdeploy + property: infra-bearer-token + diff --git a/infra/octopus-agent/values.yaml b/infra/octopus-agent/values.yaml new file mode 100644 index 0000000..c87db8f --- /dev/null +++ b/infra/octopus-agent/values.yaml @@ -0,0 +1,17 @@ +kubernetes-agent: + agent: + acceptEula: y + serverUrl: https://octopus.durp.info/" + serverCommsAddress: + - https://octopus.durp.info:10943/ + space: Default + name: Infra + deploymentTarget: + enabled: true + bearerTokenSecretName: agent-token + initial: + environments: + - development + - production + tags: + - infra-cluster