Skip to content

Commit c51babf

Browse files
committed
restructure README
Signed-off-by: Jan Schoone <[email protected]>
1 parent 96398f7 commit c51babf

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

providers/openstack/scs2/README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ kubectl -n capo-system rollout status deployment
1818

1919
```
2020

21-
values.yaml
22-
2321
```
2422
# Install CSO and CSPO
2523
cat <<EOF | helm upgrade -i cso \
@@ -30,6 +28,13 @@ oci://registry.scs.community/cluster-stacks/cso \
3028
clusterStackVariables:
3129
ociRepository: registry.scs.community/kaas/cluster-stacks
3230
controllerManager:
31+
manager:
32+
extraEnv:
33+
- name: HELM_CACHE_HOME
34+
value: /tmp/downloads/cluster-stacks/.helm/cache
35+
image:
36+
repository: ghcr.io/sovereigncloudstack/cso-staging
37+
tag: sha-5b1840a
3338
rbac:
3439
additionalRules:
3540
- apiGroups:
@@ -46,20 +51,25 @@ controllerManager:
4651
- watch
4752
EOF
4853
```
54+
4955
```sh
50-
kubectl create namespace cluster
56+
export CLUSTER_NAMESPACE=cluster
57+
export CLUSTER_NAME=my-cluster
58+
export CLUSTERSTACK_NAMESPACE=cluster
59+
export CLUSTERSTACK_VERSION=v0-sha.ksgrnrp
60+
export OS_CLIENT_CONFIG_FILE=${PWD}/clouds.yaml
61+
kubectl create namespace $CLUSTER_NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
5162
```
5263

5364
```sh
5465
# Create secret for CAPO
55-
export OS_CLIENT_CONFIG_FILE=<path to clouds.yaml>
56-
kubectl create secret -n cluster generic openstack --from-file=clouds.yaml=$OS_CLIENT_CONFIG_FILE
66+
kubectl create secret -n $CLUSTER_NAMESPACE generic openstack --from-file=clouds.yaml=$OS_CLIENT_CONFIG_FILE
5767

5868
# Prepare the Secret as it will be deployed in the Workload Cluster
5969
kubectl create secret -n kube-system generic clouds-yaml --from-file=clouds.yaml=$OS_CLIENT_CONFIG_FILE --dry-run=client -oyaml > clouds-yaml-secret
6070

6171
# Add the Secret to the ClusterResourceSet Secret in the Management Cluster
62-
kubectl create -n cluster secret generic clouds-yaml --from-file=clouds-yaml-secret --type=addons.cluster.x-k8s.io/resource-set
72+
kubectl create -n $CLUSTER_NAMESPACE secret generic clouds-yaml --from-file=clouds-yaml-secret --type=addons.cluster.x-k8s.io/resource-set
6373
```
6474

6575
```yaml
@@ -68,7 +78,7 @@ apiVersion: addons.cluster.x-k8s.io/v1beta1
6878
kind: ClusterResourceSet
6979
metadata:
7080
name: clouds-yaml
71-
namespace: cluster
81+
namespace: $CLUSTER_NAMESPACE
7282
spec:
7383
strategy: "Reconcile"
7484
clusterSelector:
@@ -81,12 +91,13 @@ EOF
8191
```
8292

8393
```sh
94+
# Apply ClusterStack resource
8495
cat <<EOF | kubectl apply -f -
8596
apiVersion: clusterstack.x-k8s.io/v1alpha1
8697
kind: ClusterStack
8798
metadata:
8899
name: openstack
89-
namespace: cluster
100+
namespace: $CLUSTERSTACK_NAMESPACE
90101
spec:
91102
provider: openstack
92103
name: scs2
@@ -95,25 +106,19 @@ spec:
95106
autoSubscribe: false
96107
noProvider: true
97108
versions:
98-
- v0-sha.ksgrnrp
109+
- $CLUSTERSTACK_VERSION
99110
EOF
100111
```
101112

102-
Check if ClusterClasses exist
103-
104-
```sh
105-
kubectl get clusterclass -n cluster
106-
```
107-
108-
cluster.yaml
109-
110113
```sh
114+
# Apply Cluster resource
111115
cat <<EOF | kubectl apply -f -
112116
apiVersion: cluster.x-k8s.io/v1beta1
113117
kind: Cluster
114118
metadata:
115119
name: my-cluster
116-
namespace: cluster
120+
namespace: $CLUSTER_NAMESPACE
121+
117122
labels:
118123
managed-secret: clouds-yaml
119124
spec:
@@ -127,13 +132,8 @@ spec:
127132
- "10.96.0.0/12"
128133
topology:
129134
variables:
130-
- name: apiServerLoadBalancer
131-
value: octavia-ovn
132-
- name: imageIsOrc
133-
value: false
134-
- name: controlPlaneFlavor
135-
value: SCS-2V-4-20s
136-
class: openstack-scs2-1-33-v0-sha.ksgrnrp
135+
class: openstack-scs2-1-33-$CLUSTERSTACK_VERSION
136+
classNamespace: $CLUSTERSTACK_NAMESPACE
137137
controlPlane:
138138
replicas: 1
139139
version: v1.33.4
@@ -146,6 +146,6 @@ EOF
146146
```
147147

148148
```sh
149-
clusterctl get kubeconfig -n cluster openstack-testcluster > /tmp/kubeconfig
149+
clusterctl get kubeconfig -n $CLUSTER_NAMESPACE openstack-testcluster > /tmp/kubeconfig
150150
kubectl get nodes --kubeconfig /tmp/kubeconfig
151151
```

0 commit comments

Comments
 (0)