From 2127b316f06437f529273c56cab8b19adb228db1 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 5 Feb 2023 18:54:04 +0100 Subject: [PATCH] aws, eksctl template's inline comments refined --- .gitignore | 1 + eksctl/template.jsonnet | 41 ++++++++++++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 437cdb763c..359d32fc5b 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ docs/reference/terraform.md # Don't check-in YAML files for eksctl config generated from jsonnet files **.eksctl.yaml +eksctl-config.yaml # Don't version control any terraform state **.terraform.lock.hcl diff --git a/eksctl/template.jsonnet b/eksctl/template.jsonnet index 98646e927f..5af277fef7 100644 --- a/eksctl/template.jsonnet +++ b/eksctl/template.jsonnet @@ -1,14 +1,29 @@ -// This file is a jinja2 template of a jsonnet template of a eksctl's cluster -// configuration file, which is in turn can be used with the `eksctl` CLI to both -// update and initialize a AWS EKS based cluster. -// -// This jinja2 template is only used by the deployer script as part of creating -// new clusters. If a relevant change is made here or the dependent file -// libsonnet/nodegroup.jsonnet, one may consider if we should manually update -// already generated jsonnet files in this folder. -// -// Configuration reference: https://eksctl.io/usage/schema/ -// +{#- + This file is a jinja2 template of a jsonnet template of a eksctl's cluster + configuration file, which in turn is to be used with the eksctl CLI to both + update and initialize an AWS EKS based cluster. + + This jinja2 template is used by the deployer script's generate-aws-cluster + command as part of creating new clusters. + + References: + - https://infrastructure.2i2c.org/en/latest/hub-deployment-guide/new-cluster/aws.html#generate-cluster-files +-#} +/* + This file is a jsonnet template of a eksctl's cluster configuration file, + that is used with the eksctl CLI to both update and initialize an AWS EKS + based cluster. + + This file has in turn been generated from eksctl/template.jsonnet which is + relevant to compare with for changes over time. + + To use jsonnet to generate an eksctl configuration file from this, do: + + jsonnet << cluster_name >>.jsonnet > eksctl-config.yaml + + References: + - https://eksctl.io/usage/schema/ +*/ local ng = import "./libsonnet/nodegroup.jsonnet"; // place all cluster nodes here @@ -56,6 +71,10 @@ local daskNodes = []; iam: { withOIDC: true, }, + // If you add an addon to this config, run the create addon command. + // + // eksctl create addon --config-file=eksctl-config.yaml + // addons: [ { // aws-ebs-csi-driver ensures that our PVCs are bound to PVs that