scott-the-programmer / terraform-provider-minikube

A terraform provider for minikube!
MIT License
53 stars 7 forks source link

feat(extra_configs): support extra config #127

Closed FalcoSuessgott closed 8 months ago

FalcoSuessgott commented 8 months ago

This PR enables the option to specify extra_options

example:

resource "minikube_cluster" "docker" {
  driver       = "docker"
  cluster_name = "vault-playground"
  cni          = "bridge"

  listen_address = "0.0.0.0"

  apiserver_names = [
    "host.docker.internal"
  ]

  ports = [
    "8443:8443"
  ]

  extra_config = var.kms_enabled ? ["apiserver.encryption-provider-config=/etc/kubernetes/manifests/encryption_provider_config.yml"] : null

  addons = [
    "dashboard",
    "default-storageclass",
    "storage-provisioner",
    "ingress"
  ]
}

results in:


$> minikube ssh "sudo cat /etc/kubernetes/manifests/kube-apiserver.yaml" | grep encryption
    - --encryption-provider-config=/etc/kubernetes/manifests/encryption_provider_config.yml   ```
codecov[bot] commented 8 months ago

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (4bb98b6) 83.46% compared to head (06dc7e0) 82.90%.

Files Patch % Lines
minikube/resource_cluster.go 46.66% 6 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #127 +/- ## ========================================== - Coverage 83.46% 82.90% -0.57% ========================================== Files 12 12 Lines 986 1000 +14 ========================================== + Hits 823 829 +6 - Misses 141 147 +6 - Partials 22 24 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

scott-the-programmer commented 8 months ago

Change LGTM! Gave your changes a quick whirl on my machine and it seems to be working nicely 👍🏽

FalcoSuessgott commented 8 months ago

Hi @scott-the-programmer, finished the PR now, would appreciate a review and a fast release, so I can start using it for https://github.com/FalcoSuessgott/hashicorp-vault-playground :P

Kind regards,

Tom

scott-the-programmer commented 8 months ago

https://github.com/scott-the-programmer/terraform-provider-minikube/releases/tag/v0.3.8 😁