Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiFleKs committed Oct 27, 2021
2 parents 850160e + b123213 commit 3f75c74
Show file tree
Hide file tree
Showing 13 changed files with 395 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ No modules.
| [kubectl_manifest.apply](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.cert-manager_cluster_issuers](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.cert-manager_csi_driver](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.csi-external-snapshotter](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.kong_crds](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.prometheus-operator_crds](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.sync](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
Expand Down Expand Up @@ -268,10 +269,12 @@ No modules.
| [flux_install.main](https://registry.terraform.io/providers/fluxcd/flux/latest/docs/data-sources/install) | data source |
| [flux_sync.main](https://registry.terraform.io/providers/fluxcd/flux/latest/docs/data-sources/sync) | data source |
| [github_repository.main](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/repository) | data source |
| [http_http.csi-external-snapshotter](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.kong_crds](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.prometheus-operator_crds](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.prometheus-operator_version](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [kubectl_file_documents.apply](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/data-sources/file_documents) | data source |
| [kubectl_file_documents.csi-external-snapshotter](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/data-sources/file_documents) | data source |
| [kubectl_file_documents.kong_crds](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/data-sources/file_documents) | data source |
| [kubectl_file_documents.sync](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/data-sources/file_documents) | data source |
| [kubectl_path_documents.cert-manager_cluster_issuers](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/data-sources/path_documents) | data source |
Expand All @@ -285,6 +288,7 @@ No modules.
| <a name="input_cert-manager"></a> [cert-manager](#input\_cert-manager) | Customize cert-manager chart, see `cert-manager.tf` for supported values | `any` | `{}` | no |
| <a name="input_cluster-autoscaler"></a> [cluster-autoscaler](#input\_cluster-autoscaler) | Customize cluster-autoscaler chart, see `cluster-autoscaler.tf` for supported values | `any` | `{}` | no |
| <a name="input_cluster-name"></a> [cluster-name](#input\_cluster-name) | Name of the Kubernetes cluster | `string` | `"sample-cluster"` | no |
| <a name="input_csi-external-snapshotter"></a> [csi-external-snapshotter](#input\_csi-external-snapshotter) | Customize csi-external-snapshotter, see `csi-external-snapshotter.tf` for supported values | `any` | `{}` | no |
| <a name="input_external-dns"></a> [external-dns](#input\_external-dns) | Map of map for external-dns configuration: see `external_dns.tf` for supported values | `any` | `{}` | no |
| <a name="input_flux"></a> [flux](#input\_flux) | Customize Flux chart, see `flux.tf` for supported values | `any` | `{}` | no |
| <a name="input_flux2"></a> [flux2](#input\_flux2) | Customize Flux chart, see `flux2.tf` for supported values | `any` | `{}` | no |
Expand Down
52 changes: 52 additions & 0 deletions csi-external-snapshotter.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
locals {

csi-external-snapshotter = {
enabled = true
version = "v4.2.1"
}

csi-external-snapshotter_yaml_files = [
"https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${local.csi-external-snapshotter.version}/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml",
"https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${local.csi-external-snapshotter.version}/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml",
"https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${local.csi-external-snapshotter.version}/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml",
"https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${local.csi-external-snapshotter.version}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml",
"https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${local.csi-external-snapshotter.version}/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml"
]

# csi-external-snapshotter_yaml_files = [
# "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${local.csi-external-snapshotter.version}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml",
# "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${local.csi-external-snapshotter.version}/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml"
# ]

# csi-external-snapshotter_apply_crds = local.csi-external-snapshotter["enabled"] ? { for k, v in data.http.csi-external-snapshotter_crds : lower(join("/", compact([yamldecode(v.body).apiVersion, yamldecode(v.body).kind, lookup(yamldecode(v.body).metadata, "namespace", ""), yamldecode(v.body).metadata.name]))) => v.body
# } : null
#
csi-external-snapshotter_apply = local.csi-external-snapshotter["enabled"] ? [for v in data.kubectl_file_documents.csi-external-snapshotter[0].documents : {
data : yamldecode(v)
content : v
}
] : null

}

data "http" "csi-external-snapshotter" {
for_each = local.csi-external-snapshotter.enabled ? toset(local.csi-external-snapshotter_yaml_files) : []
url = each.key
}

data "kubectl_file_documents" "csi-external-snapshotter" {
count = local.csi-external-snapshotter.enabled ? 1 : 0
content = join("\n---\n", [for k, v in data.http.csi-external-snapshotter : v.body])
}

resource "kubectl_manifest" "csi-external-snapshotter" {
for_each = local.csi-external-snapshotter.enabled ? { for v in local.csi-external-snapshotter_apply : lower(join("/", compact([v.data.apiVersion, v.data.kind, lookup(v.data.metadata, "namespace", ""), v.data.metadata.name]))) => v.content } : {}
yaml_body = each.value
}

#resource "kubectl_manifest" "csi-external-snapshotter" {
# for_each = local.csi-external-snapshotter.enabled ? local.csi-external-snapshotter_crds_apply : {}
# yaml_body = each.value
#}
#
#
23 changes: 13 additions & 10 deletions helm-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
version: 0.1.11
repository: https://aws.github.io/eks-charts
- name: aws-load-balancer-controller
version: 1.3.1
version: 1.3.2
repository: https://aws.github.io/eks-charts
- name: aws-node-termination-handler
version: 0.15.4
Expand All @@ -27,13 +27,13 @@ dependencies:
version: 0.3.10
repository: https://aws.github.io/eks-charts
- name: cert-manager
version: v1.5.4
version: v1.6.0
repository: https://charts.jetstack.io
- name: cluster-autoscaler
version: 9.10.7
repository: https://kubernetes.github.io/autoscaler
- name: external-dns
version: 5.4.11
version: 5.4.14
repository: https://charts.bitnami.com/bitnami
- name: flux
version: 1.11.2
Expand Down Expand Up @@ -63,7 +63,7 @@ dependencies:
version: 19.2.2
repository: https://prometheus-community.github.io/helm-charts
- name: kyverno
version: v2.1.1
version: v2.1.2
repository: https://kyverno.github.io/kyverno/
- name: kyverno-crds
version: v2.0.3
Expand All @@ -78,7 +78,7 @@ dependencies:
version: 3.8.2
repository: https://grafana.github.io/helm-charts
- name: metrics-server
version: 5.10.4
version: 5.10.7
repository: https://charts.bitnami.com/bitnami
- name: node-problem-detector
version: 2.0.9
Expand All @@ -90,10 +90,10 @@ dependencies:
version: 0.16.0
repository: https://prometheus-community.github.io/helm-charts
- name: prometheus-blackbox-exporter
version: 5.2.0
version: 5.3.0
repository: https://prometheus-community.github.io/helm-charts
- name: rabbitmq-cluster-operator
version: 1.0.0
version: 1.0.2
repository: https://charts.bitnami.com/bitnami
- name: scaleway-webhook
version: v0.0.1
Expand All @@ -105,17 +105,20 @@ dependencies:
version: 0.26.0
repository: https://strimzi.io/charts/
- name: thanos
version: 7.0.0
version: 7.0.1
repository: https://charts.bitnami.com/bitnami
- name: tigera-operator
version: v3.20.2
repository: https://docs.projectcalico.org/charts
- name: memcached
version: 5.15.6
version: 5.15.8
repository: https://charts.bitnami.com/bitnami
- name: vault
version: 0.17.0
version: 0.17.1
repository: https://helm.releases.hashicorp.com
- name: velero
version: 2.24.0
repository: https://vmware-tanzu.github.io/helm-charts
- name: victoria-metrics-k8s-stack
version: 0.5.4
repository: https://victoriametrics.github.io/helm-charts/
Loading

0 comments on commit 3f75c74

Please sign in to comment.