Skip to content

Commit 48a3c38

Browse files
author
Max Glotov
committed
init argocd
1 parent 6599a78 commit 48a3c38

File tree

16 files changed

+265
-88
lines changed

16 files changed

+265
-88
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,4 @@ $RECYCLE.BIN/
116116
*.lnk
117117

118118
**/temp/*
119+
argocd/**/charts

argocd/applications/argocd.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: argocd
5+
namespace: argocd
6+
spec:
7+
source:
8+
repoURL: 'https://github.com/maddevsio/aws-eks-base.git'
9+
path: argocd/k8s-addons/argocd
10+
targetRevision: main
11+
destination:
12+
name: in-cluster
13+
namespace: argocd
14+
project: k8s-addons
15+
syncPolicy:
16+
syncOptions:
17+
- CreateNamespace=true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: argocd/applications/aws-load-balancer-controller.yaml
5+
namespace: argocd
6+
spec:
7+
source:
8+
repoURL: 'https://github.com/maddevsio/aws-eks-base.git'
9+
path: argocd/k8s-addons/aws-load-balancer-controller
10+
targetRevision: main
11+
destination:
12+
name: in-cluster
13+
namespace: argocd
14+
project: k8s-addons
15+
syncPolicy:
16+
syncOptions:
17+
- CreateNamespace=true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: ingress-nginx
5+
namespace: argocd
6+
spec:
7+
source:
8+
repoURL: 'https://github.com/maddevsio/aws-eks-base.git'
9+
path: argocd/k8s-addons/ingress-nginx
10+
targetRevision: main
11+
destination:
12+
name: in-cluster
13+
namespace: argocd
14+
project: k8s-addons
15+
syncPolicy:
16+
syncOptions:
17+
- CreateNamespace=true

argocd/applications/karpenter.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: karpenter
5+
namespace: argocd
6+
spec:
7+
source:
8+
repoURL: 'https://github.com/maddevsio/aws-eks-base.git'
9+
path: argocd/k8s-addons/karpenter
10+
targetRevision: main
11+
destination:
12+
name: in-cluster
13+
namespace: argocd
14+
project: k8s-addons
15+
syncPolicy:
16+
syncOptions:
17+
- CreateNamespace=true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: k8s-addons
5+
namespace: argocd
6+
spec:
7+
project: k8s-addons
8+
source:
9+
repoURL: 'https://github.com/maddevsio/aws-eks-base.git'
10+
path: argocd/applications
11+
targetRevision: argocd
12+
destination:
13+
server: 'https://kubernetes.default.svc'
14+
syncPolicy:
15+
automated: {}
16+
syncOptions:
17+
- RespectIgnoreDifferences=true
18+
ignoreDifferences:
19+
- group: "*"
20+
kind: "Application"
21+
namespace: "*"
22+
jsonPointers:
23+
# Allow manually disabling auto sync for apps, useful for debugging.
24+
- /spec/syncPolicy/automated
25+
# These are automatically updated on a regular basis. Not ignoring last applied configuration since it's used for computing diffs after normalization.
26+
- /metadata/annotations/argocd.argoproj.io~1refresh
27+
- /operation
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
server:
2+
ingress:
3+
enabled: true
4+
ingressClassName: nginx
5+
hostname: argocd.example.com
6+
# Configure RBAC
7+
rbacConfig:
8+
policy.default: role:readonly
9+
policy.csv: |
10+
p, role:org-admin, applications, *, */*, allow
11+
p, role:org-admin, clusters, get, *, allow
12+
p, role:org-admin, repositories, get, *, allow
13+
p, role:org-admin, repositories, create, *, allow
14+
p, role:org-admin, repositories, update, *, allow
15+
p, role:org-admin, repositories, delete, *, allow
16+
17+
configs:
18+
cm:
19+
application.resourceTrackingMethod: annotation
20+
kustomize.buildOptions: --enable-helm
21+
params:
22+
server.insecure: "true"
23+
server.log.level: "warn"
24+
controller.log.level: "warn"
25+
reposerver.log.level: "warn"
26+
27+
extraObjects:
28+
- apiVersion: argoproj.io/v1alpha1
29+
kind: AppProject
30+
metadata:
31+
name: k8s-addons
32+
namespace: argocd
33+
labels:
34+
app.kubernetes.io/name: argocd
35+
app.kubernetes.io/part-of: argocd
36+
finalizers:
37+
- resources-finalizer.argocd.argoproj.io
38+
spec:
39+
clusterResourceWhitelist:
40+
- group: '*'
41+
kind: '*'
42+
destinations:
43+
- namespace: '*'
44+
server: '*'
45+
sourceRepos:
46+
- '*'
47+
global:
48+
tolerations:
49+
- key: CriticalAddonsOnly
50+
operator: Exists
51+
52+
controller:
53+
tolerations:
54+
- key: CriticalAddonsOnly
55+
operator: Exists
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- application-k8s-addons.yaml
6+
7+
helmCharts:
8+
- name: argo-cd
9+
repo: https://argoproj.github.io/argo-helm
10+
version: 7.8.26
11+
releaseName: argocd
12+
namespace: argocd
13+
valuesFile: helm-values.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ./base
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../base
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../base
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../base

terraform/modules/aws-eks/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#tfsec:ignore:aws-vpc-no-public-egress-sgr tfsec:ignore:aws-eks-enable-control-plane-logging tfsec:ignore:aws-eks-encrypt-secrets tfsec:ignore:aws-eks-no-public-cluster-access tfsec:ignore:aws-eks-no-public-cluster-access-to-cidr
22
module "eks" {
33
source = "terraform-aws-modules/eks/aws"
4-
version = "20.20.0"
4+
version = "20.35.0"
55

66
cluster_name = var.name
77
cluster_version = var.eks_cluster_version
@@ -20,6 +20,9 @@ module "eks" {
2020
kube-proxy = {
2121
most_recent = true
2222
}
23+
eks-pod-identity-agent = {
24+
most_recent = true
25+
}
2326
vpc-cni = {
2427
most_recent = true
2528
service_account_role_arn = module.vpc_cni_irsa.iam_role_arn

0 commit comments

Comments
 (0)