Skip to content

Commit 4543071

Browse files
author
Eric Stroczynski
authored
internal/cmd/operator-sdk/bundle/validate: remove incorrect wording, (#4948)
grammatical fixup Signed-off-by: Eric Stroczynski <[email protected]>
1 parent cc0422d commit 4543071

File tree

4 files changed

+33
-37
lines changed

4 files changed

+33
-37
lines changed

changelog/fragments/community-validator.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# release notes and/or the migration guide
33
entries:
44
- description: >
5-
Added new bundle validator to check the bundle against the Community Operator criteria in the alpha stage. For futher information run `operator-sdk bundle validate --list-optional` and `operator-sdk bundle validate --help`.
5+
Added new bundle validator to check the bundle against the Community Operator criteria.
6+
For futher information run `operator-sdk bundle validate --list-optional` and `operator-sdk bundle validate --help`.
7+
This validator is in alpha and subject to breaking changes.
68
79
# kind is one of:
810
# - addition

internal/cmd/operator-sdk/bundle/validate/cmd.go

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ const (
3232
image or an operator bundle directory on-disk containing operator metadata and manifests. This command will exit
3333
with an exit code of 1 if any validation errors arise, and 0 if only warnings arise or all validators pass.
3434
35-
A valid bundle is defined by the bundle spec (linked below), therefore the default validator ensures a bundle conforms to
35+
A valid bundle is defined by the bundle spec (linked below), therefore the default validator ensures a bundle conforms to
3636
that spec. If you want to ensure that your bundle is valid for an optional superset of requirements such as to those
3737
required to publish your operator on operatorhub.io, then you will need to run one or more supported optional validators.
3838
Set '--list-optional' to list which optional validators are supported, and how they are grouped by label.
39-
39+
4040
More information about operator bundles and metadata:
4141
https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md
4242
@@ -65,33 +65,30 @@ To build and validate a *pullable* bundle image:
6565
To list and run optional validators, which are specified by a label selector:
6666
6767
$ operator-sdk bundle validate --list-optional
68-
NAME LABELS DESCRIPTION
69-
operatorhub name=operatorhub OperatorHub.io metadata validation.
70-
suite=operatorframework
71-
community name=community (stage: alpha) Community Operator bundle validation.
68+
NAME LABELS DESCRIPTION
69+
operatorhub name=operatorhub OperatorHub.io metadata validation.
70+
suite=operatorframework
7271
7372
To validate a bundle against the entire suite of validators for Operator Framework, in addition to required bundle validators:
74-
73+
7574
$ operator-sdk bundle validate ./bundle --select-optional suite=operatorframework
7675
77-
**NOTE:** The OperatorHub.io validator in the operatorframework optional suite allows you to validate that your manifests can work with a Kubernetes cluster of a particular version using the k8s-version optional key value:
76+
The OperatorHub.io validator in the operatorframework optional suite allows you to validate that your manifests can work with a Kubernetes cluster of a particular version using the k8s-version optional key value:
7877
7978
$ operator-sdk bundle validate ./bundle --select-optional suite=operatorframework --optional-values=k8s-version=1.22
80-
79+
8180
To validate a bundle against the validator for operatorhub.io specifically, in addition to required bundle validators:
82-
81+
8382
$ operator-sdk bundle validate ./bundle --select-optional name=operatorhub
84-
85-
**NOTE:** This validator allows check the bundle against an specific Kubernetes cluster version using the k8s-version optional key value:
86-
83+
84+
This validator allows check the bundle against an specific Kubernetes cluster version using the k8s-version optional key value:
85+
8786
$ operator-sdk bundle validate ./bundle --select-optional name=operatorhub --optional-values=k8s-version=1.22
8887
89-
(stage: alpha) To validate a bundle against the validator for Community Operators specifically, in addition to required bundle validators. This validator allows check the bundle image. In this way, inform the path-index optional key value:
90-
88+
To validate a bundle against the (alpha) validator for Community Operators specifically, in addition to required bundle validators:
89+
9190
$ operator-sdk bundle validate ./bundle --select-optional name=community --optional-values=index-path=bundle.Dockerfile
92-
93-
**NOTE:** Community Operators are the operators which will be distributed on the OKD/OCP catalogs. More info: https://github.com/operator-framework/community-operators/
94-
`
91+
`
9592
)
9693

9794
// NewCmd returns a command that will validate an operator bundle.

internal/cmd/operator-sdk/bundle/validate/optional.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var optionalValidators = validators{
5050
labels: map[string]string{
5151
nameKey: "community",
5252
},
53-
desc: "(stage: alpha) Community Operator bundle validation.",
53+
desc: "(stage: alpha) Community Operator bundle validation. See https://github.com/operator-framework/community-operators/blob/master/docs/packaging-required-fields.md",
5454
},
5555
}
5656

