diff --git a/traefik/argocd.yaml b/traefik/argocd.yaml new file mode 100644 index 0000000..a6771e7 --- /dev/null +++ b/traefik/argocd.yaml @@ -0,0 +1,31 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: traefik-config + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://github.com/Mayne0213/cluster-infrastructure.git + targetRevision: main + path: traefik + destination: + server: https://kubernetes.default.svc + namespace: kube-system + syncPolicy: + automated: + prune: true + selfHeal: true + allowEmpty: false + syncOptions: + - PrunePropagationPolicy=foreground + - PruneLast=true + retry: + limit: 5 + backoff: + duration: 5s + factor: 2 + maxDuration: 3m + revisionHistoryLimit: 10 diff --git a/traefik/helm-values.yaml b/traefik/helm-values.yaml new file mode 100644 index 0000000..36bf01d --- /dev/null +++ b/traefik/helm-values.yaml @@ -0,0 +1,21 @@ +apiVersion: helm.cattle.io/v1 +kind: HelmChartConfig +metadata: + name: traefik + namespace: kube-system +spec: + valuesContent: |- + # Traefik Dashboard 활성화 + dashboard: + enabled: true + + # API 활성화 (Dashboard에서 필요) + api: + dashboard: true + insecure: false + + # ports 설정 + ports: + traefik: + expose: + default: true diff --git a/traefik/ingress.yaml b/traefik/ingress.yaml new file mode 100644 index 0000000..cacba3c --- /dev/null +++ b/traefik/ingress.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: traefik-dashboard-ingress + namespace: kube-system + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-prod" +spec: + ingressClassName: traefik + tls: + - hosts: + - traefik0213.kro.kr + secretName: traefik-dashboard-tls + rules: + - host: traefik0213.kro.kr + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: traefik + port: + number: 9000 diff --git a/traefik/kustomization.yaml b/traefik/kustomization.yaml new file mode 100644 index 0000000..98cf607 --- /dev/null +++ b/traefik/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - helm-values.yaml + - ingress.yaml