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
MGMT-4668: Generate OLM opeartor manifest to custom file #1609
MGMT-4668: Generate OLM opeartor manifest to custom file #1609
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: machacekondra The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Related-to: openshift/assisted-installer#271 |
8d553b0
to
c76c92b
Compare
c76c92b
to
d4cddae
Compare
@machacekondra why it is different than creating manifests with bootkube by adding them to manifests? Trying to understand when we expect those manifests to be created? after cluster is up and running? |
The problem is that the operator CRDs are not created at the time the With this PR, we create only OLM's resources by the |
@machacekondra wondering if those manifests can't be applied from bootstrap. When control plane will be up, operators should start already no? cluster bootstrap should eventually succeed no? |
How would you do it if you were installing with openshift installer?
Who will apply these custom assisted-installer manifests? |
After talking with @eranco74 we think that this case is relevant only for SNO, regular flow should work without this one. |
I am not sure about this one. We wait for for the operators to be ready in
Why do you think it's SNO issue only? It's problem with normal installation as well. But I agree that creating a special API for those files would make a better sense. Something like:
And the content would be all the relevant custom manifests? |
Pretty sure that it's relevant only for SNO because assisted-installer is capable to install OLM operators without creating the manifests from the assisted-controller. Also I agree there should be a dedicated API for these manifests, overloading them on the bootstrap ignition (bootstrap node never use them) and pulling the bootstrap ignition from the assisted-controller seems wrong. |
d4cddae
to
bea6640
Compare
So I've update the code to upload the manifest to storage. Example:
|
/test subsystem-aws |
bea6640
to
061dfbf
Compare
061dfbf
to
188385f
Compare
/retest |
4b676e2
to
7810b0a
Compare
/retest |
1 similar comment
/retest |
internal/operators/manager.go
Outdated
} | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (mgr *Manager) createManifests(ctx context.Context, cluster *common.Cluster, filename string, content []byte) error { | ||
func (mgr *Manager) createCustomManifest(ctx context.Context, cluster *common.Cluster, content string) error { | ||
objectFileName := fmt.Sprintf("%s/custom_manifests.yaml", cluster.ID) |
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.
createCustomManifest const it
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.
Looks good
} | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (mgr *Manager) createManifests(ctx context.Context, cluster *common.Cluster, filename string, content []byte) error { | ||
func (mgr *Manager) createCustomManifest(ctx context.Context, cluster *common.Cluster, content string) error { |
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.
Consider adding a comment explaining that this is for custom manifests that requires CRDs are created late by the cluster operators (and not by the CVO)
/lgtm |
7810b0a
to
bd7bd2e
Compare
This PR add a possibility to create manifests from assisted-installer. In some cases it may be useful to create manifest from assisted-isntaller instead of openshift-installer. For example when installing CNV/LSO/OCS we need to have predefined CRDs for the operators, because at the time of the operator is being created the CRDs are not yet created by the OLM. This PR add support to read the files from custom_manifest.yaml and fetch the content of those files and create them via dynamic client. Since assisted-installer-controller runs with limited permissions, every resource which should be created by assisted_installer_controller must be added to the clusterrole. Signed-off-by: Ondra Machacek <omachace@redhat.com>
bd7bd2e
to
4cee2f3
Compare
@machacekondra: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: machacekondra, tsorya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…on (openshift#1609)" This reverts commit c1fcc80.
…on (openshift#1609)" This reverts commit c1fcc80.
…on (openshift#1609)" This reverts commit c1fcc80.
/cherry-pick ocm-2.3 |
@pkliczewski: new pull request could not be created: failed to create pull request against openshift/assisted-service#ocm-2.3 from head openshift-cherrypick-robot:cherry-pick-1609-to-ocm-2.3: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"No commits between openshift:ocm-2.3 and openshift-cherrypick-robot:cherry-pick-1609-to-ocm-2.3"}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"} In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This commit is already part of |
This PR add a possibility to create manifests from assisted-installer.
In some cases it may be useful to create manifest from
assisted-isntaller
instead ofopenshift-installer
. For example wheninstalling CNV/LSO/OCS we need to have predefined CRDs for the
operators, because at the time of the operator is being created the CRDs
are not yet created by the OLM.
This PR add support to add the files to the
bootstrap.ign
to directoryprefix
/opt/openshift/olmoperators
, so laterassisted-installer
can fetchthe content of those files and create them via dynamic client.
Signed-off-by: Ondra Machacek omachace@redhat.com