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
Fix storageclass selection #150
Conversation
* selector and class were in the wrong part of the Prom and AlertMan templates * They were missing from the ES template * Existing storage_resources var was doing nothing, so I'm removing it * No need to deprecate or migrate, if anyone used this it did nothing
* Ran operator-sdk generate bundle --channels stable,latest --default-channel stable --version 1.1.1 * Adjusted CSV UI hints
|
@@ -55,9 +55,6 @@ spec: | |||
storageClass: | |||
description: Storage class name used for Alertmanager PVC | |||
type: string | |||
storageResources: |
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 param was being used in the wrong part of the template so could never have had any effect. I think it's safe to simply remove it.
...g/service-telemetry-operator/manifests/service-telemetry-operator.clusterserviceversion.yaml
Outdated
Show resolved
Hide resolved
@@ -482,6 +481,8 @@ spec: | |||
value: service-telemetry-operator | |||
- name: ANSIBLE_GATHERING | |||
value: explicit | |||
- name: PROMETHEUS_WEBHOOK_SNMP_IMAGE |
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 is not my change, but it came is as part of the bundle update. It must not have been updated previously after this was added to build/operator.yaml
.
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.
Yea I noticed that I don't get the change unless I run it locally in the branch. I must have added it post-1.1 tag :(
It also didn't show up when I had --output-dir
but worked when it was in the local repo. Thanks for adding that!
@@ -1,6 +1,6 @@ | |||
annotations: | |||
operators.operatorframework.io.bundle.channel.default.v1: stable | |||
operators.operatorframework.io.bundle.channels.v1: latest | |||
operators.operatorframework.io.bundle.channels.v1: stable,latest |
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.
@leifmadsen I used the bundle update command you showed me - is this the right channels setting (I haven't looked this up yet to be 100% sure I know what it means)
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.
oh right, sorry, actually you want --channels latest
and --default-channel stable
.
- --channels is a list of channels this bundle can be a part of -- we only want HEAD to be in
latest
channel - --default-channel defines the bundles default preferred channel -- we want this as stable so that we don't auto-install
latest
channel
Removed the 20Gi to 20G change because it resulted in the following when used against an existing deployment:
|
bundle.Dockerfile
Outdated
@@ -4,7 +4,7 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | |||
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ | |||
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | |||
LABEL operators.operatorframework.io.bundle.package.v1=service-telemetry-operator | |||
LABEL operators.operatorframework.io.bundle.channels.v1=latest | |||
LABEL operators.operatorframework.io.bundle.channels.v1=stable,latest |
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 probably revert this back to just latest
since that's what the HEAD bundle should probably target.
* Not allowed to supply a blank storageClassName and there is no natural default * Even empty selectors cause failures on provisioners that do not support them * 'Failed to provision volume with StorageClass "standard": claim.Spec.Selector is not supported for dynamic provisioning on Cinder'
Testing
As of this patch, I'd say that STF supports OCS for persistent storage of metrics and events. I did not test any scenarios involving changing the class of already provisioned storage. I did not (really) test the selectors, but they appear to be in the right place now since they fail if they are unsupported. |
a4fad94
to
b37660c
Compare
While testing compatibility with Openshift Container Storage, I found that the existing settings for picking a storageclass did not work. I manually tested the
storageClassName
element in the new place in the AlertMan and Prom templates and it worked as expected, so I wrote this up to adjust.