Code Monkey home page Code Monkey logo

terraform-scaleway-kapsule's Introduction

terraform-scaleway-kapsule

Build Status semantic-release

A terraform module to create a managed Kubernetes cluster on Scaleway Element.

Requirements

Name Version
terraform ~> 1.3
random ~> 3.4
scaleway ~> 2.4

Providers

Name Version
random ~> 3.4
scaleway ~> 2.4

Modules

No modules.

Resources

Name Type
random_pet.this resource
scaleway_k8s_cluster.this resource
scaleway_k8s_pool.this resource

Inputs

Name Description Type Default Required
admission_plugins The list of admission plugins to enable on the cluster list(string) [] no
apiserver_cert_sans Additional Subject Alternative Names for the Kubernetes API server certificate list(string) [] no
auto_upgrade The auto upgrade configuration
object({
enable = optional(bool, false)
maintenance_window_start_hour = optional(number)
maintenance_window_day = optional(number)
})
{} no
autoscaler_config The configuration options for the Kubernetes cluster autoscaler
object({
disable_scale_down = optional(bool)
scale_down_delay_after_add = optional(string)
scale_down_unneeded_time = optional(string)
estimator = optional(string)
expander = optional(string)
ignore_daemonsets_utilization = optional(bool)
balance_similar_node_groups = optional(bool)
expendable_pods_priority_cutoff = optional(number)
scale_down_utilization_threshold = optional(number)
max_graceful_termination_sec = optional(number)
})
{} no
cluster_description A description for the Kubernetes cluster string null no
cluster_name The name for the Kubernetes cluster string n/a yes
cluster_tags The tags associated with the Kubernetes cluster list(any) [] no
cluster_type The type of cluster string "kapsule" no
cni_plugin The Container Network Interface (CNI) for the Kubernetes cluster string "cilium" no
delete_additional_resources Delete additional resources like block volumes and loadbalancers that were created in Kubernetes on cluster deletion bool false no
feature_gates The list of feature gates to enable on the cluster list(string) [] no
kubernetes_version The version of the Kubernetes cluster string "1.24.5" no
node_pools Creates and manages Scaleway Kubernetes cluster pools any {} no
node_pools_defaults Default configuration for Kubernetes cluster pools map(any) {} no
open_id_connect_config The OpenID Connect configuration of the cluster
object({
issuer_url = optional(string)
client_id = optional(string)
username_claim = optional(string)
username_prefix = optional(string)
groups_claim = optional(list(string))
groups_prefix = optional(string)
required_claim = optional(list(string))
})
{} no
project_id (Defaults to provider project_id) The ID of the project the cluster is associated with string null no
region (Defaults to provider region) The region in which the cluster should be created string null no
tags Tags applied to all ressources. list(string) [] no

Outputs

Name Description
apiserver_url The URL of the Kubernetes API server.
cluster_ca_cert PEM based cluster ca certificate.
created_at The creation date of the cluster.
id The ID of the cluster.
kubeconfig The Kubernetes configuration.
kubeconfig_file The Kubernetes configuration file.
name The name of the cluster.
node_pools Node Pools configuration and status.
status The status of the Kubernetes cluster.
token Token for authenticating to API-Server.
updated_at The last update date of the cluster.
upgrade_available Set to true if a newer Kubernetes version is available.
wildcard_dns The DNS wildcard that points to all ready nodes.

terraform-scaleway-kapsule's People

Contributors

archifleks avatar renovate-bot avatar renovate[bot] avatar rguichard avatar tbobm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

terraform-scaleway-kapsule's Issues

Failed to query available provider packages - particuleio/scaleway

Hi,

I bumped the version module from 5.0.0 to the version 6.0.0
and now i'm having this issue.

I'm using Terraform v1.4.5

โ”‚ Error: Failed to query available provider packages
โ”‚
โ”‚ Could not retrieve the list of available versions for provider particuleio/scaleway: no available releases match the given constraints

Wondering if it's not linked to this merge #11 ?