website/content/en/docs/cli/operator-sdk_bundle_validate.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ The 'operator-sdk bundle validate' command can validate both content and format
1111
image or an operator bundle directory on-disk containing operator metadata and manifests. This command will exit
1212
with an exit code of 1 if any validation errors arise, and 0 if only warnings arise or all validators pass.
1313

14-
A valid bundle is defined by the bundle spec (linked below), therefore the default validator ensures a bundle conforms to
14+
A valid bundle is defined by the bundle spec (linked below), therefore the default validator ensures a bundle conforms to
1515
that spec. If you want to ensure that your bundle is valid for an optional superset of requirements such as to those
1616
required to publish your operator on operatorhub.io, then you will need to run one or more supported optional validators.
1717
Set '--list-optional' to list which optional validators are supported, and how they are grouped by label.
18-
18+
1919
More information about operator bundles and metadata:
2020
https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md
2121

@@ -51,33 +51,30 @@ To build and validate a *pullable* bundle image:
5151
To list and run optional validators, which are specified by a label selector:
5252
5353
$ operator-sdk bundle validate --list-optional
54-
NAME LABELS DESCRIPTION
55-
operatorhub name=operatorhub OperatorHub.io metadata validation.
56-
suite=operatorframework
57-
community name=community (stage: alpha) Community Operator bundle validation.
54+
NAME LABELS DESCRIPTION
55+
operatorhub name=operatorhub OperatorHub.io metadata validation.
56+
suite=operatorframework
5857
5958
To validate a bundle against the entire suite of validators for Operator Framework, in addition to required bundle validators:
60-
59+
6160
$ operator-sdk bundle validate ./bundle --select-optional suite=operatorframework
6261
63-
**NOTE:** The OperatorHub.io validator in the operatorframework optional suite allows you to validate that your manifests can work with a Kubernetes cluster of a particular version using the k8s-version optional key value:
62+
The OperatorHub.io validator in the operatorframework optional suite allows you to validate that your manifests can work with a Kubernetes cluster of a particular version using the k8s-version optional key value:
6463
6564
$ operator-sdk bundle validate ./bundle --select-optional suite=operatorframework --optional-values=k8s-version=1.22
66-
65+
6766
To validate a bundle against the validator for operatorhub.io specifically, in addition to required bundle validators:
68-
67+
6968
$ operator-sdk bundle validate ./bundle --select-optional name=operatorhub
70-
71-
**NOTE:** This validator allows check the bundle against an specific Kubernetes cluster version using the k8s-version optional key value:
72-
69+
70+
This validator allows check the bundle against an specific Kubernetes cluster version using the k8s-version optional key value:
71+
7372
$ operator-sdk bundle validate ./bundle --select-optional name=operatorhub --optional-values=k8s-version=1.22
7473
75-
(stage: alpha) To validate a bundle against the validator for Community Operators specifically, in addition to required bundle validators. This validator allows check the bundle image. In this way, inform the path-index optional key value:
76-
74+
To validate a bundle against the (alpha) validator for Community Operators specifically, in addition to required bundle validators:
75+
7776
$ operator-sdk bundle validate ./bundle --select-optional name=community --optional-values=index-path=bundle.Dockerfile
7877
79-
**NOTE:** Community Operators are the operators which will be distributed on the OKD/OCP catalogs. More info: https://github.com/operator-framework/community-operators/
80-
8178
```
8279

8380
### Options

0 commit comments

Comments
 (0)