Skip to content

Commit

Permalink
create cluster magdy
Browse files Browse the repository at this point in the history
  • Loading branch information
waleedhammam committed Nov 1, 2023
1 parent 3e8adbb commit 3905c53
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 0 deletions.
63 changes: 63 additions & 0 deletions eksctl-clusters/clusters/magdy-eksctl-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
name: magdy
region: eu-north-1
version: "1.27"
tags:
environment: "magdy"
delete-after: "7"
team: "pesto"

iam:
withOIDC: true
serviceRoleARN: "arn:aws:iam::894516026745:role/WeaveEksClusterRole"
serviceAccounts:
- metadata:
name: kustomize-controller
namespace: flux-system
attachPolicyARNs:
- "arn:aws:iam::894516026745:policy/WeaveSopsKmsDecrypt"
roleName: eksctl-magdy-sops-decrypt-role
roleOnly: true
- metadata:
name: external-dns
namespace: external-dns
attachPolicyARNs:
- "arn:aws:iam::894516026745:policy/AllowExternalDNSUpdates"
roleName: eksctl-magdy-route53-external-dns-role
roleOnly: false # create role and annotated service account

# Enable private access to the API server.
vpc:
clusterEndpoints:
privateAccess: true
publicAccess: true

nodeGroups:
- name: magdy-ng-1
instanceType: t3.medium
minSize: 3
maxSize: 3
desiredCapacity: 3
volumeSize: 10
privateNetworking: true
tags:
environment: "magdy"
delete-after: "7"
team: "pesto"
propagateASGTags: true
iam:
instanceProfileARN: "arn:aws:iam::894516026745:instance-profile/WeaveEksWorkerNodeRole"

gitops:
flux:
gitProvider: github
flags:
owner: "weaveworks"
repository: "clusters-config"
private: "true"
branch: "cluster-magdy"
namespace: "flux-system"
path: "eksctl-clusters/clusters/magdy"
17 changes: 17 additions & 0 deletions eksctl-clusters/clusters/magdy/common-kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: common
namespace: flux-system
spec:
interval: 30s
sourceRef:
kind: GitRepository
name: flux-system
path: ./eksctl-clusters/apps/common
prune: true
postBuild:
substitute:
CLUSTER_NAME: magdy
SSL_CERTIFICATE_ARN: arn:aws:acm:eu-north-1:894516026745:certificate/5f8813f2-b630-4d0d-8c34-8fb68ec166ac
Empty file.
Empty file.
16 changes: 16 additions & 0 deletions eksctl-clusters/clusters/magdy/flux-system/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml
patches:
- patch: |
apiVersion: v1
kind: ServiceAccount
metadata:
name: kustomize-controller
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::894516026745:role/eksctl-magdy-sops-decrypt-role
target:
kind: ServiceAccount
name: kustomize-controller
20 changes: 20 additions & 0 deletions eksctl-clusters/clusters/magdy/gitops-kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: gitops
namespace: flux-system
spec:
interval: 30s
sourceRef:
kind: GitRepository
name: flux-system
path: ./eksctl-clusters/apps/gitops
prune: true
postBuild:
substitute:
USERNAME: wego-admin
PASSWORDHASH: $2a$10$6ErJr5BDz4xpS9QxtqeveuEl9.1bioDeRHFLNgqP31oTYNht3EC.a
CLUSTER_NAME: magdy
REPOSITORY: ghcr.io/weaveworks/wego-app
TAG: latest
18 changes: 18 additions & 0 deletions eksctl-clusters/clusters/magdy/secrets-kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: shared-secrets
namespace: flux-system
spec:
interval: 10m0s
sourceRef:
kind: GitRepository
name: flux-system
path: ./eksctl-clusters/shared-secrets
prune: true
decryption:
provider: sops
postBuild:
substitute:
ISSUER_URL: aHR0cHM6Ly9tYWdkeS1kZXguZW5nLXNhbmRib3gud2VhdmUud29ya3M=
REDIRECT_URL: aHR0cHM6Ly9tYWdkeS5lbmctc2FuZGJveC53ZWF2ZS53b3Jrcy9vYXV0aDIvY2FsbGJhY2s=

0 comments on commit 3905c53

Please sign in to comment.