-
Notifications
You must be signed in to change notification settings - Fork 2
Add usage documentations #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aniruddha2000
wants to merge
9
commits into
main
Choose a base branch
from
add-usage-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+168
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b0bec16
add workload identity doc
aniruddha2000 7a21140
update as per jans review
aniruddha2000 639cec5
add alb doc
aniruddha2000 bae50dc
fix alb doc and have migration instructions
aniruddha2000 0ce7fbc
add cloudprofile doc
aniruddha2000 bfd9553
update cloudprofile doc
aniruddha2000 c0fe6e7
update cloudprofile doc
aniruddha2000 0363b0f
add cloudprofile example
aniruddha2000 4fe7a86
update enable extension part
aniruddha2000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Using the STACKIT provider extension with Gardener as operator | ||
|
|
||
| The [`core.gardener.cloud/v1beta1.CloudProfile` resource](https://github.com/gardener/gardener/blob/master/example/30-cloudprofile.yaml) declares a `providerConfig` field that is meant to contain provider-specific configuration. | ||
|
|
||
| In this document we are describing how this configuration looks like for STACKIT and provide an example `CloudProfile` manifest with minimal configuration that you can use to allow creating STACKIT shoot clusters. | ||
|
|
||
|
|
||
| ## `CloudProfileConfig` | ||
|
|
||
| The cloud profile configuration contains information about the real machine image IDs in the STACKIT environment (image names). | ||
| You have to map every version that you specify in `.spec.machineImages[].versions` here such that the STACKIT extension knows the image ID for every version you want to offer. | ||
|
|
||
| TODO: ask about storageclass, where can i find what type of storage class exist and what imp thing to mention. | ||
|
|
||
| It also contains optional default values for DNS servers that shall be used for shoots. | ||
| In the `dnsServers[]` list you can specify IP addresses that are used as DNS configuration for created shoot subnets. | ||
|
|
||
| Some hypervisors (especially those which are VMware-based) don't automatically send a new volume size to a Linux kernel when a volume is resized and in-use. | ||
| For those hypervisors you can enable the storage plugin interacting with Cinder to telling the SCSI block device to refresh its information to provide information about it's updated size to the kernel. You might need to enable this behavior depending on the underlying hypervisor of your STACKIT installation. The `rescanBlockStorageOnResize` field controls this. Please note that it only applies for Kubernetes versions where CSI is used. | ||
|
|
||
| You can specify API endpoints for various STACKIT services(IaaS, LoadBalancer), via `APIEndpoints`. | ||
|
|
||
| ## Example `CloudProfile` manifest | ||
|
|
||
| The following example shows a minimal `CloudProfile` configuration for STACKIT: | ||
|
|
||
| ```yaml | ||
| apiVersion: core.gardener.cloud/v1beta1 | ||
| kind: CloudProfile | ||
| metadata: | ||
| name: stackit | ||
| spec: | ||
| type: stackit | ||
| kubernetes: | ||
| versions: | ||
| - version: 1.35.6 | ||
| machineImages: | ||
| - name: coreos | ||
| versions: | ||
| - version: 4593.2.2 | ||
| architectures: | ||
| - amd64 | ||
| machineTypes: | ||
| - name: g1.2 | ||
| cpu: "2" | ||
| gpu: "0" | ||
| memory: 8Gi | ||
| architecture: amd64 | ||
| storage: | ||
| class: storage_premium_perf1 | ||
| type: storage_premium_perf1 | ||
| size: 50Gi | ||
| regions: | ||
| - name: RegionOne | ||
| zones: | ||
| - name: eu01-1 | ||
| providerConfig: | ||
| apiVersion: stackit.provider.extensions.gardener.cloud/v1alpha1 | ||
| kind: CloudProfileConfig | ||
| machineImages: | ||
| - name: coreos | ||
| versions: | ||
| - version: 4593.2.2 | ||
| regions: | ||
| - name: RegionOne | ||
| architecture: amd64 | ||
| id: <STACKIT_IMAGE_ID> | ||
| storageClasses: TODO: add it after clarification. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Using the STACKIT provider extension with Gardener as end-user | ||
|
|
||
| ## STACKIT Workload Identity with Gardener | ||
|
|
||
| This extension automatically deploys and configures the `stackit-pod-identity-webhook` in your SKE cluster's control plane, enabling workloads to use STACKIT Workload Identity. | ||
|
|
||
| ### What this extension provides | ||
|
|
||
| - Automatic deployment of the `stackit-pod-identity-webhook` in the Shoot control plane | ||
| - Webhook configuration to inject STACKIT authentication into Pods | ||
| - TLS setup for webhook communication with the Kubernetes API server | ||
|
|
||
| No manual webhook installation is required — the extension handles this for you. | ||
|
|
||
| ### Quick start | ||
|
|
||
| **Prerequisites:** | ||
|
|
||
| - An SKE cluster with Workload Identity support enabled | ||
| - A STACKIT Service Account with appropriate permissions | ||
| - A federated identity configured in the STACKIT IdP | ||
|
|
||
| #### Create a federated identity in STACKIT | ||
|
|
||
| Retrieve your cluster's OIDC issuer: | ||
|
|
||
| ```bash | ||
| stackit ske cluster describe -p <PROJECT_ID> <CLUSTER_NAME> -o json \ | ||
| | jq -r '.status.serviceAccountIssuer' | ||
| ``` | ||
|
|
||
| Create a Federated Identity Provider in the STACKIT Portal using this issuer URL. Restrict the federation with the Kubernetes `sub` claim: `system:serviceaccount:<namespace>:<service-account-name>` | ||
|
|
||
| #### Annotate your Kubernetes `ServiceAccount` | ||
|
|
||
| ```yaml | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: app | ||
| namespace: default | ||
| annotations: | ||
| workload-identity.stackit.cloud/service-account-email: "my-service-account@sa.stackit.cloud" | ||
| ``` | ||
|
|
||
| Pods using this `ServiceAccount` will automatically have STACKIT authentication injected. | ||
|
|
||
| ### Supported annotations | ||
|
|
||
| | Annotation | Default | Description | | ||
| | --- | --- | --- | | ||
| | `workload-identity.stackit.cloud/service-account-email` | None | STACKIT Service Account email to assume. **Required.** | | ||
| | `workload-identity.stackit.cloud/audience` | `sts.accounts.stackit.cloud` | Audience for the token. | | ||
| | `workload-identity.stackit.cloud/service-account-token-expiration-seconds` | `600` | Token lifetime in seconds. | | ||
| | `workload-identity.stackit.cloud/idp-token-endpoint` | `https://accounts.stackit.cloud/oauth/v2/token` | Token exchange endpoint. | | ||
|
|
||
| Opt out of mutation with: `workload-identity.stackit.cloud/skip-pod-identity-webhook: "true"` label on Pod or Namespace. | ||
|
|
||
| ### Learn more | ||
|
|
||
| For detailed information about STACKIT Workload Identity, see the [STACKIT documentation](https://docs.stackit.cloud/products/runtime/kubernetes-engine/how-tos/workload-identity/). | ||
|
|
||
| ### References | ||
|
|
||
| - [STACKIT Service Account Federation](https://docs.stackit.cloud/platform/access-and-identity/service-accounts/how-tos/manage-service-account-federations/) | ||
| - [`stackit-pod-identity-webhook`](https://github.com/stackitcloud/stackit-pod-identity-webhook) | ||
| - [Gardener Managed Service Account Issuer](https://gardener.cloud/docs/gardener/security/shoot_serviceaccounts/#managed-service-account-issuer) | ||
| - [Kubernetes ServiceAccount token projection](https://kubernetes.io/docs/concepts/storage/projected-volumes/#serviceaccounttoken) | ||
|
|
||
|
|
||
| ## STACKIT Application Load Balancer | ||
|
|
||
| This extension automatically deploys and configures the STACKIT Application Load Balancer (ALB) Controller in your SKE cluster's control plane, enabling workloads to create Application Load Balancers using Kubernetes `Ingress` resources. | ||
|
|
||
| ### Quick start | ||
|
|
||
| Refer to [usage doc](https://github.com/stackitcloud/application-load-balancer-controller/blob/main/docs/user.md) of Application Load Balancer for setup. | ||
|
|
||
| ### Enable the extension | ||
|
|
||
| The Application Load Balancer extension can be enables by ControlPlaneConfig of the shoot: | ||
|
|
||
| ```yaml | ||
| extensions: | ||
| applicationLoadBalancer: | ||
| enabled: true | ||
|
aniruddha2000 marked this conversation as resolved.
|
||
| ingress: | ||
| enabled: true | ||
| ``` | ||
|
|
||
| NOTE: Ingress support needs to be enabled in order to use Application Load Balancer extension. | ||
|
|
||
| ### Learn more | ||
|
|
||
| For more information about the STACKIT Application Load Balancer Controller, see the [`application-load-balancer-controller`](https://github.com/stackitcloud/application-load-balancer-controller) repository. | ||
|
|
||
| # Migrate from Openstack to STACKIT provider | ||
|
|
||
| We still have openstack code runnnig in the repository, and in future it will be fully migrated and use stackit provider. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add a note here that this is only possible if allowed in the admission webhook. We also should document (not in the usage.md, other extensions document such things in
operations/deployment) that this field can be configured.gardener-extension-provider-stackit/charts/gardener-extension-admission-stackit/charts/runtime/values.yaml
Line 24 in 14cf9ff