For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| package main | |
| import ( | |
| "path/filepath" | |
| "testing" | |
| "github.com/gruntwork-io/terratest/modules/logger" | |
| "github.com/gruntwork-io/terratest/modules/terraform" | |
| test_structure "github.com/gruntwork-io/terratest/modules/test-structure" | |
| "github.com/stretchr/testify/assert" |
| ### Install ArgoCD Image Updater ### | |
| kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml | |
| ### Edit argocd-cm ### | |
| data: | |
| # ... | |
| accounts.image-updater: apiKey | |
| ### Generate token untuk user image-updater pada argocd-server dan lakukan exec sh dan running command tersebut di dalam pods |
| ### Install ArgoCD ### | |
| kubectl create namespace argocd | |
| kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml |
| ### Create Helm Chart ### | |
| user@users: helm create base-chart | |
| ### Check List Directory ### | |
| user@users: tree base-chart | |
| base-chart | |
| ├── Chart.yaml | |
| ├── charts | |
| ├── templates | |
| │ ├── NOTES.txt |
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: argocd-cm | |
| namespace: argocd | |
| labels: | |
| app.kubernetes.io/name: argocd-cm | |
| app.kubernetes.io/part-of: argocd | |
| data: | |
| repositories: | |
| // Add the HashiCorp GPG key. | |
| curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - | |
| // Add the official HashiCorp Linux repository. | |
| sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | |
| // Update and install. | |
| sudo apt-get update && sudo apt-get install boundary |
| package main | |
| import ( | |
| "fmt" | |
| syscall "golang.org/x/sys/unix" | |
| ) | |
| type DiskStatus struct { | |
| All uint64 `json:"all"` | |
| Used uint64 `json:"used"` |
| pipeline { | |
| agent none | |
| environment { | |
| PASSWORD = "${env.PASSWORD}" | |
| USERNAME = "${env.USERNAME}" | |
| PROJECTKEY = "${env.PROJECTKEY}" | |
| URL = "${env.URL}" | |
| } |
| #!/bin/bash | |
| apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common sudo | |
| curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add - | |
| add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" | |
| apt-get update |