Added configuration files and instructions for ArgoCD
This commit is contained in:
20
argocd/argocd-ingress.yaml
Normal file
20
argocd/argocd-ingress.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: argocd-ingress
|
||||||
|
namespace: argocd
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: argocd.marcin00.pl
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: argocd-server
|
||||||
|
port:
|
||||||
|
number: 80
|
51
argocd/readme.md
Normal file
51
argocd/readme.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# Instrukcje konfiguracji ArgoCD
|
||||||
|
|
||||||
|
## Instalacja:
|
||||||
|
Aby wdrożyć ArgoCD wykonujemy komendy:
|
||||||
|
```
|
||||||
|
kubectl create namespace argocd
|
||||||
|
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||||
|
```
|
||||||
|
W celu zalogowania sekret wydobywamy komendą:
|
||||||
|
```
|
||||||
|
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d
|
||||||
|
```
|
||||||
|
Następnie wdrażamy obiekt Ingress z tego folderu.
|
||||||
|
```
|
||||||
|
kubectl apply -f argocd-ingress.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Jak wyłączyć HTTPS
|
||||||
|
Aby wyłączyć HTTPS w ArgoCD należy otworzyć configmap:
|
||||||
|
```
|
||||||
|
kubectl edit configmap argocd-cmd-params-cm -n argocd
|
||||||
|
```
|
||||||
|
i dodać do configmap następujący tekst:
|
||||||
|
```
|
||||||
|
data:
|
||||||
|
server.insecure: "true"
|
||||||
|
```
|
||||||
|
Aby przeładować serwer zniszcz poda:
|
||||||
|
```
|
||||||
|
kubectl delete pod -n argocd argocd-server-<xxx>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Jak ustawić wartość sekretu dla Webhooka Gitea
|
||||||
|
Zapisujemy sekret do zmiennej środowiskowej GITEA_WEBHOOK_SECRET.
|
||||||
|
Następnie tworzymy sekret za pomocą poniższej komendy
|
||||||
|
```
|
||||||
|
kubectl create secret generic gitea-webhook-secret \
|
||||||
|
--namespace argocd \
|
||||||
|
--from-literal=webhook.secret="$GITEA_WEBHOOK_SECRET" \
|
||||||
|
--type=Opaque \
|
||||||
|
--label=app.kubernetes.io/part-of=argocd \
|
||||||
|
--dry-run=client -o yaml | kubectl apply -f -
|
||||||
|
```
|
||||||
|
Potem modyfikujemy argocd-secret, otwieramy go komendą:
|
||||||
|
```
|
||||||
|
kubectl edit secret argocd-secret -n argocd
|
||||||
|
```
|
||||||
|
dodajemy pod klucz `data` taką oto linię:
|
||||||
|
```
|
||||||
|
webhook.gitea.secret: "$gitea-webhook-secret:webhook.secret"
|
||||||
|
```
|
Reference in New Issue
Block a user