diff --git a/.terraform/plugins/linux_amd64/terraform-provider-helmfile b/.terraform/plugins/linux_amd64/terraform-provider-helmfile new file mode 100755 index 0000000..1ac2da4 Binary files /dev/null and b/.terraform/plugins/linux_amd64/terraform-provider-helmfile differ diff --git a/helmfile.yaml b/helmfile.yaml index 8f590f1..ef15480 100644 --- a/helmfile.yaml +++ b/helmfile.yaml @@ -111,7 +111,16 @@ releases: args: ["apply", "-f", "resources/prometheus-operator-prometheus-scrape-confg.yaml" ] - events: ["postsync"] showlogs: true - command: "resource/loadall.sh" + command: "./resource/load.sh" + args: ["myapp-dashboards" ] + - events: ["postsync"] + showlogs: true + command: "./resource/load.sh" + args: ["kafka-dashboards" ] + - events: ["postsync"] + showlogs: true + command: "./resource/load.sh" + args: ["k8s-dashboards" ] {{ end }} diff --git a/k8s_setup/gcp/README.md b/k8s_setup/gcp/README.md index 3443bdf..dd0fbae 100644 --- a/k8s_setup/gcp/README.md +++ b/k8s_setup/gcp/README.md @@ -1,5 +1,7 @@ # gke env setup for helmfile-infra on GCP Sandbox Project +use tfcloud with Contino GCP account + Creates infrastructure for running GKE in private GCP Sandbox from terraform cloud: * VPC with primary subnet and secondary subnets for service/pods * private GKE (private nodes, public kubernetes API) diff --git a/k8s_setup/gcp/main.tf b/k8s_setup/gcp/main.tf index 76d55b9..3b85016 100644 --- a/k8s_setup/gcp/main.tf +++ b/k8s_setup/gcp/main.tf @@ -149,7 +149,7 @@ resource "tfe_workspace" "project" { vcs_repo { identifier = "contino/helmfile-infra" ingress_submodules = false -# oauth_token_id = "TODO" + oauth_token_id = "TODO" } } diff --git a/k8s_setup/helmfile-operator-crd.yaml b/k8s_setup/helmfile-operator-crd.yaml new file mode 100644 index 0000000..caca91f --- /dev/null +++ b/k8s_setup/helmfile-operator-crd.yaml @@ -0,0 +1,36 @@ + +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: helmfiles.apps.mumoshu.github.io +spec: + group: apps.mumoshu.github.io + versions: + - name: v1alpha1 + served: true + storage: true + names: + kind: Helmfile + plural: helmfiles + singular: helmfile + scope: Namespaced + validation: + openAPIV3Schema: + properties: + spec: + properties: + source: + type: string + version: + type: string + image: + type: object + properties: + repository: + type: string + tag: + type: string + values: + type: object + envvars: + type: object diff --git a/k8s_setup/helmfile.yaml b/k8s_setup/helmfile.yaml new file mode 100644 index 0000000..87b471f --- /dev/null +++ b/k8s_setup/helmfile.yaml @@ -0,0 +1,21 @@ +apiVersion: apps.mumoshu.github.io/v1alpha1 +kind: Helmfile +metadata: + name: infra +spec: + #source: git::https://github.com/mumoshu/helmfile-operator//pkg/examplecontroller@assets?ref=master + source: git::https://github.com/bhood4/helmfile-infra?ref=master + # + # # Syntax sugar: The trailing "?ref=master" can be specified alternatively with `version`: + # version: master + # + # # Alternatively specify the container `image` for your own helmfile-applier. + # # See the README section for `example-applier` to see how you can build your own helmfile-applier. + # image: + # repository: quay.io/examplecom/example + # tag: v1.2.3 + # + #values: + # foo: FOO + #envvars: + # bar: BAR diff --git a/main.tf b/main.tf index c1d175c..21528ba 100644 --- a/main.tf +++ b/main.tf @@ -48,7 +48,9 @@ resource "kubernetes_cluster_role_binding" "admin" { # network = "projects/dexcom-sandbox-20200626144235/global/networks/default" #} -resource "helmfile_release_set" "mystack" { - content = file("./helmfile.yaml") - environment = "gcp" -} +#resource "helmfile_release_set" "mystack" { +# content = file("./helmfile.yaml") +# environment = "gcp" +# #helm_binary = "helm-3.0.0" +# binary = "helmfile-v0.93.0" +#} diff --git a/provider.tf b/provider.tf index c7d7506..77f0bbe 100644 --- a/provider.tf +++ b/provider.tf @@ -2,6 +2,10 @@ provider "google" { version = "~> 3.27" } +#provider "helmfile" { +# version = "0.2.0" +#} + provider "kubernetes" { version = "~> 1.11" load_config_file = false