1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
resource "kubernetes_manifest" "multiaz-provisioner" { computed_fields = ["spec.requirements"] manifest = yamldecode(<<EOF apiVersion: karpenter.sh/v1alpha5 kind: Provisioner metadata: name: multiaz spec: ttlSecondsAfterEmpty: 120 labels: provisioning: multiaz taints: - key: dedicated value: multiaz effect: NoSchedule requirements: - key: "kubernetes.io/arch" operator: In values: ["amd64"] - key: "karpenter.k8s.aws/instance-cpu" operator: In values: ["1", "2", "4"] - key: karpenter.k8s.aws/instance-category operator: In values: ["t", "m"] - key: karpenter.sh/capacity-type operator: In values: ["on-demand"] - key: topology.kubernetes.io/zone operator: In values: ["eu-central-1a", "eu-central-1b", "eu-central-1c"] weight: 9 providerRef: name: services EOF ) provider = kubernetes } |
а вот сервис rabbitmq
Thank you for reading this post, don't forget to subscribe!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
resource "helm_release" "rabbitmq" { name = local.settings.eks.rabbitmq_release_name repository = "https://charts.bitnami.com/bitnami" chart = "rabbitmq" version = local.settings.eks.rabbitmq_helm_version namespace = local.settings.eks.rabbitmq_namespace values = [<<EOF global: storageClass: "gp3" auth: username: user password: "${data.aws_secretsmanager_secret_version.rabbit_password_version.secret_string}" clustering: enabled: true updateStrategy: type: OnDelete podLabels: application: "rabbitmq" nodeSelector: provisioning: multiaz tolerations: - key: "dedicated" operator: "Equal" value: "multiaz" effect: "NoSchedule" topologySpreadConstraints: - maxSkew: 1 topologyKey: "topology.kubernetes.io/zone" whenUnsatisfiable: DoNotSchedule resources: limits: cpu: "0.5" memory: "1Gi" requests: cpu: "0.5" memory: "1Gi" replicaCount: 3 persistence: enabled: false storageClass: "gp3" accessModes: - ReadWriteOnce mountPath: /bitnami/rabbitmq/mnesia size: 10Gi metrics: enabled: false serviceMonitor: enabled: false path: "/metrics/per-object" labels: release: kube-prometheus-stack EOF ] provider = helm } |