Providers required by state: ๐Ÿค” 
    provider[registry.terraform.io/scaleway/scaleway]
    provider[registry.terraform.io/particuleio/scaleway]

Any idea?

feat: add missing provider parameters

Juste leaving this here for futur update after wednesday. Module is missing some new feature like:

  • project_id in cluster
  • delete_additionnal_resources in cluster which is nice to have for the CI
  • kubelet-args in node pool
  • zone in node pool

Invalid API key format

I cannot find any guide to fix this credential issues.

scaleway-sdk-go: denied authentication: invalid API key format or empty value

Can anyone guide me how to set credential correctly?

experiments is no longer support in terraform v1.3.1

In version.tf,

experiments = [module_variable_optional_attrs]

the experiments attribute throws the following error with terraform 1.3.1.

โ•ท
โ”‚ Error: Experiment has concluded
โ”‚ 
โ”‚   on .terraform/modules/..../versions.tf line 3, in terraform:
โ”‚    3:   experiments = [module_variable_optional_attrs]
โ”‚ 
โ”‚ Experiment "module_variable_optional_attrs" is no longer available. The final feature corresponding to this experiment differs from the experimental
โ”‚ form and is available in the Terraform language from Terraform v1.3.0 onwards.
โ•ต

a related link here.

Broken link

When I click on the example > Simple on this page: https://registry.terraform.io/modules/particuleio/kapsule/scaleway/latest
I get a broken link: https://registry.terraform.io/modules/particuleio/kapsule/scaleway/latest/examples/simple

This is a submodule used internally by / / . Using this submodule on its own is not recommended.

Submodules without a README or README.md are considered to be internal-only by the Terraform Registry. If this submodule should not be considered internal, add a readme which describes what this submodule is for and how it should be used.

For more information about the expected structure of modules in the Registry, see the Standard Module Structure in the Terraform Registry documentation .

Error realted to usage of `list` function

Hello,

An error occurs when I try to apply my configuration with auto_upgrade option. It's realted to the call to function list that isn't available anymore.

Here my kapsulte.tf file:

module "kapsule" {

  source  = "particuleio/kapsule/scaleway"
  version = "~>3.0.1"

  auto_upgrade = {
    enable = true
    maintenance_window_start_hour = 21
    maintenance_window_day = "any"
  }

  cluster_name    = "****"
  cluster_description = "****"

  cni_plugin = "cilium"
  delete_additional_resources = false 

  kubernetes_version = "1.21"

  node_pools = {
    r2devops = {
      name               = "default"
      node_type          = "DEV1-M"
      size               = 2
      min_size           = 2
      max_size           = 5
      autoscaling        = true
      autohealing        = true
      container_runtime  = "docker"
    }
  }
  region          = "****"
  tags = ["****", "****"]
  project_id = "****"
}

And the output when I run terrraform apply :

โžœ  scw-k8s git:(2-bootstrap-iac) โœ— terraform apply
2021/07/14 10:49:04 [DEBUG] POST https://gitlab.com/api/v4/projects/****/terraform/state/****/lock
Acquiring state lock. This may take a few moments...
2021/07/14 10:49:05 [DEBUG] GET https://gitlab.com/api/v4/projects/*****/terraform/state/****
โ•ท
โ”‚ Error: Error in function call
โ”‚ 
โ”‚   on .terraform/modules/kapsule/cluster.tf line 27, in resource "scaleway_k8s_cluster" "this":
โ”‚   27:     for_each = local.auto_upgrade["enable"] ? list("auto_upgrade") : []
โ”‚ 
โ”‚ Call to function "list" failed: the "list" function was deprecated in Terraform v0.12 and is no longer available;
โ”‚ use tolist([ ... ]) syntax to write a literal list.
โ•ต
2021/07/14 10:49:07 [DEBUG] DELETE https://gitlab.com/api/v4/projects/****/terraform/state/****/lock
Releasing state lock. This may take a few moments...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.