[Book] [OK!] 7.4 Helm Integration


Делаю:
2024.03.24


gitops-cookbook-sc/ch07/bgdh


service:
  type: NodePort
  port: 8080

gitops-cookbook-sc/ch07/bgdh/templates/deployment.yaml


ports:
  - name: http
    containerPort: 8080
    protocol: TCP


$ cat << 'EOF' | kubectl create -f -
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: bgdh-app
  namespace: argocd
spec:
  destination:
    namespace: bgdh
    server: https://kubernetes.default.svc
  project: default
  source:
    path: ch07/bgdh
    repoURL: https://github.com/wildmakaka/gitops-cookbook-sc.git
    targetRevision: main
  syncPolicy:
    automated: {}
EOF


$ kubectl get services -n bgdh
NAME       TYPE       CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
bgdh-app   NodePort   10.103.112.150   <none>        8080:32256/TCP   6s


// [OK!]
http://192.168.49.2:32256


Наверное, так делать не оч. правильно.

gitops-cookbook-sc/ch07/bgdh/templates/deployment.yaml

Меняю цвет


      containers:
       ***
          env:
            - name: COLOR
              value: "red"


$ argocd app sync bgdh-app


// [OK!] Цвет обновился!
http://192.168.49.2:32256


$ argocd app delete bgdh-app