Skip to content

Commit

Permalink
Merge pull request #164 from openinfradev/multiple_infra_provider
Browse files Browse the repository at this point in the history
support multiple infra provider
  • Loading branch information
zugwan authored Jun 24, 2022
2 parents 5e38848 + fa6e58c commit f8991af
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 198 deletions.
178 changes: 1 addition & 177 deletions tks-cluster-aws/base/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
type: helmrepo
repository: https://openinfradev.github.io/helm-repo
name: cluster-api-aws
version: 0.5.0
version: 0.6.0
releaseName: cluster-api-aws
targetNamespace: argo
values:
Expand Down Expand Up @@ -54,29 +54,6 @@ spec:
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: kubernetes-addons
name: kubernetes-addons
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://openinfradev.github.io/helm-repo
name: kubernetes-addons
version: 0.1.0
releaseName: kubernetes-addons
targetNamespace: taco-system
values:
cni:
calico:
enabled: true
storageclass:
enabled: true
wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: aws-ebs-csi-driver
Expand All @@ -93,156 +70,3 @@ spec:
values:
snapshotterSidecarEnabled: true
wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: ingress-nginx
name: ingress-nginx
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://kubernetes.github.io/ingress-nginx
name: ingress-nginx
version: 4.0.17
releaseName: ingress-nginx
targetNamespace: taco-system
values:
controller:
replicaCount: 2
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- ingress-nginx
topologyKey: "kubernetes.io/hostname"
service:
externalTrafficPolicy: Local
annotations:
service.beta.kubernetes.io/aws-load-balancer-name: "taco-ingress-nlb"
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
type: LoadBalancer
config:
enable-underscores-in-headers: "true"
use-proxy-protocol: "false"
enable-real-ip: "true"
proxy-body-size: "10m"
hostPort:
enabled: true
tcp:
"10254": 10254:healthz
wait: true
# ---
# apiVersion: helm.fluxcd.io/v1
# kind: HelmRelease
# metadata:
# labels:
# name: kubeseal
# name: kubeseal
# spec:
# helmVersion: v3
# chart:
# type: helmrepo
# repository:
# name: kubeseal
# version: 0.1.0
# releaseName: kubeseal
# targetNamespace: taco-system
# values:

# wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: kubed
name: kubed
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://charts.appscode.com/stable
name: kubed
version: v0.12.0
releaseName: kubed
targetNamespace: taco-system
values:

wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: cluster-autoscaler
name: cluster-autoscaler
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://openinfradev.github.io/helm-repo
name: cluster-autoscaler
version: 0.2.0
releaseName: cluster-autoscaler
targetNamespace: kube-system
values:
separateMgmtClusterEnabled: true
discoveryNamespace: TO_BE_FIXED
discoveryClusterName: TO_BE_FIXED
mgmtKubeconfigSecretName: mgmt-kubeconfig
wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: cluster-autoscaler-rbac
name: cluster-autoscaler-rbac
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://openinfradev.github.io/helm-repo
name: cluster-autoscaler
version: 0.2.0
releaseName: cluster-autoscaler-rbac
targetNamespace: argo
values:
deployMgmtRbacOnly:
enabled: true
targetNamespace: TO_BE_FIXED
wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: metrics-server
name: metrics-server
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://kubernetes-sigs.github.io/metrics-server/
name: metrics-server
version: 3.8.2
releaseName: metrics-server
targetNamespace: kube-system
values:
image:
repository: k8s.gcr.io/metrics-server/metrics-server
# a value 'tag' is guided in https://artifacthub.io/packages/helm/metrics-server/metrics-server but not applied on any template
# tag: ""
pullPolicy: IfNotPresent
args:
- --kubelet-insecure-tls
21 changes: 0 additions & 21 deletions tks-cluster-aws/base/site-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,3 @@ charts:
taco-lma: enabled
servicemesh: enabled
taco-ingress-gateway: enabled
job.taconode.enabled: true
job.argo.enabled: true
job.argo.url: argocd-v2.taco-cat.xyz
job.argo.password: aFgSFwjtrBRwKgci

- name: kubernetes-addons
override:
cni.calico.enabled: true
storageclass.enabled: true

- name: ingress-nginx
override:

- name: cluster-autoscaler
override:
discoveryNamespace: $(clusterName)
discoveryClusterName: $(clusterName)

- name: cluster-autoscaler-rbac
override:
deployMgmtRbacOnly.targetNamespace: $(clusterName)
5 changes: 5 additions & 0 deletions tks-cluster-common/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resources:
- resources.yaml

transformers:
- site-values.yaml
171 changes: 171 additions & 0 deletions tks-cluster-common/base/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: kubernetes-addons
name: kubernetes-addons
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://openinfradev.github.io/helm-repo
name: kubernetes-addons
version: 0.1.0
releaseName: kubernetes-addons
targetNamespace: taco-system
values:
cni:
calico:
enabled: true
storageclass:
enabled: true
wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: ingress-nginx
name: ingress-nginx
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://kubernetes.github.io/ingress-nginx
name: ingress-nginx
version: 4.0.17
releaseName: ingress-nginx
targetNamespace: taco-system
values:
controller:
replicaCount: 2
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- ingress-nginx
topologyKey: "kubernetes.io/hostname"
service:
externalTrafficPolicy: Local
config:
enable-underscores-in-headers: "true"
use-proxy-protocol: "false"
enable-real-ip: "true"
proxy-body-size: "10m"
hostPort:
enabled: true
tcp:
"10254": 10254:healthz
wait: true
# ---
# apiVersion: helm.fluxcd.io/v1
# kind: HelmRelease
# metadata:
# labels:
# name: kubeseal
# name: kubeseal
# spec:
# helmVersion: v3
# chart:
# type: helmrepo
# repository:
# name: kubeseal
# version: 0.1.0
# releaseName: kubeseal
# targetNamespace: taco-system
# values:

# wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: kubed
name: kubed
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://charts.appscode.com/stable
name: kubed
version: v0.12.0
releaseName: kubed
targetNamespace: taco-system
values:

wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: cluster-autoscaler
name: cluster-autoscaler
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://openinfradev.github.io/helm-repo
name: cluster-autoscaler
version: 0.2.0
releaseName: cluster-autoscaler
targetNamespace: kube-system
values:
separateMgmtClusterEnabled: true
discoveryNamespace: TO_BE_FIXED
discoveryClusterName: TO_BE_FIXED
mgmtKubeconfigSecretName: mgmt-kubeconfig
wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: cluster-autoscaler-rbac
name: cluster-autoscaler-rbac
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://openinfradev.github.io/helm-repo
name: cluster-autoscaler
version: 0.2.0
releaseName: cluster-autoscaler-rbac
targetNamespace: argo
values:
deployMgmtRbacOnly:
enabled: true
targetNamespace: TO_BE_FIXED
wait: true
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
labels:
name: metrics-server
name: metrics-server
spec:
helmVersion: v3
chart:
type: helmrepo
repository: https://kubernetes-sigs.github.io/metrics-server/
name: metrics-server
version: 3.8.2
releaseName: metrics-server
targetNamespace: kube-system
values:
image:
repository: k8s.gcr.io/metrics-server/metrics-server
# a value 'tag' is guided in https://artifacthub.io/packages/helm/metrics-server/metrics-server but not applied on any template
# tag: ""
pullPolicy: IfNotPresent
args:
- --kubelet-insecure-tls
Loading

0 comments on commit f8991af

Please sign in to comment.