Skip to content

Commit fdcb677

Browse files
committed
Keep old settings template around.
Signed-off-by: Kurt Garloff <kurt@garloff.de>
1 parent 4dc84ed commit fdcb677

3 files changed

Lines changed: 70 additions & 5 deletions

File tree

08-create-cluster.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ fi
4646
# Distinguish between old (cloud.config) and new style (clouds.yaml) secrets
4747
# This depends on the clusterstackrelease, not on whether or not we have a newsecret
4848
#if kubectl get -n $CS_NAMESPACE clusterstackreleases.clusterstack.x-k8s.io openstack-${CS_SERIES}-${CS_MAINVER/./-}-${CS_VERSION/./-} -o jsonpath='{.status.resources}' | grep openstack-${CS_SERIES}-${CS_MAINVER/./-}-${CS_VERSION}-clouds-yaml >/dev/null 2>&1; then
49-
CFGSTYLE=$(kubectl get clusterclasses.cluster.x-k8s.io -n $CS_NAMESPACE openstack-${CS_SERIES}-${CS_MAINVER/./-}-$CS_VERSION -o jsonpath='{.metadata.annotations.configStyle}' || true)
49+
if test "$CS_SERIES" = "scs2"; then
50+
CFGSTYLE="clouds-yaml"
51+
else
52+
CFGSTYLE=$(kubectl get clusterclasses.cluster.x-k8s.io -n $CS_NAMESPACE openstack-${CS_SERIES}-${CS_MAINVER/./-}-$CS_VERSION -o jsonpath='{.metadata.annotations.configStyle}' || true)
53+
fi
5054
if test "$CFGSTYLE" = "clouds-yaml"; then
5155
MGD_SEC="managed-secret: clouds-yaml$SECRETSUFFIX"
5256
else
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Cluster settings template
1+
# Cluster settings template (scs cluster stack series)
22
# This is a file to be sourced from bash
33
# Don't do this with untrusted files!
44
#
@@ -17,10 +17,10 @@ OS_CLOUD=${OS_CLOUD:-openstack}
1717
### Per cluster stack settings
1818
# Kubernetes Maj.Min, e.g. 1.32 (without leading v), can be left empty (see last line)
1919
CS_MAINVER=
20-
# CS Template versions that match, should be an array, e.g. [v1, v2, v0-git.XXXXXXX]
20+
# CS Template versions that matches, should be an array, e.g. [v1, v2, v0-git.XXXXXXX]
2121
CS_VERSION=
2222
# CS Series (scs or scs2)
23-
CS_SERIES=scs2
23+
CS_SERIES=scs
2424
### Now the per workload cluster settings
2525
# Full K8s Version Maj.Min.Patch, without leading 'v', e.g. 1.32.3 (this is per cluster)
2626
CL_PATCHVER=
@@ -37,7 +37,8 @@ CL_SVCCIDR=10.96.0.0/14
3737
CL_CTRLNODES=1
3838
# Number of (initial) worker nodes
3939
CL_WRKRNODES=1
40-
# Additional clusterclass variables in key=value syntax (;-separated), defaults are
40+
# Additional clusterClass variables in key=value syntax (;-separated), names come from
41+
# the clusterClass -- they will change with scs2 series. Defaults in scs are:
4142
# apiserver_loadbalancer=octavia-ovn;
4243
# controller_flavor=SCS-2V-4-20s; controller_root_disk=0
4344
# worker_flavor=SCS-2V-4; worker_root_disk=25

cluster-settings-template.scs2.env

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Cluster settings template (scs2 cluster stack series)
2+
# This is a file to be sourced from bash
3+
# Don't do this with untrusted files!
4+
#
5+
# TODO: Check whether we can make this more compatible with v1 KaaS
6+
#
7+
### Management cluster
8+
# You do not normally override it
9+
#KUBECONFIG=~/.kube/config
10+
### Per namespace: secrets
11+
# The namespace to keep your CS objects for a set of clusters (use e.g. cloud project name)
12+
CS_NAMESPACE=clusterns
13+
# Location of the clouds.yaml (default: ~/.config/openstack/clouds.yaml)
14+
CLOUDS_YAML=~/.config/openstack/clouds.yaml
15+
# Name of the cloud in there (default: openstack, any name works now)
16+
OS_CLOUD=${OS_CLOUD:-openstack}
17+
### Per cluster stack settings
18+
# Kubernetes Maj.Min, e.g. 1.32 (without leading v), can be left empty (see last line)
19+
CS_MAINVER=
20+
# CS Template versions that match, should be an array, e.g. [v1, v2, v0-git.XXXXXXX]
21+
CS_VERSION=
22+
# CS Series (scs or scs2)
23+
CS_SERIES=scs2
24+
### Now the per workload cluster settings
25+
# Full K8s Version Maj.Min.Patch, without leading 'v', e.g. 1.32.3 (this is per cluster)
26+
CL_PATCHVER=
27+
# Cluster name
28+
CL_NAME=
29+
# Restr. Application credentials per cluster -- set lifetime in days (0/"": do not create ACs)
30+
# Regularly run 07-cluster-secret.sh to refresh/rotate AppCreds! You need openstacktools installed for this.
31+
CL_APPCRED_LIFETIME=
32+
# Pod CIDR (e.g. 172.16.0.0/16)
33+
CL_PODCIDR=172.16.0.0/18
34+
# Service CIDR (e.g. 10.96.0.0/12)
35+
CL_SVCCIDR=10.96.0.0/14
36+
# Number of (initial) control plane nodes
37+
CL_CTRLNODES=1
38+
# Number of (initial) worker nodes
39+
CL_WRKRNODES=1
40+
# Additional clusterClass variables in key=value syntax (;-separated), the names come
41+
# from the clusterClass, these changed from scs to scs2. With scs2, defaults are
42+
# apiServerLoadBalancer=octavia-amphora
43+
# controlPlaneFlavor=SCS-2V-4-20s; controlPlaneRootDisk=0
44+
# workerFlavor=SCS-2V-4; workerRootDisk=25
45+
# dnsNameservers=[5.1.66.255,185.150.99.255]
46+
# workerAdditionalBlockDevices=
47+
# apiServerLoadBalancerOctaviaAmphoraAllowedCIDRs=
48+
# (The following should not be touched; normally)
49+
# k8sVersion=$CL_PATCHVER; networkExternalID=$EXTNETUUID; networkMTU=
50+
# controlPlaneAvailabilityZones=; controlPlaneOmitAvailabilityZones=true
51+
# openstackSecurityGroups=; cloudName=openstack; secretName=
52+
# controlPlaneServerGroupID=; workerServerGroupID=; sshKeyName=
53+
# securityGroups=; securityGroupIDs=; workerSecurityGroups=; workerSecurityGroupIDs=
54+
# certSANs=; oidcConfig=; nodeCIDR=10.8.0.0/20; additionalBlockDevices=
55+
# imageName=; imageIsOrc=true; disableAPIServerFloatingIP=false;
56+
# Example: CL_VARIABLES="apiServerLoadBalancer=octavia-ovn;dnsNameservers=[9.9.9.9,1.1.1.1]"
57+
CL_VARIABLES="apiServerLoadBalancer=octavia-ovn"
58+
### Autofill magic, don't touch
59+
CS_NAMESPACE=${CS_NAMESPACE:-$OS_CLOUD}
60+
CS_MAINVER=${CS_MAINVER:-${CL_PATCHVER%.*}}

0 commit comments

Comments
 (0)