Skip to content

Commit

Permalink
Show simple pipeline doing helm bake and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmcintosh committed Oct 30, 2023
1 parent 13853ae commit d904403
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 0 deletions.
10 changes: 10 additions & 0 deletions applications/example-helm-vault-operator-deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Example of using hashicorps helm chart repo to dpeloy helm charts to K8s using spinnaker


This is a VERY simplistic example, but does
* Creates the namespace for the vault-secrets-operator
* Bakes the helm manifest INCLUDING CRDs for deployment
* Then deploys it to the target cluster that is set via a simple parameter


Requires helm configuration to be setup in artifacts. This enables Spinnaker to list the various helm charts.
123 changes: 123 additions & 0 deletions applications/example-helm-vault-operator-deploy/pipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"appConfig": {},
"keepWaitingPipelines": true,
"lastModifiedBy": "mcintoshj@gmail.com",
"limitConcurrent": false,
"maxConcurrentExecutions": 4,
"parameterConfig": [
{
"description": "",
"hasOptions": false,
"label": "",
"name": "account_name",
"pinned": true,
"required": true
}
],
"schema": "1",
"spelEvaluator": "v4",
"stages": [
{
"expectedArtifacts": [
{
"defaultArtifact": {
"customKind": true,
"id": "8f9c10f7-7135-4228-adc7-2d0ec93a30b3"
},
"displayName": "vault-operator",
"id": "d6d190d5-765f-43ed-a889-5489a77aa011",
"matchArtifact": {
"artifactAccount": "embedded-artifact",
"customKind": false,
"id": "b0fdefbf-8792-4f7c-8b42-f6832d6fff13",
"name": "vault",
"type": "embedded/base64"
},
"useDefaultArtifact": false,
"usePriorArtifact": false
}
],
"includeCRDs": true,
"inputArtifacts": [
{
"account": "helm-hashicorp",
"artifact": {
"artifactAccount": "helm-hashicorp",
"id": "d1600610-1782-4f06-8b63-dff48ae6eed7",
"name": "vault-secrets-operator",
"type": "helm/chart",
"version": "0.1.0"
},
"id": null
}
],
"name": "Bake (Manifest)",
"namespace": "vault-secrets-operator",
"outputName": "vault",
"overrides": {},
"refId": "1",
"requisiteStageRefIds": [],
"templateRenderer": "HELM3",
"type": "bakeManifest"
},
{
"account": "${parameters.account_name}",
"cloudProvider": "kubernetes",
"manifestArtifactId": "d6d190d5-765f-43ed-a889-5489a77aa011",
"moniker": {
"app": "demo"
},
"name": "Deploy (Manifest)",
"namespaceOverride": "vault-secrets-operator",
"refId": "2",
"requisiteStageRefIds": [
"3"
],
"skipExpressionEvaluation": false,
"source": "artifact",
"trafficManagement": {
"enabled": false,
"options": {
"enableTraffic": false
}
},
"type": "deployManifest"
},
{
"account": "${parameters.account_name}",
"cloudProvider": "kubernetes",
"manifests": [
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"labels": {
"name": "vault-secrets-operator"
},
"name": "vault-secrets-operator"
}
}
],
"moniker": {
"app": "demo"
},
"name": "Deploy Namespaces",
"refId": "3",
"requisiteStageRefIds": [
"1"
],
"skipExpressionEvaluation": false,
"source": "text",
"trafficManagement": {
"enabled": false,
"options": {
"enableTraffic": false,
"services": []
}
},
"type": "deployManifest"
}
],
"triggers": [],
"updateTs": "1698678797257"
}
6 changes: 6 additions & 0 deletions cluster/spinnaker/spinnaker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ spec:
enabled: false
endpoint: https://debug.armory.io/v1/logs
artifacts:
helm:
enabled: true
accounts:
- name: helm-hashicorp
repository: https://helm.releases.hashicorp.com
gitrepo:
enabled: true
accounts:
Expand Down Expand Up @@ -851,6 +856,7 @@ spec:
timeoutSeconds: 1
useExecHealthCheck: false
terraformer:
artifactId: armory/terraformer:2023.10.27.17.07.10.master
kubernetes:
livenessProbe:
failureThreshold: 3
Expand Down

0 comments on commit d904403

Please sign in to comment.