Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial release of open source module #1

Conversation

lilithmooncohen
Copy link
Contributor

No description provided.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryanckoch Some notes:

  • Let's add support and an example with shared VPC.
  • Remove credentials file everywhere

Received this error on running "simple" example:

Error: module.gke.google_container_node_pool.pools: node_config.0: invalid or unknown key: disk_type

README.md Outdated
```hcl
module "gke" {
source = "github.com/terraform-google-modules/terraform-google-kubernetes-engine"
credentials_path = "${local.credentials_file_path}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove credentials_path everywhere!

subnetwork = "us-central1-01"
ip_range_pods = "us-central1-01-gke-01-pods"
ip_range_services = "us-central1-01-gke-01-services"
node_service_account = "project-service-account@<PROJECT ID>.iam.gserviceaccount.com"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service account should be configurable only on a node_pool level so I can have two node pools with different service accounts. Use the service account of the first node pool for the empty "default" node pool.

- Create GKE Node Pool(s) with provided configuration and attach to cluster
- Replace the default kube-dns configmap if `stub_domains` are provided
- Activate network policy if `network_policy` is true
- Add `ip-masq-agent` configmap with provided `masq_non_masquerade_cidrs` if `network_policy` is true or `masq_config_enabled` is true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change masq_non_masquerade_cidrs to non_masquerade_cidrs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -0,0 +1,59 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need all outputs for all examples, just actually useful things (ex. endpoint for service).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

target_port = 80
}

type = "ClusterIP"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's deploy as a load balancer, easier to see results.

variables.tf Outdated

variable "http_load_balancing" {
description = "Enable httpload balancer addon"
default = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should default to enabled.

variables.tf Outdated

variable "horizontal_pod_autoscaling" {
description = "Enable horizontal pod autoscaling addon"
default = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should default to disabled.

variables.tf Outdated

variable "kubernetes_dashboard" {
description = "Enable kubernetes dashboard addon"
default = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be disabled by default.

variable "ip_masq_non_masquerade_cidrs" {
type = "list"
description = "List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading."
default = ["10.0.0.0/8"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this override the defualt ip-masq-agent behavior of all RFC1918 address space?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From recent experience it may be prudent to include ip_range_pods and ip_range_services and the node network CIDR as a local var type if this were empty. Happy to discuss conditions I have in mind if you want to chat

Copy link
Contributor

@morgante morgante Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. @ryanckoch We should update the default to include all of RFC1918 space, as documented here: https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent#how_ipmasq_works

ip_range_pods and ip_range_services should be part of RFC1918 space so I think that would be fine. Or do we also want to automatically append those when a custom ip_masq CIDR is specified?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend against appending new rules to RFC1918. We had just hit a use case for supplying subsets of networks. Just for clarity to the user on declarative nature of the config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, let's make sure to include a note in the docs about this.

@morgante morgante closed this Aug 30, 2018
@morgante
Copy link
Contributor

@ryanckoch I've moved this code to a branch on the shared repo so we can collaborate, could you open a new PR from it: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine

@lilithmooncohen lilithmooncohen mentioned this pull request Aug 31, 2018
thefirstofthe300 pushed a commit to thefirstofthe300/terraform-google-kubernetes-engine that referenced this pull request Mar 25, 2019
…drienthebo/maint/update-changelog-v0.5.0

Update CHANGELOG with changes made from thefirstofthe300's repo
morgante pushed a commit that referenced this pull request Oct 29, 2019
morgante pushed a commit that referenced this pull request Nov 20, 2019
morgante pushed a commit that referenced this pull request Nov 21, 2019
Removed kubernetes dashboard add config.
morgante pushed a commit that referenced this pull request Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants