Skip to content

Commit 6162aac

Browse files
committed
add documentation about cloudprovider
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
1 parent a48f725 commit 6162aac

2 files changed

Lines changed: 81 additions & 4 deletions

File tree

docs/cloudprovider.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# CloudProvider Configuration
2+
3+
This document describes the CloudProvider configuration for the STACKIT Gardener Extension, including the cloudprovider secret and the `CloudProfileConfig`.
4+
5+
## CloudProvider Secret
6+
7+
The cloudprovider secret requires the following fields:
8+
9+
| Field | Key | Description | Required |
10+
| -------------------- | --------------------- | ------------------------------------------------------ | -------- |
11+
| Project ID | `project-id` | The STACKIT project identifier | Yes |
12+
| Service Account JSON | `serviceaccount.json` | The STACKIT service account credentials in JSON format | Yes |
13+
14+
**Example Secret:**
15+
16+
```yaml
17+
apiVersion: v1
18+
kind: Secret
19+
metadata:
20+
name: cloudprovider
21+
namespace: shoot--<project>--<cluster>
22+
type: Opaque
23+
stringData:
24+
project-id: <project-id>
25+
serviceaccount.json: <sa-json>
26+
```
27+
28+
The service account needs the following permissions:
29+
30+
| Permission | Purpose |
31+
| ------------------------------ | ------------------------------------- |
32+
| `nlb.admin` | create network load balancer |
33+
| `blockstorage.admin` | CSI driver |
34+
| `compute.admin` | CCM node-controller |
35+
| `iaas.network.admin` | bastion and infrastructure controller |
36+
| `iaas.isoplated-network.admin` | infrastructure controller |
37+
38+
## CloudProfileConfig Fields
39+
40+
Example with comments:
41+
42+
```yaml
43+
providerConfig:
44+
# image mappings used for bastion and workers
45+
machineImages:
46+
- name: ubuntu
47+
versions:
48+
- version: "22.04"
49+
regions:
50+
- name: eu01
51+
# provider-specific image ID
52+
id: <image-id>
53+
architecture: amd64
54+
# rescan block devices after resize
55+
rescanBlockStorageOnResize: true
56+
# max volumes attached per node
57+
nodeVolumeAttachLimit: 30
58+
# list of IPs of DNS servers used while creating subnets
59+
dnsServers:
60+
- 1.1.1.1
61+
# /etc/resolv.conf options for workers
62+
resolvConfOptions: []
63+
# shoot storage classes
64+
storageClasses:
65+
- name: default
66+
default: true
67+
parameters:
68+
type: "storage_premium_perf4"
69+
provisioner: block-storage.csi.stackit.cloud
70+
```

pkg/apis/stackit/v1alpha1/types_cloudprofile.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,61 @@ import (
1616
type CloudProfileConfig struct {
1717
metav1.TypeMeta `json:",inline"`
1818
// Constraints is an object containing constraints for certain values in the control plane config.
19+
// Deprecated: OpenStack-only; not used for STACKIT.
1920
Constraints Constraints `json:"constraints"`
2021
// DNSServers is a list of IPs of DNS servers used while creating subnets.
2122
// +optional
2223
DNSServers []string `json:"dnsServers,omitempty"`
2324
// DHCPDomain is the dhcp domain of the OpenStack system configured in nova.conf. Only meaningful for
25+
// Deprecated: OpenStack-only; not used for STACKIT.
2426
// Kubernetes 1.10.1+. See https://github.com/kubernetes/kubernetes/pull/61890 for details.
2527
// +optional
2628
DHCPDomain *string `json:"dhcpDomain,omitempty"`
2729
// KeyStoneURL is the URL for auth{n,z} in OpenStack (pointing to KeyStone).
30+
// Deprecated: OpenStack-only; not used for STACKIT.
2831
// +optional
2932
KeyStoneURL string `json:"keystoneURL,omitempty"`
3033
// KeystoneCACert is the CA Bundle for the KeyStoneURL.
34+
// Deprecated: OpenStack-only; not used for STACKIT.
3135
// +optional
3236
KeyStoneCACert *string `json:"keystoneCACert,omitempty"`
3337
// KeyStoneForceInsecure is a flag to control whether the OpenStack client should perform no certificate validation.
38+
// Deprecated: OpenStack-only; not used for STACKIT.
3439
// +optional
3540
KeyStoneForceInsecure bool `json:"keystoneForceInsecure,omitempty"`
3641
// KeyStoneURLs is a region-URL mapping for auth{n,z} in OpenStack (pointing to KeyStone).
42+
// Deprecated: OpenStack-only; not used for STACKIT.
3743
// +optional
3844
KeyStoneURLs []KeyStoneURL `json:"keystoneURLs,omitempty"`
3945
// MachineImages is the list of machine images that are understood by the controller. It maps
4046
// logical names and versions to provider-specific identifiers.
4147
MachineImages []MachineImages `json:"machineImages"`
4248
// RequestTimeout specifies the HTTP timeout against the OpenStack API.
49+
// Deprecated: OpenStack-only; not used for STACKIT.
4350
// +optional
4451
RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty"`
4552
// RescanBlockStorageOnResize specifies whether the storage plugin scans and checks new block device size before it resizes
4653
// the filesystem.
4754
// +optional
4855
RescanBlockStorageOnResize *bool `json:"rescanBlockStorageOnResize,omitempty"`
4956
// IgnoreVolumeAZ specifies whether the volumes AZ should be ignored when scheduling to nodes,
57+
// Deprecated: OpenStack-only; not used for STACKIT.
5058
// to allow for differences between volume and compute zone naming.
5159
// +optional
5260
IgnoreVolumeAZ *bool `json:"ignoreVolumeAZ,omitempty"`
5361
// NodeVolumeAttachLimit specifies how many volumes can be attached to a node.
5462
// +optional
5563
NodeVolumeAttachLimit *int32 `json:"nodeVolumeAttachLimit,omitempty"`
5664
// UseOctavia specifies whether the OpenStack Octavia network load balancing is used.
57-
//
58-
// Deprecated: This field will be removed in future release.
59-
//
65+
// Deprecated: OpenStack-only; not used for STACKIT.
6066
// +optional
6167
UseOctavia *bool `json:"useOctavia,omitempty"`
6268
// UseSNAT specifies whether S-NAT is supposed to be used for the Gardener managed OpenStack router.
69+
// Deprecated: OpenStack-only; not used for STACKIT.
6370
// +optional
6471
UseSNAT *bool `json:"useSNAT,omitempty"`
6572
// ServerGroupPolicies specify the allowed server group policies for worker groups.
73+
// Deprecated: OpenStack-only; not used for STACKIT.
6674
// +optional
6775
ServerGroupPolicies []string `json:"serverGroupPolicies,omitempty"`
6876
// ResolvConfOptions specifies options to be added to /etc/resolv.conf on workers
@@ -75,7 +83,6 @@ type CloudProfileConfig struct {
7583
// +optional
7684
APIEndpoints *APIEndpoints `json:"apiEndpoints,omitempty"`
7785
// CABundle is the CA certificate bundle for API endpoints.
78-
// This field is currently ignored and reserved for future use.
7986
// +optional
8087
CABundle *string `json:"caBundle,omitempty"`
8188
}

0 commit comments

Comments
 (0)