diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index 0e24df5..9ec1a9c 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -67,7 +67,7 @@ jobs: - name: Generate TF Docs uses: terraform-docs/gh-actions@v1.0.0 with: - working-dir: addons/aws-ebs-csi-driver,addons/aws-efs-csi-driver,addons/aws-load-balancer-controller,addons/aws-node-termination-handler,addons/calico-tigera,addons/cluster-autoscaler,addons/external-secrets,addons/fluent-bit,addons/helm,addons/ingress-nginx,addons/istio-ingress,addons/karpenter,addons/kiali-server,addons/kubeclarity,addons/metrics-server,addons/nri-bundle,addons/velero,addons/kube-state-metrics,addons/keda,addons/reloader,addons/external-dns + working-dir: addons/aws-ebs-csi-driver,addons/aws-efs-csi-driver,addons/aws-load-balancer-controller,addons/aws-node-termination-handler,addons/calico-tigera,addons/cluster-autoscaler,addons/external-secrets,addons/fluent-bit,addons/helm,addons/ingress-nginx,addons/istio-ingress,addons/karpenter,addons/kiali-server,addons/kubeclarity,addons/metrics-server,addons/nri-bundle,addons/velero,addons/kube-state-metrics,addons/keda,addons/cert-manager,addons/filebeat,addons/reloader,addons/external-dns,addons/redis git-push: true template: |- diff --git a/_examples/basic/config/istio/virtual-service.yaml b/_examples/basic/config/istio/virtual-service.yaml index 78c38f3..ef6d182 100644 --- a/_examples/basic/config/istio/virtual-service.yaml +++ b/_examples/basic/config/istio/virtual-service.yaml @@ -1,6 +1,6 @@ # If application will be deployed using HelmChart(ChartName=myapp) then: # replace `appname` by `{{ include "myapp.fullname" . }}` and -# replace `istio-system` by `{{ include "myapp.namespace" . }}` +# replace `default` by `{{ include "myapp.namespace" . }}` apiVersion: networking.istio.io/v1beta1 kind: VirtualService diff --git a/_examples/basic/main.tf b/_examples/basic/main.tf index a0a1155..a5ea34a 100644 --- a/_examples/basic/main.tf +++ b/_examples/basic/main.tf @@ -177,6 +177,7 @@ module "addons" { certification_manager = true reloader = true external_dns = true + redis = true # -- Addons with mandatory variable istio_ingress = true diff --git a/_examples/complete/config/istio/virtual-service.yaml b/_examples/complete/config/istio/virtual-service.yaml index 78c38f3..ef6d182 100644 --- a/_examples/complete/config/istio/virtual-service.yaml +++ b/_examples/complete/config/istio/virtual-service.yaml @@ -1,6 +1,6 @@ # If application will be deployed using HelmChart(ChartName=myapp) then: # replace `appname` by `{{ include "myapp.fullname" . }}` and -# replace `istio-system` by `{{ include "myapp.namespace" . }}` +# replace `default` by `{{ include "myapp.namespace" . }}` apiVersion: networking.istio.io/v1beta1 kind: VirtualService diff --git a/_examples/complete/config/override-redis.yaml b/_examples/complete/config/override-redis.yaml new file mode 100644 index 0000000..258dc7e --- /dev/null +++ b/_examples/complete/config/override-redis.yaml @@ -0,0 +1,34 @@ +global: + storageClass: "" + redis: + password: "redisPassword" + +# -- master configuration parameters +master: + count: 1 + persistence: + size: 4Gi + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +# -- replicas configuration parameters +replica: + replicaCount: 3 + persistence: + size: 4Gi + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" \ No newline at end of file diff --git a/_examples/complete/main.tf b/_examples/complete/main.tf index e29d9cf..419e2a3 100644 --- a/_examples/complete/main.tf +++ b/_examples/complete/main.tf @@ -171,6 +171,8 @@ module "addons" { filebeat = true reloader = true external_dns = true + redis = true + # -- Addons with mandatory variable @@ -203,6 +205,8 @@ module "addons" { filebeat_helm_config = { values = [file("./config/override-filebeat.yaml")] } reloader_helm_config = { values = [file("./config/reloader/override-reloader.yaml")] } external_dns_helm_config = { values = [file("./config/override-external-dns.yaml")] } + redis_helm_config = { values = [file("./config/override-redis.yaml")] } + # -- Override Helm Release attributes metrics_server_extra_configs = var.metrics_server_extra_configs @@ -227,6 +231,7 @@ module "addons" { filebeat_extra_configs = var.filebeat_extra_configs reloader_extra_configs = var.reloader_extra_configs external_dns_extra_configs = var.external_dns_extra_configs + redis_extra_configs = var.redis_extra_configs # -- Custom IAM Policy Json for Addon's ServiceAccount cluster_autoscaler_iampolicy_json_content = file("./custom-iam-policies/cluster-autoscaler.json") diff --git a/_examples/complete/variables.tf b/_examples/complete/variables.tf index 04e01fa..86d4303 100644 --- a/_examples/complete/variables.tf +++ b/_examples/complete/variables.tf @@ -192,4 +192,13 @@ variable "reloader_extra_configs" { variable "external_dns_extra_configs" { type = any default = {} +} + +# ------------------ REDIS -------------------------------------------------- +variable "redis_extra_configs" { + type = any + default = { + atomic = true + timeout = 300 + } } \ No newline at end of file diff --git a/_examples/external-eks/README.md b/_examples/external-eks/README.md new file mode 100644 index 0000000..2e565d2 --- /dev/null +++ b/_examples/external-eks/README.md @@ -0,0 +1,3 @@ +## examples/external-eks + +This example shows that, how to use terraform-aws-eks-addons module if your cluster is already created. diff --git a/_examples/external-eks/config/calico-tigera-values.yaml b/_examples/external-eks/config/calico-tigera-values.yaml new file mode 100644 index 0000000..ca6601b --- /dev/null +++ b/_examples/external-eks/config/calico-tigera-values.yaml @@ -0,0 +1,11 @@ +installation: + kubernetesProvider: "EKS" + +## Using limits and requests +resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi \ No newline at end of file diff --git a/_examples/external-eks/config/external-secret/external-secret.yaml b/_examples/external-eks/config/external-secret/external-secret.yaml new file mode 100644 index 0000000..edc6218 --- /dev/null +++ b/_examples/external-eks/config/external-secret/external-secret.yaml @@ -0,0 +1,18 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: external-secret # -- Provide external secret name + namespace: kube-system # -- Do not change this namespace field +spec: + refreshInterval: 1h + secretStoreRef: + name: external-secrets-store # -- Provide previously created secret store name + kind: SecretStore + target: + name: externalsecret-data # -- Name of Kubernetes secret which will contain data specified below + creationPolicy: Owner + data: + - secretKey: external_secret_key # -- Kubernetes Secret `externalsecret-data` KEY name + remoteRef: + key: external_secrets_addon # -- AWS Secret Name, same as `var.external_secrets_extra_configs.secret_manager_name` + property: external_secret # -- AWS Secret-Manager secret key \ No newline at end of file diff --git a/_examples/external-eks/config/external-secret/override-values.yaml b/_examples/external-eks/config/external-secret/override-values.yaml new file mode 100644 index 0000000..bba530b --- /dev/null +++ b/_examples/external-eks/config/external-secret/override-values.yaml @@ -0,0 +1,24 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +## Using limits and requests + +resources: + limits: + cpu: 200m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/external-secret/secret-store.yaml b/_examples/external-eks/config/external-secret/secret-store.yaml new file mode 100644 index 0000000..95b2ccc --- /dev/null +++ b/_examples/external-eks/config/external-secret/secret-store.yaml @@ -0,0 +1,14 @@ +apiVersion: external-secrets.io/v1beta1 +kind: SecretStore +metadata: + name: external-secrets-store # -- Provide secret store name + namespace: kube-system # -- Do not change this namespace name +spec: + provider: + aws: + service: SecretsManager + region: us-east-1 # -- Provoide your cluster region + auth: + jwt: + serviceAccountRef: + name: external-secrets-sa # -- Do not change this name field \ No newline at end of file diff --git a/_examples/external-eks/config/external-secret/usage.yaml b/_examples/external-eks/config/external-secret/usage.yaml new file mode 100644 index 0000000..e6f2676 --- /dev/null +++ b/_examples/external-eks/config/external-secret/usage.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Pod +metadata: + name: ubuntu-pod + namespace: kube-system # -- keep this namespace same as ExternalSecret namespace + labels: + app: ubuntu-pod +spec: + containers: + - image: ubuntu + command: + - "sleep" + - "604800" + imagePullPolicy: IfNotPresent + name: ubuntu-pod + env: + - name: USER_1 # -- Environment variable of pod + valueFrom: + secretKeyRef: + name: externalsecret-data # -- kubernetes secret name + key: do_not_delete_this_key # -- Same as spec.data.secretKey field of ExternalSecret + optional: false + restartPolicy: Always \ No newline at end of file diff --git a/_examples/external-eks/config/istio/gateway-internal.yaml b/_examples/external-eks/config/istio/gateway-internal.yaml new file mode 100644 index 0000000..5025026 --- /dev/null +++ b/_examples/external-eks/config/istio/gateway-internal.yaml @@ -0,0 +1,17 @@ +# -- Make sure to use same Namespace for Gateway, Ingress & var.istio_ingress_extra_configs["namespace"], default namespace is set to `istio-system`. +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: istio-gateway-internal + namespace: istio-system +spec: + selector: + istio: ingress-internal + servers: + - hosts: + - "*.test.clouddrove.com" + - "test.clouddrove.com" + port: + number: 80 + name: http + protocol: HTTP diff --git a/_examples/external-eks/config/istio/gateway.yaml b/_examples/external-eks/config/istio/gateway.yaml new file mode 100644 index 0000000..7835154 --- /dev/null +++ b/_examples/external-eks/config/istio/gateway.yaml @@ -0,0 +1,17 @@ +# -- Make sure to use same Namespace for Gateway, Ingress & var.istio_ingress_extra_configs["namespace"], default namespace is set to `istio-system`. +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: istio-gateway + namespace: istio-system +spec: + selector: + istio: ingress + servers: + - hosts: + - "*.test.clouddrove.com" + - "test.clouddrove.com" + port: + number: 80 + name: http + protocol: HTTP diff --git a/_examples/external-eks/config/istio/ingress-internal.yaml b/_examples/external-eks/config/istio/ingress-internal.yaml new file mode 100644 index 0000000..3f249e9 --- /dev/null +++ b/_examples/external-eks/config/istio/ingress-internal.yaml @@ -0,0 +1,21 @@ +# -- Make sure to use same Namespace for Ingress, Gateway & var.istio_ingress_extra_configs["namespace"], default namespace is set to `istio-system`. +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: istio-ingress-internal + namespace: istio-system + annotations: + kubernetes.io/ingress.class: alb + alb.ingress.kubernetes.io/scheme: internal + alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' +spec: + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: istio-ingress-internal + port: + number: 80 \ No newline at end of file diff --git a/_examples/external-eks/config/istio/ingress.yaml b/_examples/external-eks/config/istio/ingress.yaml new file mode 100644 index 0000000..34a6f0a --- /dev/null +++ b/_examples/external-eks/config/istio/ingress.yaml @@ -0,0 +1,21 @@ +# -- Make sure to use same Namespace for Ingress, Gateway & var.istio_ingress_extra_configs["namespace"], default namespace is set to `istio-system`. +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: istio-ingress + namespace: istio-system + annotations: + kubernetes.io/ingress.class: alb + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' +spec: + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: istio-ingress + port: + number: 80 \ No newline at end of file diff --git a/_examples/external-eks/config/istio/override-values.yaml b/_examples/external-eks/config/istio/override-values.yaml new file mode 100644 index 0000000..07396c6 --- /dev/null +++ b/_examples/external-eks/config/istio/override-values.yaml @@ -0,0 +1,6 @@ +global: + defaultNodeSelector: + "eks.amazonaws.com/nodegroup" : "critical" + +service: + type: NodePort \ No newline at end of file diff --git a/_examples/external-eks/config/istio/virtual-service.yaml b/_examples/external-eks/config/istio/virtual-service.yaml new file mode 100644 index 0000000..ef6d182 --- /dev/null +++ b/_examples/external-eks/config/istio/virtual-service.yaml @@ -0,0 +1,27 @@ +# If application will be deployed using HelmChart(ChartName=myapp) then: +# replace `appname` by `{{ include "myapp.fullname" . }}` and +# replace `default` by `{{ include "myapp.namespace" . }}` + +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + meta.helm.sh/release-name: appname + meta.helm.sh/release-namespace: default + generation: 1 + labels: + app.kubernetes.io/instance: appname + app.kubernetes.io/name: appname + name: appname + namespace: default +spec: + gateways: + - istio-system/istio-gateway + hosts: + - test.clouddrove.com + http: + - route: + - destination: + host: appname + port: + number: 80 diff --git a/_examples/external-eks/config/keda/override-keda.yaml b/_examples/external-eks/config/keda/override-keda.yaml new file mode 100644 index 0000000..d169381 --- /dev/null +++ b/_examples/external-eks/config/keda/override-keda.yaml @@ -0,0 +1,9 @@ +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" \ No newline at end of file diff --git a/_examples/external-eks/config/keda/strategy_example.yaml b/_examples/external-eks/config/keda/strategy_example.yaml new file mode 100644 index 0000000..7e1a12b --- /dev/null +++ b/_examples/external-eks/config/keda/strategy_example.yaml @@ -0,0 +1,36 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: nginx-deployment + namespace: nginx +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: nginx # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 5 # Optional. Default: 5 seconds + cooldownPeriod: 20 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 10 # Optional. Default: 100 + fallback: # Optional. Section to specify fallback options + failureThreshold: 3 # Mandatory if fallback section is included + replicas: 1 # Mandatory if fallback section is included + advanced: # Optional. Section to specify advanced options + restoreToOriginalReplicaCount: true # Optional. Default: false + horizontalPodAutoscalerConfig: # Optional. Section to specify HPA related options + name: keda-hpa-nginx # Optional. Default: keda-hpa-{scaled-object-name} + behavior: # Optional. Use to modify HPA's scaling behavior + scaleDown: + stabilizationWindowSeconds: 60 + policies: + - type: Percent + value: 100 + periodSeconds: 15 + triggers: + - type: cron + metadata: + # Required + timezone: Asia/Kolkata # The acceptable values would be a value from the IANA Time Zone Database. + start: "12 00 * * *" + end: "15 00 * * *" + desiredReplicas: "5" \ No newline at end of file diff --git a/_examples/external-eks/config/kiali/kiali_vs.yaml b/_examples/external-eks/config/kiali/kiali_vs.yaml new file mode 100644 index 0000000..3b8fae3 --- /dev/null +++ b/_examples/external-eks/config/kiali/kiali_vs.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: kiali + namespace: istio-system +spec: + hosts: + - dash.test.clouddrove.com + gateways: + - istio-system/istio-gateway + http: + - route: + - destination: + host: kiali + port: + number: 20001 \ No newline at end of file diff --git a/_examples/external-eks/config/kiali/override-values.yaml b/_examples/external-eks/config/kiali/override-values.yaml new file mode 100644 index 0000000..86eeb7e --- /dev/null +++ b/_examples/external-eks/config/kiali/override-values.yaml @@ -0,0 +1,21 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" +deployment: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +## Using limits and requests + + resources: + limits: + cpu: 200m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi diff --git a/_examples/external-eks/config/override-aws-ebs-csi-driver.yaml b/_examples/external-eks/config/override-aws-ebs-csi-driver.yaml new file mode 100644 index 0000000..b278543 --- /dev/null +++ b/_examples/external-eks/config/override-aws-ebs-csi-driver.yaml @@ -0,0 +1,42 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" +controller: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + ## Using limits and requests + resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +node: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + + ## Using limits and requests + resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-aws-efs-csi-driver.yaml b/_examples/external-eks/config/override-aws-efs-csi-driver.yaml new file mode 100644 index 0000000..0a124c6 --- /dev/null +++ b/_examples/external-eks/config/override-aws-efs-csi-driver.yaml @@ -0,0 +1,23 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +## Using limits and requests +resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-aws-load-balancer-controller.yaml b/_examples/external-eks/config/override-aws-load-balancer-controller.yaml new file mode 100644 index 0000000..0a124c6 --- /dev/null +++ b/_examples/external-eks/config/override-aws-load-balancer-controller.yaml @@ -0,0 +1,23 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +## Using limits and requests +resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-aws-node-termination-handler.yaml b/_examples/external-eks/config/override-aws-node-termination-handler.yaml new file mode 100644 index 0000000..bba530b --- /dev/null +++ b/_examples/external-eks/config/override-aws-node-termination-handler.yaml @@ -0,0 +1,24 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +## Using limits and requests + +resources: + limits: + cpu: 200m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-certification-manager.yaml b/_examples/external-eks/config/override-certification-manager.yaml new file mode 100644 index 0000000..3874dd0 --- /dev/null +++ b/_examples/external-eks/config/override-certification-manager.yaml @@ -0,0 +1,21 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +resources: + limits: + cpu: 200m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +installCRDs: true diff --git a/_examples/external-eks/config/override-cluster-autoscaler.yaml b/_examples/external-eks/config/override-cluster-autoscaler.yaml new file mode 100644 index 0000000..38a7302 --- /dev/null +++ b/_examples/external-eks/config/override-cluster-autoscaler.yaml @@ -0,0 +1,24 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + + +## Using limits and requests +resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-filebeat.yaml b/_examples/external-eks/config/override-filebeat.yaml new file mode 100644 index 0000000..3b8b764 --- /dev/null +++ b/_examples/external-eks/config/override-filebeat.yaml @@ -0,0 +1,113 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" +daemonset: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + ## Using limits and requests + resources: + limits: + cpu: "300m" + memory: "200Mi" + requests: + cpu: 100m + memory: 100Mi + # Include the daemonset + enabled: true + extraEnvs: + - name: "ELASTICSEARCH_USERNAME" + valueFrom: + secretKeyRef: + name: elasticsearch-master-credentials + key: username + - name: "ELASTICSEARCH_PASSWORD" + valueFrom: + secretKeyRef: + name: elasticsearch-master-credentials + key: password + # Allows you to add any config files in /usr/share/filebeat + # such as filebeat.yml for daemonset + filebeatConfig: + filebeat.yml: | + filebeat.inputs: + - type: container + paths: + - /var/log/containers/*.log + processors: + - add_kubernetes_metadata: + host: ${NODE_NAME} + matchers: + - logs_path: + logs_path: "/var/log/containers/" + + output.elasticsearch: + host: '${NODE_NAME}' + hosts: '["https://${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}"]' + username: '${ELASTICSEARCH_USERNAME}' + password: '${ELASTICSEARCH_PASSWORD}' + protocol: https + ssl.certificate_authorities: ["/usr/share/filebeat/certs/ca.crt"] + # A list of secrets and their paths to mount inside the pod + # This is useful for mounting certificates for security other sensitive values + secretMounts: + - name: elasticsearch-master-certs + secretName: elasticsearch-master-certs + path: /usr/share/filebeat/certs/ + +deployment: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + + ## Using limits and requests + resources: + limits: + cpu: "300m" + memory: "200Mi" + requests: + cpu: 100m + memory: 100Mi + + extraEnvs: + - name: "ELASTICSEARCH_USERNAME" + valueFrom: + secretKeyRef: + name: elasticsearch-master-credentials + key: username + - name: "ELASTICSEARCH_PASSWORD" + valueFrom: + secretKeyRef: + name: elasticsearch-master-credentials + key: password + # such as filebeat.yml for deployment + filebeatConfig: + filebeat.yml: | + filebeat.inputs: + - type: log + paths: + - /usr/share/filebeat/logs/filebeat + + output.elasticsearch: + host: "${NODE_NAME}" + hosts: '["https://${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}"]' + username: "${ELASTICSEARCH_USERNAME}" + password: "${ELASTICSEARCH_PASSWORD}" + protocol: https + ssl.certificate_authorities: ["/usr/share/filebeat/certs/ca.crt"] + # A list of secrets and their paths to mount inside the pod + # This is useful for mounting certificates for security other sensitive values + secretMounts: + - name: elasticsearch-master-certs + secretName: elasticsearch-master-certs + path: /usr/share/filebeat/certs/ \ No newline at end of file diff --git a/_examples/external-eks/config/override-fluent-bit.yaml b/_examples/external-eks/config/override-fluent-bit.yaml new file mode 100644 index 0000000..bf2207e --- /dev/null +++ b/_examples/external-eks/config/override-fluent-bit.yaml @@ -0,0 +1,85 @@ +## -- Node affinity for particular node in which labels key is "Infra-Services" and value is "true" +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + + +## -- Using limits and requests +resources: + limits: + cpu: 150m + memory: 150Mi + requests: + cpu: 100m + memory: 90Mi + +podAnnotations: + co.elastic.logs/enabled: "true" + + +# -- Configuration to use Amazon CloudWatch LogGroup for logs having word `application` in it. +config: + service: | + [SERVICE] + Flush 5 + Grace 30 + Log_Level info + Daemon off + Parsers_File parsers.conf + HTTP_Server On + HTTP_Listen 0.0.0.0 + HTTP_Port {{ .Values.metricsPort }} + storage.path /var/fluent-bit/state/flb-storage/ + storage.sync normal + storage.checksum off + storage.backlog.mem_limit 5M + + inputs: | + [INPUT] + Name tail + Tag application.* + Path /var/log/containers/*.log + multiline.parser docker, cri + Mem_Buf_Limit 50MB + Skip_Long_Lines On + + [INPUT] + Name tail + Tag application.* + Path /var/log/containers/fluent-bit* + multiline.parser docker, cri + Mem_Buf_Limit 5MB + Skip_Long_Lines On + + [INPUT] + Name tail + Tag application.* + Path /var/log/containers/cloudwatch-agent* + multiline.parser docker, cri + Mem_Buf_Limit 5MB + Skip_Long_Lines On + + filters: | + [FILTER] + Name kubernetes + Match application.* + Merge_Log On + K8S-Logging.Parser On + K8S-Logging.Exclude On + + outputs: | + [OUTPUT] + Name cloudwatch_logs + Match application.* + region {{ .Values.eks_configs.region }} + log_group_name /aws/containerinsights/{{ .Values.eks_configs.cluster_name }}/application + auto_create_group true + extra_user_agent container-insights + log_stream_prefix eks- + log_retention_days 7 \ No newline at end of file diff --git a/_examples/external-eks/config/override-ingress-nginx.yaml b/_examples/external-eks/config/override-ingress-nginx.yaml new file mode 100644 index 0000000..168610a --- /dev/null +++ b/_examples/external-eks/config/override-ingress-nginx.yaml @@ -0,0 +1,46 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + + +## Using limits and requests + +resources: + limits: + cpu: 150m + memory: 150Mi + requests: + cpu: 100m + memory: 90Mi + +podAnnotations: + co.elastic.logs/enabled: "true" + +## Override values for ingress nginx + +controller: + service: + annotations: + kubernetes.io/ingress.class: nginx + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp + service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true' + service.beta.kubernetes.io/aws-load-balancer-type: nlb + service.beta.kubernetes.io/aws-load-balancer-external: "true" + external: + enabled: true + internal: + enabled: true + annotations: + kubernetes.io/ingress.class: nginx + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp + service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true' + service.beta.kubernetes.io/aws-load-balancer-type: nlb + service.beta.kubernetes.io/aws-load-balancer-internal: "true" \ No newline at end of file diff --git a/_examples/external-eks/config/override-karpenter.yaml b/_examples/external-eks/config/override-karpenter.yaml new file mode 100644 index 0000000..4eda255 --- /dev/null +++ b/_examples/external-eks/config/override-karpenter.yaml @@ -0,0 +1,22 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +## Using limits and requests +resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-kube-state-matrics.yaml b/_examples/external-eks/config/override-kube-state-matrics.yaml new file mode 100644 index 0000000..38a7302 --- /dev/null +++ b/_examples/external-eks/config/override-kube-state-matrics.yaml @@ -0,0 +1,24 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + + +## Using limits and requests +resources: + limits: + cpu: 300m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-kubeclarity.yaml b/_examples/external-eks/config/override-kubeclarity.yaml new file mode 100644 index 0000000..591a9ae --- /dev/null +++ b/_examples/external-eks/config/override-kubeclarity.yaml @@ -0,0 +1,27 @@ +## Using limits and requests +kubeclarity: + resources: + limits: + memory: "500Mi" + cpu: "200m" + requests: + memory: "200Mi" + cpu: "100m" + + podAnnotations: + co.elastic.logs/enabled: "true" + + # -- Application Load Balancer + ingress: + enabled: true + labels: {} + annotations: + kubernetes.io/ingress.class: alb + alb.ingress.kubernetes.io/group.name: ingress + alb.ingress.kubernetes.io/load-balancer-name: kubeclarity-eks-alb + alb.ingress.kubernetes.io/target-type: ip + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' + + hosts: + - host: test.addons.com \ No newline at end of file diff --git a/_examples/external-eks/config/override-metrics-server.yaml b/_examples/external-eks/config/override-metrics-server.yaml new file mode 100644 index 0000000..7d0199f --- /dev/null +++ b/_examples/external-eks/config/override-metrics-server.yaml @@ -0,0 +1,33 @@ +## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +## Particular args to be passed in deployment + +extraArgs: + - --kubelet-preferred-address-types=InternalIP + - --v=2 + +apiService: + create: true + +## Using limits and requests + +resources: + limits: + cpu: 200m + memory: 250Mi + requests: + cpu: 50m + memory: 150Mi + +podAnnotations: + co.elastic.logs/enabled: "true" diff --git a/_examples/external-eks/config/override-new-relic.yaml b/_examples/external-eks/config/override-new-relic.yaml new file mode 100644 index 0000000..1978e10 --- /dev/null +++ b/_examples/external-eks/config/override-new-relic.yaml @@ -0,0 +1,10 @@ +# Configuration settings for the newrelic-infrastructure chart +newrelic-infrastructure: + # Any key defined in the values.yml file for the newrelic-infrastructure chart can be configured here: + # https://github.com/newrelic/nri-kubernetes/blob/main/charts/newrelic-infrastructure/values.yaml + + verboseLog: false + +global: + # Get your free licence key from here by signing in into the new-relic account - https://newrelic.com/signup + licenseKey: YOUR_LICENSE_KEY # The license key for your New Relic Account. This will be preferred configuration option if both licenseKey and customSecret are specified \ No newline at end of file diff --git a/_examples/external-eks/config/override-redis.yaml b/_examples/external-eks/config/override-redis.yaml new file mode 100644 index 0000000..258dc7e --- /dev/null +++ b/_examples/external-eks/config/override-redis.yaml @@ -0,0 +1,34 @@ +global: + storageClass: "" + redis: + password: "redisPassword" + +# -- master configuration parameters +master: + count: 1 + persistence: + size: 4Gi + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + +# -- replicas configuration parameters +replica: + replicaCount: 3 + persistence: + size: 4Gi + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" \ No newline at end of file diff --git a/_examples/external-eks/config/override-velero.yaml b/_examples/external-eks/config/override-velero.yaml new file mode 100644 index 0000000..cb8d398 --- /dev/null +++ b/_examples/external-eks/config/override-velero.yaml @@ -0,0 +1,36 @@ +initContainers: + - name: velero-plugin-for-aws + image: velero/velero-plugin-for-aws:v1.7.0 + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: /target + name: plugins + +## Parameters for the `default` BackupStorageLocation and VolumeSnapshotLocation, +## and additional server settings. +configuration: + backupStorageLocation: + - name: aws + default: "true" + provider: aws + + volumeSnapshotLocation: + - name: aws + provider: aws + config: + region: "us-east-1" + + +# Info about the secret to be used by the Velero deployment, which +# should contain credentials for the cloud provider IAM account you've +# set up for Velero. +credentials: + useSecret: false + secretContents: {} + + +# Whether to deploy the node-agent daemonset. +deployNodeAgent: true +nodeAgent: + podVolumePath: /var/lib/kubelet/pods + privileged: true \ No newline at end of file diff --git a/_examples/external-eks/config/reloader/override-reloader.yaml b/_examples/external-eks/config/reloader/override-reloader.yaml new file mode 100644 index 0000000..579d80e --- /dev/null +++ b/_examples/external-eks/config/reloader/override-reloader.yaml @@ -0,0 +1,20 @@ +reloader: + deployment: + # If you wish to run multiple replicas set reloader.enableHA = true + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "eks.amazonaws.com/nodegroup" + operator: In + values: + - "critical" + + resources: + limits: + cpu: "100m" + memory: "512Mi" + requests: + cpu: "10m" + memory: "128Mi" \ No newline at end of file diff --git a/_examples/external-eks/config/reloader/reloader_example.yaml b/_examples/external-eks/config/reloader/reloader_example.yaml new file mode 100644 index 0000000..fa6e179 --- /dev/null +++ b/_examples/external-eks/config/reloader/reloader_example.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + labels: + app: nginx + annotations: + # configmap.reloader.stakater.com/reload: "test-configmap" + # secret.reloader.stakater.com/reload: "test-secret" + reloader.stakater.com/auto: "true" +spec: + replicas: 2 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx + ports: + - containerPort: 80 + env: + - name: TEST_ENV + valueFrom: + configMapKeyRef: + name: test-configmap + key: test_env + - name: TEST_PASS + valueFrom: + secretKeyRef: + name: test-secret + key: pass \ No newline at end of file diff --git a/_examples/external-eks/custom-iam-policies/cluster-autoscaler.json b/_examples/external-eks/custom-iam-policies/cluster-autoscaler.json new file mode 100644 index 0000000..d29a27d --- /dev/null +++ b/_examples/external-eks/custom-iam-policies/cluster-autoscaler.json @@ -0,0 +1,29 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "autoscaling:DescribeAutoScalingGroups", + "autoscaling:DescribeAutoScalingInstances", + "autoscaling:DescribeLaunchConfigurations", + "autoscaling:DescribeScalingActivities", + "autoscaling:DescribeTags", + "ec2:DescribeInstanceTypes", + "ec2:DescribeLaunchTemplateVersions" + ], + "Resource": ["*"] + }, + { + "Effect": "Allow", + "Action": [ + "autoscaling:SetDesiredCapacity", + "autoscaling:TerminateInstanceInAutoScalingGroup", + "ec2:DescribeImages", + "ec2:GetInstanceTypesFromInstanceRequirements", + "eks:DescribeNodegroup" + ], + "Resource": ["*"] + } + ] + } \ No newline at end of file diff --git a/_examples/external-eks/custom-iam-policies/external-secrets.json b/_examples/external-eks/custom-iam-policies/external-secrets.json new file mode 100644 index 0000000..6cd1657 --- /dev/null +++ b/_examples/external-eks/custom-iam-policies/external-secrets.json @@ -0,0 +1,14 @@ +{ + "Statement": [ + { + "Action": [ + "secretsmanager:GetSecretValue", + "secretsmanager:DescribeSecret" + ], + "Effect": "Allow", + "Resource": "arn:aws:secretsmanager:us-east-1:12345678912:secret:external_secrets_addon", + "Sid": "ExternalSecretsDefault" + } + ], + "Version": "2012-10-17" +} \ No newline at end of file diff --git a/_examples/external-eks/main.tf b/_examples/external-eks/main.tf new file mode 100644 index 0000000..dbdfc6a --- /dev/null +++ b/_examples/external-eks/main.tf @@ -0,0 +1,95 @@ +# ------------------------------------------------------------------------------ +# Resources +# ------------------------------------------------------------------------------ + +locals { + name = "test-eks-cluster" + region = "us-east-1" +} + +module "addons" { + source = "../../" + + eks_cluster_name = local.name + + # -- Enable Addons + metrics_server = true + cluster_autoscaler = true + aws_load_balancer_controller = true + aws_node_termination_handler = true + aws_efs_csi_driver = true + aws_ebs_csi_driver = true + kube_state_metrics = true + karpenter = false # -- Set to `false` or comment line to Uninstall Karpenter if installed using terraform. + calico_tigera = true + new_relic = true + kubeclarity = true + ingress_nginx = true + fluent_bit = true + velero = true + keda = true + certification_manager = true + filebeat = true + reloader = true + redis = true + + + # -- Addons with mandatory variable + istio_ingress = true + istio_manifests = var.istio_manifests + kiali_server = true + kiali_manifests = var.kiali_manifests + external_secrets = true + + # -- Path of override-values.yaml file + metrics_server_helm_config = { values = [file("./config/override-metrics-server.yaml")] } + cluster_autoscaler_helm_config = { values = [file("./config/override-cluster-autoscaler.yaml")] } + karpenter_helm_config = { values = [file("./config/override-karpenter.yaml")] } + aws_load_balancer_controller_helm_config = { values = [file("./config/override-aws-load-balancer-controller.yaml")] } + aws_node_termination_handler_helm_config = { values = [file("./config/override-aws-node-termination-handler.yaml")] } + aws_efs_csi_driver_helm_config = { values = [file("./config/override-aws-efs-csi-driver.yaml")] } + aws_ebs_csi_driver_helm_config = { values = [file("./config/override-aws-ebs-csi-driver.yaml")] } + calico_tigera_helm_config = { values = [file("./config/calico-tigera-values.yaml")] } + istio_ingress_helm_config = { values = [file("./config/istio/override-values.yaml")] } + kiali_server_helm_config = { values = [file("./config/kiali/override-values.yaml")] } + external_secrets_helm_config = { values = [file("./config/external-secret/override-values.yaml")] } + ingress_nginx_helm_config = { values = [file("./config/override-ingress-nginx.yaml")] } + kubeclarity_helm_config = { values = [file("./config/override-kubeclarity.yaml")] } + fluent_bit_helm_config = { values = [file("./config/override-fluent-bit.yaml")] } + velero_helm_config = { values = [file("./config/override-velero.yaml")] } + new_relic_helm_config = { values = [file("./config/override-new-relic.yaml")] } + kube_state_metrics_helm_config = { values = [file("./config/override-kube-state-matrics.yaml")] } + keda_helm_config = { values = [file("./config/keda/override-keda.yaml")] } + certification_manager_helm_config = { values = [file("./config/override-certification-manager.yaml")] } + filebeat_helm_config = { values = [file("./config/override-filebeat.yaml")] } + reloader_helm_config = { values = [file("./config/reloader/override-reloader.yaml")] } + redis_helm_config = { values = [file("./config/override-redis.yaml")] } + + # -- Override Helm Release attributes + metrics_server_extra_configs = var.metrics_server_extra_configs + cluster_autoscaler_extra_configs = var.cluster_autoscaler_extra_configs + karpenter_extra_configs = var.karpenter_extra_configs + aws_load_balancer_controller_extra_configs = var.aws_load_balancer_controller_extra_configs + aws_node_termination_handler_extra_configs = var.aws_node_termination_handler_extra_configs + aws_efs_csi_driver_extra_configs = var.aws_efs_csi_driver_extra_configs + aws_ebs_csi_driver_extra_configs = var.aws_ebs_csi_driver_extra_configs + calico_tigera_extra_configs = var.calico_tigera_extra_configs + istio_ingress_extra_configs = var.istio_ingress_extra_configs + kiali_server_extra_configs = var.kiali_server_extra_configs + ingress_nginx_extra_configs = var.ingress_nginx_extra_configs + kubeclarity_extra_configs = var.kubeclarity_extra_configs + fluent_bit_extra_configs = var.fluent_bit_extra_configs + velero_extra_configs = var.velero_extra_configs + new_relic_extra_configs = var.new_relic_extra_configs + kube_state_metrics_extra_configs = var.kube_state_metrics_extra_configs + keda_extra_configs = var.keda_extra_configs + certification_manager_extra_configs = var.certification_manager_extra_configs + external_secrets_extra_configs = var.external_secrets_extra_configs + filebeat_extra_configs = var.filebeat_extra_configs + reloader_extra_configs = var.reloader_extra_configs + redis_extra_configs = var.redis_extra_configs + + + # -- Custom IAM Policy Json for Addon's ServiceAccount + external_secrets_iampolicy_json_content = file("./custom-iam-policies/external-secrets.json") +} diff --git a/_examples/external-eks/outputs.tf b/_examples/external-eks/outputs.tf new file mode 100644 index 0000000..32352ae --- /dev/null +++ b/_examples/external-eks/outputs.tf @@ -0,0 +1,15 @@ +# ------------------------------------------------------------------------------ +# Outputs +# ------------------------------------------------------------------------------ + +output "update_kubeconfig" { + value = "aws eks update-kubeconfig --name ${local.name} --region ${local.region}" +} + +output "velero_post_installation" { + value = indent(2, "Once velero server is up and running you need the client before you can use it - \n 1. wget https://github.com/vmware-tanzu/velero/releases/download/v1.11.1/velero-v1.11.1-darwin-amd64.tar.gz \n 2. tar -xvf velero-v1.11.1-darwin-amd64.tar.gz -C velero-client") +} + +output "istio-ingress" { + value = indent(2, "Istio does not support the installation of istio-helmchart in a namespace other than istio-system. We have provided a namespace feature in case Istio-helmchart maintainers fix this issue.") +} \ No newline at end of file diff --git a/_examples/external-eks/providers.tf b/_examples/external-eks/providers.tf new file mode 100644 index 0000000..690a348 --- /dev/null +++ b/_examples/external-eks/providers.tf @@ -0,0 +1,34 @@ +# ------------------------------------------------------------------------------ +# Providers +# ------------------------------------------------------------------------------ +provider "aws" { + region = local.region +} + +provider "kubernetes" { + host = data.aws_eks_cluster.eks_cluster.endpoint + cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks_cluster.certificate_authority[0].data) + token = join("", data.aws_eks_cluster_auth.eks_cluster[*].token) +} + +provider "helm" { + kubernetes { + host = data.aws_eks_cluster.eks_cluster.endpoint + cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks_cluster.certificate_authority[0].data) + token = join("", data.aws_eks_cluster_auth.eks_cluster[*].token) + } +} + +provider "kubectl" { + host = data.aws_eks_cluster.eks_cluster.endpoint + cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks_cluster.certificate_authority[0].data) + token = join("", data.aws_eks_cluster_auth.eks_cluster[*].token) +} + +data "aws_eks_cluster_auth" "eks_cluster" { + name = data.aws_eks_cluster.eks_cluster.id +} + +data "aws_eks_cluster" "eks_cluster" { + name = local.name +} \ No newline at end of file diff --git a/_examples/external-eks/variables.tf b/_examples/external-eks/variables.tf new file mode 100644 index 0000000..dcc64dd --- /dev/null +++ b/_examples/external-eks/variables.tf @@ -0,0 +1,174 @@ +# ------------------------------------------------------------------------------ +# Variables +# ------------------------------------------------------------------------------ + +# ------------------ METRICS SERVER -------------------------------------------- +variable "metrics_server_extra_configs" { + type = any + default = {} +} + +# ------------------ CLUSTER AUTOSCALER ---------------------------------------- +variable "cluster_autoscaler_extra_configs" { + type = any + default = {} +} + +# ------------------ KARPENTER ------------------------------------------------- +variable "karpenter_extra_configs" { + type = any + default = {} +} + +# ------------------ LOAD BALANCER CONTROLLER ---------------------------------- +variable "aws_load_balancer_controller_extra_configs" { + type = any + default = {} +} + +# ------------------ NODE TERMINATION HANDLER ---------------------------------- +variable "aws_node_termination_handler_extra_configs" { + type = any + default = {} +} + +# ------------------ EFS CSI DRIVER -------------------------------------------- +variable "aws_efs_csi_driver_extra_configs" { + type = any + default = {} +} + +# ------------------ EBS CSI DRIVER -------------------------------------------- +variable "aws_ebs_csi_driver_extra_configs" { + type = any + default = {} +} + +# ------------------ CALICO ---------------------------------------------------- +variable "calico_tigera_extra_configs" { + type = any + default = {} +} + +# ------------------ NGINX INGRESS --------------------------------------------- +variable "ingress_nginx_extra_configs" { + type = any + default = {} +} + +# ------------------ KUBECLARITY ----------------------------------------------- +variable "kubeclarity_extra_configs" { + type = any + default = {} +} + +# ------------------ FLUENT-BIT ------------------------------------------------ +variable "fluent_bit_extra_configs" { + type = any + default = { + atomic = true + timeout = 300 + } +} + +# ------------------ VELERO ---------------------------------------------------- +variable "velero_extra_configs" { + type = any + default = { + timeout = 300 + atomic = true + bucket_name = "velero-addons" + } +} + +# ------------------ NEW-RELIC ------------------------------------------------- +variable "new_relic_extra_configs" { + type = any + default = {} +} + +# ------------------ KUBE STATE METRICS ---------------------------------------- +variable "kube_state_metrics_extra_configs" { + type = any + default = {} +} + +# ------------------ KEDA ----------------------------------------------------- +variable "keda_extra_configs" { + type = any + default = {} +} + +# ------------------ CERTIFICATION-MANAGER ----------------------------------------------------- +variable "certification_manager_extra_configs" { + type = any + default = {} +} + + +# ------------------ ISTIO INGRESS --------------------------------------------- +# -- INTERNET FACING -------------- +variable "istio_manifests" { + type = object({ + istio_ingress_manifest_file_path = list(any) + istio_gateway_manifest_file_path = list(any) + }) + default = { + istio_ingress_manifest_file_path = ["./config/istio/ingress.yaml"] + istio_gateway_manifest_file_path = ["./config/istio/gateway.yaml"] + } + description = "Path to yaml manifests to create Ingress and Gateway with specified host" +} + +variable "istio_ingress_extra_configs" { + type = any + default = { + name = "istio-ingress" + namespace = "istio-system" + create_namespace = true + } +} + +#-----------KAILI DASHBOARD----------------------------------------------------- +variable "kiali_manifests" { + type = object({ + kiali_virtualservice_file_path = string + }) + default = { + kiali_virtualservice_file_path = "./config/kiali/kiali_vs.yaml" + } +} + +variable "kiali_server_extra_configs" { + type = any + default = {} +} + +# ------------------ EXTERNAL SECRETS ------------------------------------------ +variable "external_secrets_extra_configs" { + type = any + default = { + secret_manager_name = "external_secrets_addon" + } +} + +# ------------------ FILEBEAT ------------------------------------------------- +variable "filebeat_extra_configs" { + type = any + default = {} +} + +# ------------------ RELOADER -------------------------------------------------- +variable "reloader_extra_configs" { + type = any + default = {} +} + +# ------------------ REDIS -------------------------------------------------- +variable "redis_extra_configs" { + type = any + default = { + atomic = true + timeout = 300 + } +} \ No newline at end of file diff --git a/_examples/external-eks/versions.tf b/_examples/external-eks/versions.tf new file mode 100644 index 0000000..4ab6e25 --- /dev/null +++ b/_examples/external-eks/versions.tf @@ -0,0 +1,21 @@ +terraform { + required_version = ">= 1.0.0" + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 4.23" + } + kubernetes = { + source = "hashicorp/kubernetes" + version = ">= 2.13" + } + helm = { + source = "hashicorp/helm" + version = ">= 2.6" + } + kubectl = { + source = "gavinbunney/kubectl" + version = ">= 1.7.0" + } + } +} diff --git a/addons/redis/README.md b/addons/redis/README.md new file mode 100644 index 0000000..25ccf05 --- /dev/null +++ b/addons/redis/README.md @@ -0,0 +1,59 @@ +# Redis Cluster Helm Chart + +Redis is an advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. + + +## Installation +#### Prerequisites +- **AWS EBS CSI Driver** has to be installed on EKS cluster to provision PVC. +Below terraform script shows how to use Redis Terraform Addon, A complete example is also given [here](https://github.com/clouddrove/terraform-helm-eks-addons/blob/master/_examples/complete/main.tf). +```hcl +module "addons" { + source = "clouddrove/eks-addons/aws" + version = "0.1.2" + + depends_on = [module.eks] + eks_cluster_name = module.eks.cluster_name + + redis = true +} +``` + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.0.0 | +| [kubernetes](#requirement\_kubernetes) | >= 2.10 | + +## Providers + +| Name | Version | +|------|---------| +| [kubernetes](#provider\_kubernetes) | >= 2.10 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [helm\_addon](#module\_helm\_addon) | ../helm | n/a | + + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [addon\_context](#input\_addon\_context) | Input configuration for the addon |
object({| n/a | yes | +| [helm\_config](#input\_helm\_config) | Helm provider config for Redis Cluster | `any` | `{}` | no | +| [manage\_via\_gitops](#input\_manage\_via\_gitops) | Determines if the add-on should be managed via GitOps | `bool` | `false` | no | +| [redis\_extra\_configs](#input\_redis\_extra\_configs) | Override attributes of helm\_release terraform resource | `any` | `{}` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [chart\_version](#output\_chart\_version) | n/a | +| [namespace](#output\_namespace) | n/a | +| [repository](#output\_repository) | n/a | + diff --git a/addons/redis/config/redis.yaml b/addons/redis/config/redis.yaml new file mode 100644 index 0000000..ca76203 --- /dev/null +++ b/addons/redis/config/redis.yaml @@ -0,0 +1,1855 @@ +# Copyright VMware, Inc. +# SPDX-License-Identifier: APACHE-2.0 + +## @section Global parameters +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass +## + +## @param global.imageRegistry Global Docker image registry +## @param global.imagePullSecrets Global Docker registry secret names as an array +## @param global.storageClass Global StorageClass for Persistent Volume(s) +## @param global.redis.password Global Redis® password (overrides `auth.password`) +## +global: + imageRegistry: "" + ## E.g. + ## imagePullSecrets: + ## - myRegistryKeySecretName + ## + imagePullSecrets: [] + storageClass: "" + redis: + password: "" + +## @section Common parameters +## + +## @param kubeVersion Override Kubernetes version +## +kubeVersion: "" +## @param nameOverride String to partially override common.names.fullname +## +nameOverride: "" +## @param fullnameOverride String to fully override common.names.fullname +## +fullnameOverride: "" +## @param commonLabels Labels to add to all deployed objects +## +commonLabels: {} +## @param commonAnnotations Annotations to add to all deployed objects +## +commonAnnotations: {} +## @param secretAnnotations Annotations to add to secret +## +secretAnnotations: {} +## @param clusterDomain Kubernetes cluster domain name +## +clusterDomain: cluster.local +## @param extraDeploy Array of extra objects to deploy with the release +## +extraDeploy: [] +## @param useHostnames Use hostnames internally when announcing replication. If false, the hostname will be resolved to an IP address +## +useHostnames: true +## @param nameResolutionThreshold Failure threshold for internal hostnames resolution +## +nameResolutionThreshold: 5 +## @param nameResolutionTimeout Timeout seconds between probes for internal hostnames resolution +## +nameResolutionTimeout: 5 + +## Enable diagnostic mode in the deployment +## +diagnosticMode: + ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden) + ## + enabled: false + ## @param diagnosticMode.command Command to override all containers in the deployment + ## + command: + - sleep + ## @param diagnosticMode.args Args to override all containers in the deployment + ## + args: + - infinity + +## @section Redis® Image parameters +## + +## Bitnami Redis® image +## ref: https://hub.docker.com/r/bitnami/redis/tags/ +## @param image.registry Redis® image registry +## @param image.repository Redis® image repository +## @param image.tag Redis® image tag (immutable tags are recommended) +## @param image.digest Redis® image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag +## @param image.pullPolicy Redis® image pull policy +## @param image.pullSecrets Redis® image pull secrets +## @param image.debug Enable image debug mode +## +image: + registry: docker.io + repository: bitnami/redis + tag: 7.2.1-debian-11-r0 + digest: "" + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## e.g: + ## pullSecrets: + ## - myRegistryKeySecretName + ## + pullSecrets: [] + ## Enable debug mode + ## + debug: false + +## @section Redis® common configuration parameters +## https://github.com/bitnami/containers/tree/main/bitnami/redis#configuration +## + +## @param architecture Redis® architecture. Allowed values: `standalone` or `replication` +## +architecture: replication +## Redis® Authentication parameters +## ref: https://github.com/bitnami/containers/tree/main/bitnami/redis#setting-the-server-password-on-first-run +## +auth: + ## @param auth.enabled Enable password authentication + ## + enabled: true + ## @param auth.sentinel Enable password authentication on sentinels too + ## + sentinel: true + ## @param auth.password Redis® password + ## Defaults to a random 10-character alphanumeric string if not set + ## + password: "" + ## @param auth.existingSecret The name of an existing secret with Redis® credentials + ## NOTE: When it's set, the previous `auth.password` parameter is ignored + ## + existingSecret: "" + ## @param auth.existingSecretPasswordKey Password key to be retrieved from existing secret + ## NOTE: ignored unless `auth.existingSecret` parameter is set + ## + existingSecretPasswordKey: "" + ## @param auth.usePasswordFiles Mount credentials as files instead of using an environment variable + ## + usePasswordFiles: false + +## @param commonConfiguration [string] Common configuration to be added into the ConfigMap +## ref: https://redis.io/topics/config +## +commonConfiguration: |- + # Enable AOF https://redis.io/topics/persistence#append-only-file + appendonly yes + # Disable RDB persistence, AOF persistence already enabled. + save "" +## @param existingConfigmap The name of an existing ConfigMap with your custom configuration for Redis® nodes +## +existingConfigmap: "" + +## @section Redis® master configuration parameters +## + +master: + ## @param master.count Number of Redis® master instances to deploy (experimental, requires additional configuration) + ## + count: 1 + ## @param master.configuration Configuration for Redis® master nodes + ## ref: https://redis.io/topics/config + ## + configuration: "" + ## @param master.disableCommands Array with Redis® commands to disable on master nodes + ## Commands will be completely disabled by renaming each to an empty string. + ## ref: https://redis.io/topics/security#disabling-of-specific-commands + ## + disableCommands: + - FLUSHDB + - FLUSHALL + ## @param master.command Override default container command (useful when using custom images) + ## + command: [] + ## @param master.args Override default container args (useful when using custom images) + ## + args: [] + ## @param master.enableServiceLinks Whether information about services should be injected into pod's environment variable + ## + enableServiceLinks: true + ## @param master.preExecCmds Additional commands to run prior to starting Redis® master + ## + preExecCmds: [] + ## @param master.extraFlags Array with additional command line flags for Redis® master + ## e.g: + ## extraFlags: + ## - "--maxmemory-policy volatile-ttl" + ## - "--repl-backlog-size 1024mb" + ## + extraFlags: [] + ## @param master.extraEnvVars Array with extra environment variables to add to Redis® master nodes + ## e.g: + ## extraEnvVars: + ## - name: FOO + ## value: "bar" + ## + extraEnvVars: [] + ## @param master.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Redis® master nodes + ## + extraEnvVarsCM: "" + ## @param master.extraEnvVarsSecret Name of existing Secret containing extra env vars for Redis® master nodes + ## + extraEnvVarsSecret: "" + ## @param master.containerPorts.redis Container port to open on Redis® master nodes + ## + containerPorts: + redis: 6379 + ## Configure extra options for Redis® containers' liveness and readiness probes + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes + ## @param master.startupProbe.enabled Enable startupProbe on Redis® master nodes + ## @param master.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe + ## @param master.startupProbe.periodSeconds Period seconds for startupProbe + ## @param master.startupProbe.timeoutSeconds Timeout seconds for startupProbe + ## @param master.startupProbe.failureThreshold Failure threshold for startupProbe + ## @param master.startupProbe.successThreshold Success threshold for startupProbe + ## + startupProbe: + enabled: false + initialDelaySeconds: 20 + periodSeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + ## @param master.livenessProbe.enabled Enable livenessProbe on Redis® master nodes + ## @param master.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe + ## @param master.livenessProbe.periodSeconds Period seconds for livenessProbe + ## @param master.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe + ## @param master.livenessProbe.failureThreshold Failure threshold for livenessProbe + ## @param master.livenessProbe.successThreshold Success threshold for livenessProbe + ## + livenessProbe: + enabled: true + initialDelaySeconds: 20 + periodSeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + ## @param master.readinessProbe.enabled Enable readinessProbe on Redis® master nodes + ## @param master.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe + ## @param master.readinessProbe.periodSeconds Period seconds for readinessProbe + ## @param master.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe + ## @param master.readinessProbe.failureThreshold Failure threshold for readinessProbe + ## @param master.readinessProbe.successThreshold Success threshold for readinessProbe + ## + readinessProbe: + enabled: true + initialDelaySeconds: 20 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 5 + ## @param master.customStartupProbe Custom startupProbe that overrides the default one + ## + customStartupProbe: {} + ## @param master.customLivenessProbe Custom livenessProbe that overrides the default one + ## + customLivenessProbe: {} + ## @param master.customReadinessProbe Custom readinessProbe that overrides the default one + ## + customReadinessProbe: {} + ## Redis® master resource requests and limits + ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ + ## @param master.resources.limits The resources limits for the Redis® master containers + ## @param master.resources.requests The requested resources for the Redis® master containers + ## + resources: + limits: {} + requests: {} + ## Configure Pods Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod + ## @param master.podSecurityContext.enabled Enabled Redis® master pods' Security Context + ## @param master.podSecurityContext.fsGroup Set Redis® master pod's Security Context fsGroup + ## + podSecurityContext: + enabled: true + fsGroup: 1001 + ## Configure Container Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod + ## @param master.containerSecurityContext.enabled Enabled Redis® master containers' Security Context + ## @param master.containerSecurityContext.runAsUser Set Redis® master containers' Security Context runAsUser + ## @param master.containerSecurityContext.runAsGroup Set Redis® master containers' Security Context runAsGroup + ## @param master.containerSecurityContext.runAsNonRoot Set Redis® master containers' Security Context runAsNonRoot + ## @param master.containerSecurityContext.allowPrivilegeEscalation Is it possible to escalate Redis® pod(s) privileges + ## @param master.containerSecurityContext.seccompProfile.type Set Redis® master containers' Security Context seccompProfile + ## @param master.containerSecurityContext.capabilities.drop Set Redis® master containers' Security Context capabilities to drop + ## + containerSecurityContext: + enabled: true + runAsUser: 1001 + runAsGroup: 0 + runAsNonRoot: true + allowPrivilegeEscalation: false + seccompProfile: + type: RuntimeDefault + capabilities: + drop: + - ALL + ## @param master.kind Use either Deployment or StatefulSet (default) + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ + ## + kind: StatefulSet + ## @param master.schedulerName Alternate scheduler for Redis® master pods + ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ + ## + schedulerName: "" + ## @param master.updateStrategy.type Redis® master statefulset strategy type + ## @skip master.updateStrategy.rollingUpdate + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + ## + updateStrategy: + ## StrategyType + ## Can be set to RollingUpdate, OnDelete (statefulset), Recreate (deployment) + ## + type: RollingUpdate + ## @param master.minReadySeconds How many seconds a pod needs to be ready before killing the next, during update + ## + minReadySeconds: 0 + ## @param master.priorityClassName Redis® master pods' priorityClassName + ## + priorityClassName: "" + ## @param master.hostAliases Redis® master pods host aliases + ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ + ## + hostAliases: [] + ## @param master.podLabels Extra labels for Redis® master pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + ## + podLabels: {} + ## @param master.podAnnotations Annotations for Redis® master pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param master.shareProcessNamespace Share a single process namespace between all of the containers in Redis® master pods + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ + ## + shareProcessNamespace: false + ## @param master.podAffinityPreset Pod affinity preset. Ignored if `master.affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAffinityPreset: "" + ## @param master.podAntiAffinityPreset Pod anti-affinity preset. Ignored if `master.affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAntiAffinityPreset: soft + ## Node master.affinity preset + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity + ## + nodeAffinityPreset: + ## @param master.nodeAffinityPreset.type Node affinity preset type. Ignored if `master.affinity` is set. Allowed values: `soft` or `hard` + ## + type: "" + ## @param master.nodeAffinityPreset.key Node label key to match. Ignored if `master.affinity` is set + ## + key: "" + ## @param master.nodeAffinityPreset.values Node label values to match. Ignored if `master.affinity` is set + ## E.g. + ## values: + ## - e2e-az1 + ## - e2e-az2 + ## + values: [] + ## @param master.affinity Affinity for Redis® master pods assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: `master.podAffinityPreset`, `master.podAntiAffinityPreset`, and `master.nodeAffinityPreset` will be ignored when it's set + ## + affinity: {} + ## @param master.nodeSelector Node labels for Redis® master pods assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param master.tolerations Tolerations for Redis® master pods assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## @param master.topologySpreadConstraints Spread Constraints for Redis® master pod assignment + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + ## E.g. + ## topologySpreadConstraints: + ## - maxSkew: 1 + ## topologyKey: node + ## whenUnsatisfiable: DoNotSchedule + ## + topologySpreadConstraints: [] + ## @param master.dnsPolicy DNS Policy for Redis® master pod + ## ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + ## E.g. + ## dnsPolicy: ClusterFirst + ## + dnsPolicy: "" + ## @param master.dnsConfig DNS Configuration for Redis® master pod + ## ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + ## E.g. + ## dnsConfig: + ## options: + ## - name: ndots + ## value: "4" + ## - name: single-request-reopen + ## + dnsConfig: {} + ## @param master.lifecycleHooks for the Redis® master container(s) to automate configuration before or after startup + ## + lifecycleHooks: {} + ## @param master.extraVolumes Optionally specify extra list of additional volumes for the Redis® master pod(s) + ## + extraVolumes: [] + ## @param master.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Redis® master container(s) + ## + extraVolumeMounts: [] + ## @param master.sidecars Add additional sidecar containers to the Redis® master pod(s) + ## e.g: + ## sidecars: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## ports: + ## - name: portname + ## containerPort: 1234 + ## + sidecars: [] + ## @param master.initContainers Add additional init containers to the Redis® master pod(s) + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + ## e.g: + ## initContainers: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## command: ['sh', '-c', 'echo "hello world"'] + ## + initContainers: [] + ## Persistence parameters + ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## @param master.persistence.enabled Enable persistence on Redis® master nodes using Persistent Volume Claims + ## + enabled: true + ## @param master.persistence.medium Provide a medium for `emptyDir` volumes. + ## + medium: "" + ## @param master.persistence.sizeLimit Set this to enable a size limit for `emptyDir` volumes. + ## + sizeLimit: "" + ## @param master.persistence.path The path the volume will be mounted at on Redis® master containers + ## NOTE: Useful when using different Redis® images + ## + path: /data + ## @param master.persistence.subPath The subdirectory of the volume to mount on Redis® master containers + ## NOTE: Useful in dev environments + ## + subPath: "" + ## @param master.persistence.subPathExpr Used to construct the subPath subdirectory of the volume to mount on Redis® master containers + ## + subPathExpr: "" + ## @param master.persistence.storageClass Persistent Volume storage class + ## If defined, storageClassName:
aws_caller_identity_account_id = string
aws_caller_identity_arn = string
aws_eks_cluster_endpoint = string
aws_partition_id = string
aws_region_name = string
eks_cluster_id = string
eks_oidc_issuer_url = string
eks_oidc_provider_arn = string
tags = map(string)
})