-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Helm chart deploy registries #13890
Helm chart deploy registries #13890
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
Signed-off-by: Michal Vala <mvala@redhat.com>
I've added new bool variables for each registry deploy |
{{- if .Values.cheDevfileRegistry.url }} | ||
CHE_WORKSPACE_DEVFILE__REGISTRY__URL: {{ .Values.cheDevfileRegistry.url | quote }} | ||
{{- else if .Values.cheDevfileRegistry.deploy }} | ||
CHE_WORKSPACE_DEVFILE__REGISTRY__URL: http://{{ printf .Values.global.cheDevfileRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }} |
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.
how it will work if che would be configured to work over https?
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.
hmm, good question. It probably will not work. I guess we would need to have registries also on https then. I'll look at that.
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.
fixed af3eaeb
I'd like to avoid duplication of print
, but I don't know how to do it to keep readability.
{{- if .Values.chePluginRegistry.url }} | ||
CHE_WORKSPACE_PLUGIN__REGISTRY__URL: {{ .Values.chePluginRegistry.url | quote }} | ||
{{- else if .Values.chePluginRegistry.deploy }} | ||
CHE_WORKSPACE_PLUGIN__REGISTRY__URL: http://{{ printf .Values.global.chePluginRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }}/v3 |
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.
same question about https?
Does this pr compatible with che-incubator/chectl#189 these changes? |
Can one of the admins verify this PR? |
@skabashnyuk no, because I've changed the |
Signed-off-by: Michal Vala <mvala@redhat.com>
@skabashnyuk ok, I've reverted the variable rename and it is still not compatible as chectl have it's defaults to openshift.io registries and is always sending the parameter, overriding anything what was set before. I guess patch chectl to NOT have default registries urls is way to go here. Agree? |
I believe that makes sense. |
@l0rd When discussing about the implementation of this issue on the operator side, we had agreed on using the Maybe this should be the same in the helm charts and |
deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/ingress.yaml
Outdated
Show resolved
Hide resolved
deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/ingress.yaml
Outdated
Show resolved
Hide resolved
# devfileRegistryUrl: "https://che-devfile-registry.openshift.io/" | ||
# pluginRegistryUrl: "https://che-plugin-registry.openshift.io/v3" | ||
|
||
cheDevfileRegistry: | ||
deploy: true |
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.
Couldn't we change this to external: false
, to be consistent with what was decided for the operator (and what is already in place for the Keycloak case )?
cc @l0rd
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.
If this is the way how we're doing that in operator, I agree. Do you know how to do NOT
in requirements.yaml
condition:
? https://github.com/sparkoo/che/blob/helm-chart-deploy-registries/deploy/kubernetes/helm/che/requirements.yaml#L14 I can't find anything how to achieve that and all my experiments are failing so far :/
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.
If this is the way how we're doing that in operator, I agree
it is
Do you know how to do NOT in requirements.yaml condition ?
TBH I don't know. Not a Helm expert, but what if you use an else
as mentioned here: https://github.com/helm/helm/blob/master/docs/chart_template_guide/control_structures.md#ifelse
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.
Sorry, I didn't read the question correctly: if/else has nothing to do with your question it seems. So no, I don't know. Maybe using a calculated value that could be defined as the opposite of external
?
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 far as I know, requirements.yaml
is just clean yaml, no interpolation. And I believe all values there must be taken from values.yaml
, which is the again just clean yaml. For keycloak we're doing check for true
here https://github.com/eclipse/che/blob/master/deploy/kubernetes/helm/che/requirements.yaml#L18 global.cheDedicatedKeycloak
. So we might go with deploy=true
way, just for technology conventions sake here.
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.
Yeah, it seems that you will have to do the same as for Keycloak.
I assume that CheCtl should do the same as the operator though, to maintain some sort of consistency.
@l0rd do you confirm ?
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.
You mean that there will be some inconsistency amongst helm and operator in the semantic of the parameter right? Yes it doesn't seam like a big deal and we can let chectl manage it
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
chectl PR to don't send registries defaults che-incubator/chectl#228 |
All comments were fixed. Can you please re-review the changes and approve/comment the PR? Same for chectl PR here che-incubator/chectl#228 |
app: che-plugin-registry | ||
strategy: | ||
type: RollingUpdate | ||
rollingParams: |
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.
I get unknown field "rollingParams" in io.k8s.api.extensions.v1beta1.DeploymentStrategy
It doesn't look like rollingParams
is in a DeploymentStrategy
(c.f. k8s api reference). That's curious. Have you tested on OpenShift?
Anyway chaging to
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
worked
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.
no, I've tested on minikube. Looks like values were ignored, but I didn't get any error. Fixed
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.
I got configs from registries repos (https://github.com/eclipse/che-devfile-registry/blob/master/deploy/kubernetes/che-devfile-registry/templates/deployment.yaml#L24), I'll fix them also.
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.
# | ||
|
||
chePluginRegistry: | ||
image: quay.io/openshiftio/che-plugin-registry |
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.
We are moving to the new quay.io/eclipse organisation. Please use quay.io/eclipse/che-plugin-registry:nightly here.
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.
fixed
# | ||
|
||
cheDevfileRegistry: | ||
image: quay.io/openshiftio/che-devfile-registry |
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.
We are moving to the new quay.io/eclipse organisation. Please use quay.io/eclipse/che-devfile-registry:nightly here.
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.
fixed
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
kind: Deployment | ||
metadata: | ||
labels: | ||
app: che-devfile-registry |
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.
app:che
component: devfile-registry
like other components ? https://github.com/eclipse/che/blob/8ddc04ba03d4f7745782cf2e6fdb3d1405711c21/deploy/kubernetes/helm/che/custom-charts/che-keycloak/templates/deployment.yaml#L14-L15
?
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.
yes, fixed
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
I see no more unfixed comments. Could you please re-review/approve/comment? @l0rd @davidfestal @benoitf |
Signed-off-by: Michal Vala <mvala@redhat.com>
- containerPort: 8080 | ||
livenessProbe: | ||
httpGet: | ||
path: /plugins/ |
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.
AFAIK /plugins is deprecated so should we wait for another path like v3/plugins ?
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.
yes, fixed
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.
PR for plugin-registry eclipse-che/che-plugin-registry#189
Signed-off-by: Michal Vala <mvala@redhat.com>
ci-build |
@sparkoo what was the reason to do changes in commit bb0af81 ? This introduces inconsistency with the already-merged implementation of the registry deployment on the Che operator side (https://github.com/eclipse/che-operator/pull/51/files#diff-d9445e614f0d728fd140771b0fd29c50R381) |
@davidfestal hmm, I've followed other components pattern here #13890 (comment) |
@davidfestal @benoitf |
@sparkoo @benoitf if you are OK about However in CheCtl code, in the {
title: 'Wait until Keycloak pod is deleted',
enabled: (ctx: any) => !ctx.isAlreadyStopped && !ctx.isNotReadyYet && ctx.foundKeycloakDeployment,
task: async (_ctx: any, task: any) => {
await kh.waitUntilPodIsDeleted('app=keycloak', flags.chenamespace)
task.title = `${task.title}...done.`
}
}, That doesn't seem very consistent to me. @l0rd any idea ? |
1 similar comment
@sparkoo @benoitf if you are OK about However in CheCtl code, in the {
title: 'Wait until Keycloak pod is deleted',
enabled: (ctx: any) => !ctx.isAlreadyStopped && !ctx.isNotReadyYet && ctx.foundKeycloakDeployment,
task: async (_ctx: any, task: any) => {
await kh.waitUntilPodIsDeleted('app=keycloak', flags.chenamespace)
task.title = `${task.title}...done.`
}
}, That doesn't seem very consistent to me. @l0rd any idea ? |
@davidfestal probably a missing code refactoring when selector methods were introduced |
@davidfestal |
|
@benoitf wdyt can we merge this pr? Or should we do some changes in chectl first? |
Seems to me that we should merge this and further work on chectl afterwards. There are already pending PRs on chectl that we are waiting for. |
@skabashnyuk can merge here |
What does this PR do?
Helm chart to deploy devfile and plugin registries with Che by default.
cheDevfileRegistry.deploy
andchePluginRegistry.deploy
default to truecheDevfileRegistry.url
andchePluginRegistry.url
default empty. When empty, they are composed by helm to work with local deployment.che.properties
. Only situation when it's used is whendeploy
s are set to false andurl
s are not set.chectl
What issues does this PR fix or reference?
#13633 which is subtask of #13557
Release Notes
n/a
Docs PR
n/a