Skip to content
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

Runtime CR examples updated #345

Merged
merged 7 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions docs/adr/assets/runtime-examples/aws-freemium.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
apiVersion: infrastructuremanager.kyma-project.io/v1alpha1
apiVersion: infrastructuremanager.kyma-project.io/v1
kind: Runtime
metadata:
labels:
kyma-project.io/controlled-by-provisioner: "false"
kyma-project.io/instance-id: instance-id
kyma-project.io/runtime-id: runtime-id
kyma-project.io/broker-plan-id: plan-id
kyma-project.io/broker-plan-name: plan-name
kyma-project.io/global-account-id: global-account-id
kyma-project.io/subaccount-id: subAccount-id
kyma-project.io/shoot-name: shoot-name
kyma-project.io/shoot-name: aws-fremium
kyma-project.io/region: region
operator.kyma-project.io/kyma-name: kymaName
name: runtime-id
name: aws-fremium
namespace: kcp-system
spec:
shoot:
# spec.shoot.name is required
name: shoot-name
name: aws-fremium
# spec.shoot.purpose is required
purpose: evaluation
# spec.shoot.region is required
Expand All @@ -42,17 +43,12 @@ spec:
workers:
- machine:
# spec.shoot.workers.machine.type is required
type: m5.xlarge
type: m6i.xlarge
# spec.shoot.workers.machine.image is optional, when not provider default will be used
# Will be modified by the SRE
image:
name: gardenlinux
version: 1312.3.0
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: gp2
size: 50Gi
version: 1443.9.0
# spec.shoot.worker.zones is required
zones:
- eu-central-1b
Expand All @@ -68,8 +64,14 @@ spec:
# spec.shoot.workers.maxUnavailable is required in the first release.
# It can be optional in the future, as it is always set to 0
maxUnavailable: 0
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: gp2
size: 50Gi
# spec.shoot.Networking is required
networking:
type: calico
pods: 100.64.0.0/12
nodes: 10.250.0.0/16
services: 100.104.0.0/13
Expand Down
25 changes: 18 additions & 7 deletions docs/adr/assets/runtime-examples/aws-minimal.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
apiVersion: infrastructuremanager.kyma-project.io/v1alpha1
apiVersion: infrastructuremanager.kyma-project.io/v1
kind: Runtime
metadata:
labels:
kyma-project.io/controlled-by-provisioner: "false"
kyma-project.io/instance-id: instance-id
kyma-project.io/runtime-id: runtime-id
kyma-project.io/broker-plan-id: plan-id
kyma-project.io/broker-plan-name: plan-name
kyma-project.io/global-account-id: global-account-id
kyma-project.io/subaccount-id: subAccount-id
kyma-project.io/shoot-name: shoot-name
kyma-project.io/shoot-name: aws-minimal
kyma-project.io/region: region
operator.kyma-project.io/kyma-name: kymaName
name: runtime-id
name: aws-minimal
namespace: kcp-system
spec:
shoot:
# spec.shoot.name is required
name: shoot-name
name: aws-minimal
# spec.shoot.purpose is required
purpose: production
# spec.shoot.region is required
Expand All @@ -41,8 +42,12 @@ spec:
# spec.shoot.provider.workers is required
workers:
- machine:
# spec.shoot.workers.machine.type is required
type: m6i.large
# spec.shoot.workers.machine.type is required
type: m6i.large
image:
name: gardenlinux
version: 1443.9.0
name: "worker-0"
# spec.shoot.workers.zones is required
zones:
- eu-central-1a
Expand All @@ -58,8 +63,14 @@ spec:
# spec.shoot.workers.maxUnavailable is required in the first release.
# It can be optional in the future, as it is always set to 0
maxUnavailable: 0
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: gp2
size: 50Gi
# spec.shoot.Networking is required
networking:
type: calico
pods: 100.64.0.0/12
nodes: 10.250.0.0/16
services: 100.104.0.0/13
Expand All @@ -71,7 +82,7 @@ spec:
security:
networking:
filter:
# spec.security.networking is required
# spec.security.networking.filter.egress.enabled is required
egress:
enabled: false
# spec.security.administrators is required
Expand Down
21 changes: 16 additions & 5 deletions docs/adr/assets/runtime-examples/aws-trial.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
apiVersion: infrastructuremanager.kyma-project.io/v1alpha1
apiVersion: infrastructuremanager.kyma-project.io/v1
kind: Runtime
metadata:
labels:
kyma-project.io/controlled-by-provisioner: "false"
kyma-project.io/instance-id: instance-id
kyma-project.io/runtime-id: runtime-id
kyma-project.io/broker-plan-id: plan-id
kyma-project.io/broker-plan-name: plan-name
kyma-project.io/global-account-id: global-account-id
kyma-project.io/subaccount-id: subAccount-id
kyma-project.io/shoot-name: shoot-name
kyma-project.io/shoot-name: aws-trial
kyma-project.io/region: region
operator.kyma-project.io/kyma-name: kymaName
name: runtime-id
name: aws-trial
namespace: kcp-system
spec:
shoot:
# spec.shoot.name is required
name: shoot-name
name: aws-trial
# spec.shoot.purpose is required
purpose: evaluation
# spec.shoot.licenceType is optional, default=nil
Expand Down Expand Up @@ -44,7 +45,11 @@ spec:
workers:
- machine:
# spec.shoot.workers.machine.type is required
type: mx5.large
type: m6i.large
image:
name: gardenlinux
version: 1443.9.0
name: "worker-0"
# spec.shoot.workers.zones is required
zones:
- eu-central-1b
Expand All @@ -58,8 +63,14 @@ spec:
# spec.shoot.workers.maxUnavailable is required in the first release.
# It can be optional in the future, as it is always set to 0
maxUnavailable: 0
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: gp2
size: 50Gi
# spec.shoot.Networking is required
networking:
type: calico
pods: 10.96.0.0/13
nodes: 10.250.0.0/22
services: 10.104.0.0/13
Expand Down
29 changes: 15 additions & 14 deletions docs/adr/assets/runtime-examples/aws.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
apiVersion: infrastructuremanager.kyma-project.io/v1alpha1
apiVersion: infrastructuremanager.kyma-project.io/v1
kind: Runtime
metadata:
labels:
kyma-project.io/controlled-by-provisioner: "false"
kyma-project.io/instance-id: instance-id
kyma-project.io/runtime-id: runtime-id
kyma-project.io/broker-plan-id: plan-id
kyma-project.io/broker-plan-name: plan-name
kyma-project.io/global-account-id: global-account-id
kyma-project.io/subaccount-id: subAccount-id
kyma-project.io/shoot-name: shoot-name
kyma-project.io/shoot-name: aws-full
kyma-project.io/region: region
operator.kyma-project.io/kyma-name: kymaName
name: runtime-id
name: aws-full
namespace: kcp-system
spec:
shoot:
# spec.shoot.name is required
name: shoot-name
name: aws-full
# spec.shoot.purpose is required
purpose: production
# spec.shoot.region is required
region: eu-central-1
# spec.shoot.platformRegion is required
platformRegion: "cd-eu11"
platformRegion: "cf-eu11"
# spec.shoot.secretBindingName is required
secretBindingName: "hyperscaler secret"
# spec.shoot.enforceSeedLocation is optional ; it allows to make sure the seed cluster will be located in the same region as the runtime
enforceSeedLocation: "true"
enforceSeedLocation: true
kubernetes:
# spec.shoot.kubernetes.version is optional, when not provided default will be used
# Will be modified by the SRE
Expand Down Expand Up @@ -61,19 +62,13 @@ spec:
# Will be modified by the SRE
image:
name: gardenlinux
version: 1312.3.0
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: gp2
size: 50Gi
version: 1443.9.0
name: "worker-0"
# spec.shoot.workers.zones is required
zones:
- eu-central-1a
- eu-central-1b
- eu-central-1c
# spec.shoot.workers.name is optional, if not provided default will be used
name: cpu-worker-0
# spec.shoot.workers.minimum is required
minimum: 3
# spec.shoot.workers.maximum is required
Expand All @@ -84,8 +79,14 @@ spec:
# spec.shoot.workers.maxUnavailable is required in the first release.
# It can be optional in the future, as it is always set to 0
maxUnavailable: 0
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: gp2
size: 50Gi
# spec.shoot.Networking is required
networking:
type: calico
pods: 100.64.0.0/12
nodes: 10.250.0.0/16
services: 100.104.0.0/13
Expand Down
29 changes: 21 additions & 8 deletions docs/adr/assets/runtime-examples/azure-fremium.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
apiVersion: infrastructuremanager.kyma-project.io/v1alpha1
apiVersion: infrastructuremanager.kyma-project.io/v1
kind: Runtime
metadata:
labels:
kyma-project.io/controlled-by-provisioner: "false"
kyma-project.io/instance-id: instance-id
kyma-project.io/runtime-id: runtime-id
kyma-project.io/broker-plan-id: plan-id
kyma-project.io/broker-plan-name: plan-name
kyma-project.io/global-account-id: global-account-id
kyma-project.io/subaccount-id: subAccount-id
kyma-project.io/shoot-name: shoot-name
kyma-project.io/shoot-name: azure-fremium
kyma-project.io/region: region
operator.kyma-project.io/kyma-name: kymaName
name: runtime-id
name: azure-fremium
namespace: kcp-system
spec:
shoot:
# spec.shoot.name is set required
name: shoot-name
name: azure-fremium
# spec.shoot.purpose is required
purpose: evaluation
# spec.shoot.region is required
region: eu-central-1
region: polandcentral
# spec.shoot.platformRegion is required
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what was your intention with this change?

