-
Notifications
You must be signed in to change notification settings - Fork 46
Docker plain helm chart #1035
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: master
Are you sure you want to change the base?
Docker plain helm chart #1035
Conversation
…t name and release name
…on helm notes and remove switch cases on k8s version on ingress template
|
Having a very strict values.schema.json is probably not going to provide good experience when using helmValues defined from the Jenkinsfile. According to https://helm.sh/docs/topics/charts/ , "the schema is applied to the final .Values object, and not just to the values.yaml file." Let's say we have the following in the Jenkinsfile: When the above runs on Jenkins, ods-jenkins-shared-library will add two arguments on the command line: Then it will be aborted because additionalProperties are not allowed in both places. Is the user really expected to add two entries in values.schema.json to fix this? I suggest that we remove the whole values.schema.json file. If the result of rendering is bad, |
I partially agree, I think there is a middle way though. In the |
This reverts commit 167397b.
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.
A few new comments and some conversations still open.
docker-plain/Jenkinsfile.template
Outdated
| } | ||
| odsComponentStageRolloutOpenShiftDeployment(context) | ||
| odsComponentStageRolloutOpenShiftDeployment(context, [ | ||
| 'selector': "app.kubernetes.io/name=${context.componentId}", |
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.
Why is this selector only the name? chart.selectorLables are, as they should, name + instance.
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.
Why is this selector only the name? chart.selectorLables are, as they should, name + instance.
Do you mean https://kubernetes.io/docs/reference/labels-annotations-taints/#app-kubernetes-io-instance? How do we generate the unique postfix like in the example given "mysql-abcxyz"?
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.
@faust2199 Unless there's something I'm missing, the deployment.yaml is using chart.selectorLabels for the selector. This is defined in _helpers.tpl to be name = chart.name and instance = .Release.Name. Whatever we use it must match the actual selectors used in deployments, services...
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.
My questions here are:
- Is the chart name always equal to the componentId?
- Will the functionality of getting resources based only on the name label never return resources that shouldn't match?
- Is it correct to specify this selector in the deployment mean when the actual selector used is different? (For this I would answer no)
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.
As agreed in the meeting, we will make the helmReleaseName config parameter explicit and add it to the selector to match the actual selector used in the deployments.
docker-plain/files/chart/values.yaml
Outdated
| autoscaling: | ||
| enabled: false | ||
| minReplicas: 1 | ||
| maxReplicas: 3 |
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.
The Release Manager doesn't support multiple replicas yet. Not sure if these values should even be configurable, or at least maxReplicas should be 1 by default, with a comment saying that higher values aren't supported.
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.
@jafarre-bi I don't know about this limitation, there's nothing in opendevstack documentation about. Please provide the source
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.
@segfault16 HelmDeploymentStrategy, line 198:
// TODO: Once the orchestration pipeline can deal with multiple replicas,
// update this to store multiple pod artifacts.
Even if the code could deal with it and the documentation and traceability would be correctly preserved, it's still not officially supported. We would need to validate the functionality, document it and create specific automated tests to prevent regressions.
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.
As agreed, I will see if we are on time to add a note stating that multiple replicas are currently unsupported to the official documentation. We will add a comment to this values file referencing that to warn the users to use this at their own risk.
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.
The default value for maxReplicas must be 1. Using (unsupported) multiple replicas must be an informed opt-in.
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.
Adding comments to the open conversations with the outcome of the meeting we just had.
docker-plain/Jenkinsfile.template
Outdated
| } | ||
| odsComponentStageRolloutOpenShiftDeployment(context) | ||
| odsComponentStageRolloutOpenShiftDeployment(context, [ | ||
| 'selector': "app.kubernetes.io/name=${context.componentId}", |
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.
As agreed in the meeting, we will make the helmReleaseName config parameter explicit and add it to the selector to match the actual selector used in the deployments.
docker-plain/files/chart/values.yaml
Outdated
| autoscaling: | ||
| enabled: false | ||
| minReplicas: 1 | ||
| maxReplicas: 3 |
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.
As agreed, I will see if we are on time to add a note stating that multiple replicas are currently unsupported to the official documentation. We will add a comment to this values file referencing that to warn the users to use this at their own risk.
|
@jafarre-bi is the official doc updated? |
The change in the documentation has been merged into master through opendevstack/ods-jenkins-shared-library#1245 |
Has this open point been addressed? |
|
@jafarre-bi selectors and doc updated, please test rollout to production and merge on success |
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.
@segfault16, please see the comments to the latest changes.
| */ | ||
| odsComponentStageBuildOpenShiftImage(context) | ||
| } | ||
| def releaseName = context.componentId // can be customized as needed |
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.
It should be explicit that it must match .Release.Name. Otherwise, it will still be inconsistent with the selector used elsewhere.
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.
@jafarre-bi we're supplying the same releaseName to helm upgrade (via helmReleaseName) as we use in the selector. .Release.Name is given by releaseName, we specify the selector. What inconsistency are you referring to?
| memory: 16Mi | ||
| ephemeral-storage: 1Mi | ||
|
|
||
| ## Before enabling check the official ODS documentation about replicate support: https://www.opendevstack.org/ods-documentation/opendevstack/latest/jenkins-shared-library/orchestration-pipeline.html#_known_limitations |
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.
Good idea to link to the official docs, but it's not enough, since many people will miss it. Please, make the warning explicit: multiple replicas aren't currently supported by the orchestration pipeline.
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.
@jafarre-bi we agreed on this in July and I've been waiting for the official doc to reference since then. Those values will get templated and there's no way to keep this information up-to-date then. the reference will stay valid longer.
docker-plain/files/chart/values.yaml
Outdated
| autoscaling: | ||
| enabled: false | ||
| minReplicas: 1 | ||
| maxReplicas: 3 |
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.
The default value for maxReplicas must be 1. Using (unsupported) multiple replicas must be an informed opt-in.
Add helm chart for docker plain
Refers to #1013
Tasks:
docs/modules/...directory<quickstarter>/testdatadirectory