контроллер_argocd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
контроллер_argocd [2024/03/03 09:32]
val [Управление приложениями через kubectl]
контроллер_argocd [2026/01/08 15:08] (current)
val [Добавление корпоративного корневого сертификата]
Line 3: Line 3:
   * [[https://​www.digitalocean.com/​community/​tutorials/​how-to-deploy-to-kubernetes-using-argo-cd-and-gitops|How to Deploy to Kubernetes using Argo CD and GitOps]]   * [[https://​www.digitalocean.com/​community/​tutorials/​how-to-deploy-to-kubernetes-using-argo-cd-and-gitops|How to Deploy to Kubernetes using Argo CD and GitOps]]
   * [[https://​habr.com/​ru/​companies/​otus/​articles/​544370/​|Argo CD: готов к труду и обороне в Kubernetes]]   * [[https://​habr.com/​ru/​companies/​otus/​articles/​544370/​|Argo CD: готов к труду и обороне в Kubernetes]]
 +  * [[https://​habr.com/​ru/​articles/​674704/​|Рабочий пример использования ArgoCD]]
  
 +  * [[https://​developers.redhat.com/​articles/​2023/​05/​25/​3-patterns-deploying-helm-charts-argocd|3 patterns for deploying Helm charts with Argo CD]]
 +  * [[https://​medium.com/​globant/​using-multiple-sources-for-a-helm-chart-deployment-in-argocd-cf3cd2d598fc|Using multiple sources for a Helm Chart deployment in ArgoCD]]
 ===== Развертывание и подключение к контроллеру ArgoCD ===== ===== Развертывание и подключение к контроллеру ArgoCD =====
 <​code>​ <​code>​
Line 14: Line 17:
 cmder$ kubectl port-forward svc/​argocd-server -n argocd 8080:443 cmder$ kubectl port-forward svc/​argocd-server -n argocd 8080:443
  
-student@kube1:~kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="​{.data.password}"​ | base64 -d; echo+kube1:~kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="​{.data.password}"​ | base64 -d; echo
 </​code>​ </​code>​
  
Line 59: Line 62:
 ===== Управление приложениями через kubectl ===== ===== Управление приложениями через kubectl =====
  
-  * [[https://​argo-cd.readthedocs.io/​en/​release-1.8/​user-guide/​private-repositories/#​managing-tls-certificates-using-the-argocd-web-ui#Managing TLS certificates using the ArgoCD web UI]]+  * [[https://​argo-cd.readthedocs.io/​en/​release-1.8/​user-guide/​private-repositories/#​managing-tls-certificates-using-the-argocd-web-ui|Managing TLS certificates using the ArgoCD web UI]]
  
 <​code>​ <​code>​
Line 76: Line 79:
     repoURL: '​https://​server.corpX.un/​student/​gowebd-k8s.git'​     repoURL: '​https://​server.corpX.un/​student/​gowebd-k8s.git'​
     path: webd-chart     path: webd-chart
 +
 +#    helm:
 +#      valuesObject:​
 +#        replicaCount:​ 2
 +#        image:
 +#          tag: "​ver1.2"​
 +#        REALM_NAME: "​corp"​
 +#      valueFiles:
 +#      - ../env.yaml
 +
 +
   destination:​   destination:​
     server: '​https://​kubernetes.default.svc'​     server: '​https://​kubernetes.default.svc'​
Line 84: Line 98:
       - CreateNamespace=true       - CreateNamespace=true
 </​code><​code>​ </​code><​code>​
-kube1# kubectl apply -f application.yaml+kube1# kubectl apply -f application.yaml ​#​--dry-run=client #-o yaml 
 + 
 +kube1# kubectl get Application -n argocd -o yaml | less
  
 kube1# ### kubectl delete -f application.yaml kube1# ### kubectl delete -f application.yaml
Line 91: Line 107:
 <​code>​ <​code>​
 $ curl http://​kube1 -H "Host: gowebd.corpX.un"​ $ curl http://​kube1 -H "Host: gowebd.corpX.un"​
-  ИЛИ 
-$ curl https://​kube1 -H "Host: gowebd.corpX.un"​ -k 
  
 gitlab-runner@server:​~/​gowebd-k8s$ cat webd-chart/​Chart.yaml gitlab-runner@server:​~/​gowebd-k8s$ cat webd-chart/​Chart.yaml
Line 111: Line 125:
 ===== Дополнительные материалы ===== ===== Дополнительные материалы =====
  
 +==== Добавление корпоративного корневого сертификата ====
 +<​code>​
 +Settings->​
 +  Repository certificates and known hosts->
 +    ADD TLS CERTIFICATE
 +      Repository Server Name: gitlab.corpX.un
 +      TLS Certificate (PEM format): cat /tmp/ca.crt
 +      ​
 +kube1:​~/​webd-k8s#​ kubectl -n argocd get configmaps argocd-tls-certs-cm -o yaml | less
 +</​code>​
 ==== Доступ к не публичному git репозиторию ==== ==== Доступ к не публичному git репозиторию ====
  
контроллер_argocd.1709447526.txt.gz · Last modified: 2024/03/03 09:32 by val