platformRegion: "cf-us10"
# spec.shoot.secretBindingName is required
Expand All @@ -41,11 +42,22 @@ spec:
# spec.shoot.provider.workers is required
workers:
- machine:
# spec.shoot.workers.machine.type is required
type: mx5.large
# spec.shoot.workers.machine.type is required
type: Standard_D2s_v5
# spec.shoot.workers.machine.image is optional, when not provider default will be used
# Will be modified by the SRE
image:
name: gardenlinux
version: 1443.9.0
name: "worker-0"
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: Standard_LRS
size: 50Gi
# spec.shoot.worker.zones is required
zones:
- 1
- "1"
# spec.shoot.workers.minimum is required
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this quotation necessary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, couldn't we use the actual regions here to omit the number of things someone has to change in the CR to make it work? We have such zones listed in e.g. aws-trial example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this quotation necessary?

When quotation is missed we will get the following error:

The Runtime "azure-lite" is invalid: spec.shoot.provider.workers[0].zones[0]: Invalid value: "integer": spec.shoot.provider.workers[0].zones[0] in body must be of type string: "integer"

Kubernetes expects string field, as zones have the following definition in the CRD:

zones:
  description: |-
     Zones is a list of availability zones that are used to evenly distribute this worker pool. Optional as not every provider may support availability zones.
  items:
    type: string
  type: array

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, couldn't we use the actual regions here to omit the number of things someone has to change in the CR to make it work? We have such zones listed in e.g. aws-trial example

