Skip to content

Conversation

@notmyown
Copy link

Use ecosystem-core values and blueprint.yaml to create cluster in k3d

@notmyown notmyown linked an issue Nov 10, 2025 that may be closed by this pull request
Copy link
Contributor

@kahoona77 kahoona77 left a comment

Choose a reason for hiding this comment

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

Nice work 💯

I have a few questions and suggestions.

And we should also Update the Readme.md on how to use the k3d-setup now

* override component versions
*/
static void setComponentVersions(String dogu_op = VERSION_K8S_DOGU_OPERATOR, String dogu_op_crd = VERSION_K8S_DOGU_OPERATOR_CRD, String blue_op = VERSION_K8S_BLUEPRINT_OPERATOR, String blue_op_crd = VERSION_K8S_BLUEPRINT_OPERATOR_CRD) {
if (dogu_op != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be null, if the parameter has a default-value above?


yqEvalYamlFile(K3D_VALUES_YAML_FILE, ".components.k8s-ces-control.disabled = true")

yqEvalYamlFile(K3D_VALUES_YAML_FILE, ".components.k8s-blueprint-operator.valuesObject.healthConfig.components.required = [{\\\"name\\\": \\\"k8s-dogu-operator\\\"}, {\\\"name\\\": \\\"k8s-service-discovery\\\"}]")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should no longer be needed

Suggested change
yqEvalYamlFile(K3D_VALUES_YAML_FILE, ".components.k8s-blueprint-operator.valuesObject.healthConfig.components.required = [{\\\"name\\\": \\\"k8s-dogu-operator\\\"}, {\\\"name\\\": \\\"k8s-service-discovery\\\"}]")

Comment on lines 314 to 324
void configureSetupImage(String image) {
String hostKey = ".setup.image.registry"
String repositoryKey = ".setup.image.repository"
String tagKey = ".setup.image.tag"
def repositorySeparatorIndex = image.indexOf("/")
def tagSeparatorIndex = image.lastIndexOf(":")

appendToYamlFile(K3D_VALUES_YAML_FILE, hostKey, image.substring(0, repositorySeparatorIndex))
appendToYamlFile(K3D_VALUES_YAML_FILE, repositoryKey, image.substring(repositorySeparatorIndex + 1, tagSeparatorIndex))
appendToYamlFile(K3D_VALUES_YAML_FILE, tagKey, image.substring(tagSeparatorIndex + 1, image.length()))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still needed?

Comment on lines 326 to 337
void configureComponentOperatorVersion(String operatorVersion, String crdVersion = operatorVersion, String namespace = "k8s") {
String componentOpKey = ".component_operator_chart"
String componentCRDKey = ".component_operator_crd_chart"


def builder = new StringBuilder(namespace)
String operatorValue = builder.append("/k8s-component-operator:").append(operatorVersion).toString()
appendToYamlFile(K3D_VALUES_YAML_FILE, componentOpKey, operatorValue)
builder.delete(0, builder.length());
String crdValue = builder.append(namespace).append("/k8s-component-operator-crd:").append(crdVersion).toString()
appendToYamlFile(K3D_VALUES_YAML_FILE, componentCRDKey, crdValue)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This will not work any-longer. The component-operator version is tied to the ecosystem-core Chart.
I think this function can be removed

Comment on lines 357 to 359
void configureLogLevel(String loglevel) {
appendToYamlFile(K3D_VALUES_YAML_FILE, ".logLevel", loglevel)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

there is no option for the logLevel in the ecosystem-core Chart


kubectl("apply -f ${K3D_BLUEPRINT_FILE} --namespace default")

script.echo "Wait for setup-finisher to be executed..."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
script.echo "Wait for setup-finisher to be executed..."
script.echo "Wait for blueprint to be ready..."

Maybe also change the name if the function

Comment on lines 413 to 418
* Installs the setup to the cluster. Creates an example setup.json with usermgt as dogu and executes the setup.
* After that the method will wait until the dogu-operator is ready.
* @param tag Tag of the setup e. g. "v0.6.0"
* @param timout Timeout in seconds for the setup process e. g. 300
* @param interval Interval in seconds for querying the actual state of the setup e. g. 2
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

This still mentions the setup. Should be ecosystem-core and blueprint

Comment on lines +671 to +673
String tags = "{}";
script.withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: this.backendCredentialsID, usernameVariable: 'TOKEN_ID', passwordVariable: 'TOKEN_SECRET']]) {
tags = this.sh.returnStdOut("curl https://registry.cloudogu.com/v2/${parts[0]}/tags/list -u ${script.env.TOKEN_ID}:${script.env.TOKEN_SECRET}").trim()
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe put this part in a small function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Ecosystem-core

3 participants