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
ztp: OCPBUGS-4329: Adds LVM operator source crs for ZTP #1332
ztp: OCPBUGS-4329: Adds LVM operator source crs for ZTP #1332
Conversation
I was able to create a container image with the changes: quay.io/alosadag/ztp-site-generator:lvmo And applied the following site-policy successfully: apiVersion: ran.openshift.io/v1
kind: PolicyGenTemplate
metadata:
name: "eric1"
namespace: "ztp-eric1-policies"
spec:
bindingRules:
name: "eric1"
mcp: "master"
remediationAction: inform
sourceFiles:
- fileName: StorageLVMOSubscriptionNS.yaml
policyName: "lvmo-policy"
- fileName: StorageLVMOSubscriptionOperGroup.yaml
policyName: "lvmo-policy"
- fileName: StorageLVMOSubscription.yaml
policyName: "lvmo-policy"
- fileName: StorageLVMCluster.yaml
policyName: "lvmo-config" |
Can you fix the commit message. It needs to start with "ztp: " to pass the CI component test. |
annotations: | ||
ran.openshift.io/ztp-deploy-wave: "2" | ||
spec: | ||
channel: "stable-4.11" |
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 there a non-versioned "stable" channel? Other operators are not pinned to a specific channel
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.
Currently only stable-4.11 and stable-4.10 are available for 4.11 and stable-4.11 for OCP 4.12:
oc-mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v4.11 --package=odf-lvm-operator
NAME DISPLAY NAME DEFAULT CHANNEL
odf-lvm-operator ODF LVM Operator stable-4.11
PACKAGE CHANNEL HEAD
odf-lvm-operator stable-4.10 odf-lvm-operator.v4.10.8
odf-lvm-operator stable-4.11 odf-lvm-operator.v4.11.3
# oc-mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v4.12 --package=odf-lvm-operator
NAME DISPLAY NAME DEFAULT CHANNEL
odf-lvm-operator ODF LVM Operator stable-4.11
PACKAGE CHANNEL HEAD
odf-lvm-operator stable-4.11 odf-lvm-operator.v4.11.3
- name: vg1 | ||
thinPoolConfig: | ||
name: thin-pool-1 | ||
sizePercent: 90 | ||
overprovisionRatio: 10 |
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.
Array entries are hard to remove, so this entry forces users into using the name "vg1". One option would be to use:
spec: {}
That would force users to provide all the content (from storage: down) in their PolicyGenTemplate which seems appropriate for something as variable as storage configuration.
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.
Ok. Included a default configuration as a comment in the lvmcluster source-cr.
So, a default PGT looks like this:
apiVersion: ran.openshift.io/v1
kind: PolicyGenTemplate
metadata:
name: "eric1"
namespace: "ztp-eric1-policies"
spec:
bindingRules:
name: "eric1"
mcp: "master"
remediationAction: inform
sourceFiles:
- fileName: StorageLVMOSubscriptionNS.yaml
policyName: "lvmo-policy"
- fileName: StorageLVMOSubscriptionOperGroup.yaml
policyName: "lvmo-policy"
- fileName: StorageLVMOSubscription.yaml
policyName: "lvmo-policy"
- fileName: StorageLVMCluster.yaml
policyName: "lvmo-config"
spec:
storage:
deviceClasses:
- name: vg1
thinPoolConfig:
name: thin-pool-1
sizePercent: 90
overprovisionRatio: 10
Notice that this config will create a VG with all the available devices except the disk where OCP is installed. On top of that, thin-pool LVs will be created
Yeah, my bad, forgot to add the ztp: label to the commit I just included it in the title. |
@alosadagrande: 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. |
labels: | ||
openshift.io/cluster-monitoring: "true" | ||
annotations: | ||
workload.openshift.io/allowed: management |
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 need to remove this annotation. The LVMO isn't part of the management partition.
Signed-off-by: Alberto Losada <alosadag@redhat.com>
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alosadagrande, imiller0 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 |
/cherrypick release-4.12 |
@imiller0: new pull request created: #1336 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. |
/bugzilla refresh |
@alosadagrande: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-4329 has been moved to the MODIFIED state. 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. |
Adds all the required manifests to install and configure the LVM Operator. Basically the subscription, operatorgroup and namespace (install) and the lvmcluster (configuration).
Signed-off-by: Alberto Losada alosadag@redhat.com
cc/ @imiller0