Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

PR test #14

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
11 changes: 10 additions & 1 deletion helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}


Expand Down
2 changes: 2 additions & 0 deletions k8s_setup/gcp/README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion k8s_setup/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down
36 changes: 36 additions & 0 deletions k8s_setup/helmfile-operator-crd.yaml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions k8s_setup/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 6 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#}
4 changes: 4 additions & 0 deletions provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ provider "google" {
version = "~> 3.27"
}

#provider "helmfile" {
# version = "0.2.0"
#}

provider "kubernetes" {
version = "~> 1.11"
load_config_file = false
Expand Down