We do use actual regions. polandcentral was introduced in the last year and is fully supported by Gardener.

minimum: 1
# spec.shoot.workers.maximum is required
Expand All @@ -58,6 +70,7 @@ spec:
maxUnavailable: 0
# spec.shoot.Networking is required
networking:
type: calico
pods: 10.96.0.0/13
nodes: 10.250.0.0/22
services: 10.104.0.0/13
Expand Down
16 changes: 9 additions & 7 deletions docs/adr/assets/runtime-examples/azure-lite.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
apiVersion: infrastructuremanager.kyma-project.io/v1alpha1
apiVersion: infrastructuremanager.kyma-project.io/v1
kind: Runtime
metadata:
labels:
kyma-project.io/controlled-by-provisioner: "false"
kyma-project.io/instance-id: instance-id
kyma-project.io/runtime-id: runtime-id
kyma-project.io/broker-plan-id: plan-id
kyma-project.io/broker-plan-name: plan-name
kyma-project.io/global-account-id: global-account-id
kyma-project.io/subaccount-id: subAccount-id
kyma-project.io/shoot-name: shoot-name
kyma-project.io/shoot-name: azure-lite
kyma-project.io/region: region
operator.kyma-project.io/kyma-name: kymaName
name: runtime-id
name: azure-lite
namespace: kcp-system
spec:
shoot:
# spec.shoot.name is required
name: shoot-name
name: azure-lite
# spec.shoot.purpose is required
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usernameClaim: sub at line 40 has incorrect indentation and can't be applied.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usernameClaim: sub at line 40 has incorrect indentation and can't be applied.

Fixed

purpose: production
# spec.shoot.region is required
Expand All @@ -36,7 +37,7 @@ spec:
issuerURL: https://my.cool.tokens.com
signingAlgs:
- RS256
usernameClaim: sub
usernameClaim: sub
# spec.shoot.provider is required
provider:
# spec.shoot.provider.type is required
Expand All @@ -50,15 +51,15 @@ spec:
# Will be modified by the SRE
image:
name: gardenlinux
version: 1312.3.0
version: 1443.9.0
# spec.shoot.workers.volume is required for the first release
# Probably can be moved into KIM, as it is hardcoded in KEB, and not dependent on plan
volume:
type: Standard_LRS
size: 50Gi
# spec.shoot.worker.zones is required
zones:
- 1
- "1"
# spec.shoot.workers.name is optional, if not provided default will be used
name: cpu-worker-0
# spec.shoot.workers.minimum is required
Expand All @@ -73,6 +74,7 @@ spec:
maxUnavailable: 0
# spec.shoot.Networking is required
networking:
type: calico
pods: 10.96.0.0/13
nodes: 10.250.0.0/22
services: 10.104.0.0/13
Expand Down
Loading
Loading