v0.5.0
Most of the changes in this release are related to errors prevention and operation options.
Here are some highlights.
Environments
Added the option to specify a git branch instead of the default one for each repository in each workspace. To select it, expand the workspace details to visualize the git repositories and fill the field with the branch name:
Provisioned environment:
If no branch is defined, it'll clone the repository with the default branch:
Provisioned environment:
Added options to retry provisioning a workspace and visualizing setup error logs:
Operator
Most Kubernetes objects created by CPS1 now have their names normalized. That is, their name is summarized to fit their type name length restriction and a random suffix is added to avoid collisions. This prevent some errors that could happen while provisioning environments with very large names that created resources with a very strict name size (e.g statefulsets).
Added a new configuration option to set which strategy to use for volume allocation for workspaces:
- sharedPerUser: every workspace created by that user will consume a single volume from their namespace
- isolatedPerWorkspace: every workspace gets its own isolated volume
The default strategy is isolatedPerWorkspace. To change it, configure the workspaceVolumes in the config object:
workspaceVolumes:
allocationStrategy: isolatedPerWorkspace # Or "sharedPerUser"
Other options added to workspaceVolumes includes size, accessMode, and storageClass. Here is an example with the default values:
workspaceVolumes:
allocationStrategy: isolatedPerWorkspace
size: 12Gi
storageClass: null # leaving it null means it will use the cluster default StorageClass
accessMode: ReadWriteOnce
Helm Charts
We've renamed the contrib chart to catalog, as we feel this name describes its purpose more clearly.
Added an optional CronJob that pauses every environment. Configure the values of the platform chart to use it. Here are the default values:
environmentScheduler:
enabled: false # Change to true to enable
serviceAccountName: "environment-scheduler"
clusterRoleName: "environment-scheduler"
clusterRoleBindingName: "environment-scheduler"
cronJob:
name: "environment-scheduler"
schedule: "0 22 * * *"
image:
name: "docker.io/alpine/kubectl"
tag: "1.34.2"
If you enable it with the default values every environment will be paused daily at 22:00.
Also added some extra customization options for the platform, such as the Ingress class and their annotations. Here are the default values:
ingress:
className: nginx
annotations: {}
The internal registry size is also configurable:
internalRegistry:
volumeSize: 50Gi
And some options were included to control the pod placement for the CPS1 server (operator), gateway and internal OCI registry. The defaults are empty:
workloads:
# See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
nodeSelector: {}
# See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
affinity: {}
# See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
Here is an example to provision those pods on nodes tainted with workload=addons:NoSchedule:
workloads:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: workload
operator: In
values:
- addons
tolerations:
- key: workload
operator: Equal
value: addons
effect: NoSchedule
You can use this to create a node group with smaller nodes to run CPS1 and other cluster addons, while a node group with bigger nodes are available to run the development environments.