-
Notifications
You must be signed in to change notification settings - Fork 1.8k
BZ1886810: Updated operator-sdk appendices to have updated types #36938
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
BZ1886810: Updated operator-sdk appendices to have updated types #36938
Conversation
✔️ Deploy Preview for osdocs ready! 🔨 Explore the source changes: 14f9258 🔍 Inspect the deploy log: https://app.netlify.com/sites/osdocs/deploys/616448700fbe350007648105 😎 Browse the preview: https://deploy-preview-36938--osdocs.netlify.app |
f343d2c
to
6418d7a
Compare
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.
Thanks for this bug fix. I've made a few copyedits for you to consider.
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.
|Contains the helm chart used while creating the project. | |
|Contains the Helm chart used while creating the project. |
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.
The directories for the helm operator are also out of date.
Using this command operator-sdk init --domain example.com --plugins helm
the directory structure looks like this:
tree -d
.
├── config
│ ├── default
│ ├── manager
│ ├── manifests
│ ├── prometheus
│ ├── rbac
│ └── scorecard
│ ├── bases
│ └── patches
└── helm-charts
And with an API added, using operator-sdk create api --group demo --version v1alpha1 --kind Nginx
the structure looks like this:
$ tree -d
.
├── config
│ ├── crd
│ │ └── bases
│ ├── default
│ ├── manager
│ ├── manifests
│ ├── prometheus
│ ├── rbac
│ ├── samples
│ └── scorecard
│ ├── bases
│ └── patches
└── helm-charts
└── nginx
└── templates
└── tests
16 directories
You can see the quickstart if you want to play with it some. https://sdk.operatorframework.io/docs/building-operators/helm/quickstart/
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.
s/by/in
What do you think?
Unless 'scenario' in this context is jargon, and can be used as the subject of 'use'.
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 this piece is commented deliberately, so that SME can take a look and suggest whether the description needs to be at a subfolder level
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.
And scenario is a jargon here, will re-verify with SME on this and make necessary changes.
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.
// |Contains files that run a full end-to-end test of your operator. It does not require an existing cluster or external registry, and can run in CI environments that allow users to run privileged containers, for example, Travis. | |
// |Contains files that run a full end-to-end test of your Operator. It does not require an existing cluster or external registry, and can run in CI environments that allow users to run privileged containers, such as Travis. |
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.
It does not require ...
- The antecedent of
It
is not clear. Perhaps you meanThe test
?
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.
Noted the comment. Will implement once I get a feedback from SME.
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.
// |Contains files that is used to run an end-to-end test of your operator against an existing cluster. The operator image needs to be available to the cluster. | |
// |Contains files that are used to run an end-to-end test of your Operator against an existing cluster. The Operator image needs to be available to the cluster. |
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.
The Operator image needs to be available to the cluster.
- You discuss two Operators, and it's not immediately clear which Operator this sentence refers to.
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.
|Contains the files that are used for testing the ansible roles. | |
|Contains the files that are used for testing the Ansible roles. |
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 additional comments other than what @ctauchen already pointed out. But just wanted to quickly confirm that this change is indeed only needed in 4.6, and not in anything 4.7 or newer
I also concur with @ctauchen's feedback. I checked and it does make sense that this is for 4.6 only, as the module was removed beginning in 4.7. |
/lgtm |
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.
Ansible-based Operator projects generated using the `operator-sdk new --type ansible` command contain the following directories and files: | |
Ansible-based Operator projects generated using the `operator-sdk init --plugins ansible` command contain the following directories and files: |
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.
The new subcommand was removed.
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.
The list of directories in this PR is old. There are a set of new ones now.
Here are the default list of directories (only need to worry about the top part). I used the following command to create it operator-sdk init --domain example.com --plugins ansible
.
├── config
│ ├── default
│ ├── manager
│ ├── manifests
│ ├── prometheus
│ ├── rbac
│ ├── scorecard
│ │ ├── bases
│ │ └── patches
│ └── testing
│ └── pull_policy
├── molecule
│ ├── default
│ └── kind
├── playbooks
└── roles
16 directories
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.
With an API, operator-sdk create api --group cache --version v1alpha1 --kind Memcached --generate-role
present the structure looks like this:
$ tree -d
.
├── config
│ ├── crd
│ │ └── bases
│ ├── default
│ ├── manager
│ ├── manifests
│ ├── prometheus
│ ├── rbac
│ ├── samples
│ ├── scorecard
│ │ ├── bases
│ │ └── patches
│ └── testing
│ └── pull_policy
├── molecule
│ ├── default
│ │ └── tasks
│ └── kind
├── playbooks
└── roles
└── memcached
├── defaults
├── files
├── handlers
├── meta
├── tasks
├── templates
└── vars
28 directories
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 you need to experiment feel free to check out the quickstart upstream doc: https://sdk.operatorframework.io/docs/building-operators/ansible/quickstart/
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.
The directories for the helm operator are also out of date.
Using this command operator-sdk init --domain example.com --plugins helm
the directory structure looks like this:
tree -d
.
├── config
│ ├── default
│ ├── manager
│ ├── manifests
│ ├── prometheus
│ ├── rbac
│ └── scorecard
│ ├── bases
│ └── patches
└── helm-charts
And with an API added, using operator-sdk create api --group demo --version v1alpha1 --kind Nginx
the structure looks like this:
$ tree -d
.
├── config
│ ├── crd
│ │ └── bases
│ ├── default
│ ├── manager
│ ├── manifests
│ ├── prometheus
│ ├── rbac
│ ├── samples
│ └── scorecard
│ ├── bases
│ └── patches
└── helm-charts
└── nginx
└── templates
└── tests
16 directories
You can see the quickstart if you want to play with it some. https://sdk.operatorframework.io/docs/building-operators/helm/quickstart/
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
I did not realize this was for OpenShift 4.6. My comments from #36938 (review) are not valid against 4.6 they are for 4.8 and beyond.
6418d7a
to
997bb45
Compare
New changes are detected. LGTM label has been removed. |
BZ1889810: Added Ansible-based information Added Ansible-based information Added Ansible-based information Added Ansible-based information Implemented review comments Removed commented content
997bb45
to
14f9258
Compare
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1886810
Preview link: https://deploy-preview-36938--osdocs.netlify.app/openshift-enterprise/latest/operators/operator_sdk/osdk-appendices.html#osdk-project-scaffolding-layout-go_operator-appendices
@tbuskey / @emmajiafan - Kindly help with QE review.
@jmrodri - Kindly help with SME review.