Skip to content
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

Merged
merged 1 commit into from Nov 30, 2022

Conversation

alosadagrande
Copy link
Contributor

@alosadagrande alosadagrande commented Nov 29, 2022

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

@alosadagrande alosadagrande changed the title Adds LVM operator source crs for ZTP ztp: Adds LVM operator source crs for ZTP Nov 29, 2022
@alosadagrande
Copy link
Contributor Author

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"

@imiller0
Copy link
Contributor

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"
Copy link
Contributor

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

Copy link
Contributor Author

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

Comment on lines 11 to 15
- name: vg1
thinPoolConfig:
name: thin-pool-1
sizePercent: 90
overprovisionRatio: 10
Copy link
Contributor

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.

Copy link
Contributor Author

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

@alosadagrande
Copy link
Contributor Author

alosadagrande commented Nov 30, 2022

Yeah, my bad, forgot to add the ztp: label to the commit I just included it in the title.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 30, 2022

@alosadagrande: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-ran-profile b667a8f link false /test e2e-gcp-ran-profile

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
Copy link
Contributor

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>
Copy link
Contributor

@imiller0 imiller0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 30, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 30, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 30, 2022
@openshift-merge-robot openshift-merge-robot merged commit b861eac into openshift-kni:master Nov 30, 2022
@imiller0
Copy link
Contributor

/cherrypick release-4.12

@openshift-cherrypick-robot

@imiller0: new pull request created: #1336

In response to this:

/cherrypick release-4.12

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.

@imiller0 imiller0 changed the title ztp: Adds LVM operator source crs for ZTP [OCPBUGS-4329] ztp: Adds LVM operator source crs for ZTP Nov 30, 2022
@imiller0
Copy link
Contributor

/bugzilla refresh

@imiller0 imiller0 changed the title [OCPBUGS-4329] ztp: Adds LVM operator source crs for ZTP ztp: OCPBUGS-4329: Adds LVM operator source crs for ZTP Nov 30, 2022
@openshift-ci-robot
Copy link
Collaborator

@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:

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants