-
Notifications
You must be signed in to change notification settings - Fork 52
Feature/151 use ecosystem core #152
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
base: develop
Are you sure you want to change the base?
Conversation
kahoona77
left a comment
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.
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) { |
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.
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\\\"}]") |
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.
Should no longer be needed
| yqEvalYamlFile(K3D_VALUES_YAML_FILE, ".components.k8s-blueprint-operator.valuesObject.healthConfig.components.required = [{\\\"name\\\": \\\"k8s-dogu-operator\\\"}, {\\\"name\\\": \\\"k8s-service-discovery\\\"}]") |
| 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())) | ||
| } |
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.
Is this still needed?
| 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) | ||
| } |
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.
This will not work any-longer. The component-operator version is tied to the ecosystem-core Chart.
I think this function can be removed
| void configureLogLevel(String loglevel) { | ||
| appendToYamlFile(K3D_VALUES_YAML_FILE, ".logLevel", loglevel) | ||
| } |
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.
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..." |
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.
| 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
| * 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 | ||
| */ |
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.
This still mentions the setup. Should be ecosystem-core and blueprint
| 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() |
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.
Maybe put this part in a small function
Use ecosystem-core values and blueprint.yaml to create cluster in k3d