Skip to content

Commit

Permalink
feat(argo-cd): expose argo cd (#18001)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao authored Jul 13, 2024
1 parent 1762e8d commit c6262c5
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/values.yaml
---
configs:
params:
server.insecure: true
controller:
resources:
requests:
Expand Down
2 changes: 2 additions & 0 deletions cloud-platform/aws/amazon-msk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ amazon-msk-kafka-cluster-list:
aws kafka list-clusters
amazon-msk-kafka-cluster-describe:
aws kafka describe-cluster --cluster-arn=arn:aws:kafka:us-west-2:272394222652:cluster/hm-msk-cluster/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-xx
amazon-msk-kafka-cluster-broker-list:
aws kafka get-bootstrap-brokers --cluster-arn=arn:aws:kafka:us-west-2:272394222652:cluster/hm-msk-cluster/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-xx

# EC2
kafka-topic-list:
Expand Down
14 changes: 1 addition & 13 deletions ops/argo-cd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ argo-cd-password-reset:
--patch='{"stringData": {"admin.password": "$2a$10$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "admin.passwordMtime": "'$(date +%FT%T%Z)'"}}'

argo-cd-sign-in:
argocd login localhost:31026 --username=admin --insecure
argocd login hm-argo-cd.internal.hongbomiao.com --username=admin

argo-cd-project-create:
argocd proj create production-hm --file
Expand All @@ -27,15 +27,3 @@ argo-cd-app-create:
argocd app create xxx --file=xxx.yaml
argo-cd-app-sync:
argocd app sync xxx

# Kubernetes
kubectl-port-forward-airbyte:
kubectl port-forward service/horizon-airbyte-airbyte-webapp-svc --namespace=production-hm-airbyte 28811:443
kubectl-port-forward-argo-cd:
kubectl port-forward service/hm-argo-cd-argocd-server --namespace=production-hm-argo-cd 31026:443
kubectl-port-forward-goldilocks:
kubectl port-forward service/hm-goldilocks-dashboard --namespace=production-hm-goldilocks 34617:80
kubectl-port-forward-grafana:
kubectl port-forward service/hm-prometheus-grafana --namespace=production-hm-prometheus 54976:80
kubectl-port-forward-opencost:
kubectl port-forward service/hm-opencost --namespace=production-hm-opencost 56053:9090
6 changes: 6 additions & 0 deletions ops/argo-cd/applications/production-hm/argo-cd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
argo-cd-app-create:
argocd app create hm-argo-cd --file=manifests/hm-argo-cd-application.yaml
argo-cd-app-update:
argocd app create hm-argo-cd --file=manifests/hm-argo-cd-application.yaml --upsert
argo-cd-app-delete:
argocd app delete hm-argo-cd --yes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: hm-argo-cd
namespace: production-hm-argo-cd
labels:
app.kubernetes.io/name: hm-argo-cd
spec:
project: production-hm
source:
repoURL: [email protected]:hongbo-miao/hongbomiao.com.git
targetRevision: HEAD
path: ops/argo-cd/applications/production-hm/argo-cd/kubernetes-manifests
destination:
namespace: production-hm-argo-cd
server: https://kubernetes.default.svc
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
prune: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hm-argo-cd-ingress
namespace: production-hm-argo-cd
annotations:
kubernetes.io/ingress.class: traefik
# https://doc.traefik.io/traefik/routing/providers/kubernetes-ingress/#on-ingress
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
# https://kubernetes-sigs.github.io/external-dns/latest/annotations/annotations
external-dns.alpha.kubernetes.io/hostname: hm-argo-cd.internal.hongbomiao.com
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
labels:
app.kubernetes.io/name: hm-argo-cd-ingress
app.kubernetes.io/part-of: production-hm-argo-cd
spec:
rules:
- host: hm-argo-cd.internal.hongbomiao.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hm-argo-cd-argocd-server
port:
number: 80
tls:
- hosts:
- hm-argo-cd.internal.hongbomiao.com
secretName: production-hm-argo-cd-certificate
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: production-hm-argo-cd-certificate
namespace: production-hm-argo-cd
spec:
commonName: hm-argo-cd.internal.hongbomiao.com
secretName: production-hm-argo-cd-certificate
dnsNames:
- hm-argo-cd.internal.hongbomiao.com
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: staging-hm-argo-cd-certificate
namespace: production-hm-argo-cd
spec:
commonName: hm-argo-cd.internal.hongbomiao.com
secretName: staging-hm-argo-cd-certificate
dnsNames:
- hm-argo-cd.internal.hongbomiao.com
issuerRef:
kind: ClusterIssuer
name: staging-lets-encrypt-cluster-issuer
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
useCredentialsInSecret: true
- repoURL: [email protected]:hongbo-miao/hongbomiao.com.git
targetRevision: HEAD
path: mlflow/manifests
path: ops/argo-cd/applications/production-hm/mlflow/kubernetes-manifests
destination:
namespace: production-hm-mlflow
server: https://kubernetes.default.svc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ spec:
enabled: false
- repoURL: [email protected]:hongbo-miao/hongbomiao.com.git
targetRevision: HEAD
path: ops/argo-cd/applications/production-hm/metadata/kubernetes-manifests
path: ops/argo-cd/applications/production-hm/netadata/kubernetes-manifests
destination:
namespace: production-hm-netdata
server: https://kubernetes.default.svc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
memory: 512Mi
- repoURL: [email protected]:hongbo-miao/hongbomiao.com.git
targetRevision: HEAD
path: ops/argo-cd/applications/production-hm/opencost/kubernetes-manifests
path: ops/argo-cd/applications/production-hm/prometheus/kubernetes-manifests
destination:
namespace: production-hm-prometheus
server: https://kubernetes.default.svc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
ports: []
- repoURL: [email protected]:hongbo-miao/hongbomiao.com.git
targetRevision: HEAD
path: ray-cluster/manifests
path: ops/argo-cd/applications/production-hm/ray-cluster/kubernetes-manifests
destination:
namespace: production-hm-ray-cluster
server: https://kubernetes.default.svc
Expand Down

0 comments on commit c6262c5

Please sign in to comment.