Skip to content

Commit f6dd2eb

Browse files
committed
address comments, make verify
Signed-off-by: everettraven <[email protected]>
1 parent 7b50667 commit f6dd2eb

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

api/v1alpha1/clusterextension_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const (
4444
// ClusterExtensionSpec defines the desired state of ClusterExtension
4545
type ClusterExtensionSpec struct {
4646
// namespace is a reference to a Kubernetes namespace.
47-
// This is the namespace the provided ServiceAccount must exist.
47+
// This is the namespace in which the provided ServiceAccount must exist.
4848
// It also designates the default namespace where namespace-scoped resources
4949
// for the extension are applied to the cluster.
5050
// Some extensions may contain namespace-scoped resources to be applied in other namespaces.

config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ spec:
111111
namespace:
112112
description: |-
113113
namespace is a reference to a Kubernetes namespace.
114-
This is the namespace the provided ServiceAccount must exist.
114+
This is the namespace in which the provided ServiceAccount must exist.
115115
It also designates the default namespace where namespace-scoped resources
116116
for the extension are applied to the cluster.
117117
Some extensions may contain namespace-scoped resources to be applied in other namespaces.

docs/api-reference/operator-controller-api-reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ _Appears in:_
120120

121121
| Field | Description | Default | Validation |
122122
| --- | --- | --- | --- |
123-
| `namespace` _string_ | namespace designates the kubernetes Namespace where bundle content<br />for the package, referenced in the 'packageName' field, will be applied and the necessary<br />service account can be found.<br />The bundle may contain cluster-scoped resources or resources that are<br />applied to other Namespaces. This Namespace is expected to exist.<br /><br />namespace is required, immutable, and follows the DNS label standard<br />as defined in [RFC 1123]. It must contain only lowercase alphanumeric characters or hyphens (-),<br />start and end with an alphanumeric character, and be no longer than 63 characters<br /><br />[RFC 1123]: https://tools.ietf.org/html/rfc1123 | | MaxLength: 63 <br />Required: \{\} <br /> |
124-
| `serviceAccount` _[ServiceAccountReference](#serviceaccountreference)_ | serviceAccount is a required reference to a ServiceAccount that exists<br />in the installNamespace which is used to install and<br />manage the content for the package specified in the packageName field.<br /><br />In order to successfully install and manage the content for the package,<br />the ServiceAccount provided via this field should be configured with the<br />appropriate permissions to perform the necessary operations on all the<br />resources that are included in the bundle of content being applied. | | Required: \{\} <br /> |
125123
| `preflight` _[PreflightConfig](#preflightconfig)_ | preflight is an optional field that can be used to configure the checks that are<br />run before installation or upgrade of the content for the package specified in the packageName field.<br /><br />When specified, it replaces the default preflight configuration for install/upgrade actions.<br />When not specified, the default configuration will be used. | | |
126124

127125

@@ -174,8 +172,10 @@ _Appears in:_
174172

175173
| Field | Description | Default | Validation |
176174
| --- | --- | --- | --- |
175+
| `namespace` _string_ | namespace is a reference to a Kubernetes namespace.<br />This is the namespace in which the provided ServiceAccount must exist.<br />It also designates the default namespace where namespace-scoped resources<br />for the extension are applied to the cluster.<br />Some extensions may contain namespace-scoped resources to be applied in other namespaces.<br />This namespace must exist.<br /><br />namespace is required, immutable, and follows the DNS label standard<br />as defined in [RFC 1123]. It must contain only lowercase alphanumeric characters or hyphens (-),<br />start and end with an alphanumeric character, and be no longer than 63 characters<br /><br />[RFC 1123]: https://tools.ietf.org/html/rfc1123 | | MaxLength: 63 <br />Required: \{\} <br /> |
176+
| `serviceAccount` _[ServiceAccountReference](#serviceaccountreference)_ | serviceAccount is a reference to a ServiceAccount used to perform all interactions<br />with the cluster that are required to manage the extension.<br />The ServiceAccount must be configured with the necessary permissions to perform these interactions.<br />The ServiceAccount must exist in the namespace referenced in the spec.<br />serviceAccount is required. | | Required: \{\} <br /> |
177177
| `source` _[SourceConfig](#sourceconfig)_ | source is a required field which selects the installation source of content<br />for this ClusterExtension. Selection is performed by setting the sourceType.<br /><br />Catalog is currently the only implemented sourceType, and setting the<br />sourcetype to "Catalog" requires the catalog field to also be defined.<br /><br />Below is a minimal example of a source definition (in yaml):<br /><br />source:<br /> sourceType: Catalog<br /> catalog:<br /> packageName: example-package | | Required: \{\} <br /> |
178-
| `install` _[ClusterExtensionInstallConfig](#clusterextensioninstallconfig)_ | install is a required field used to configure the installation options<br />for the ClusterExtension such as the installation namespace,<br />the service account and the pre-flight check configuration.<br /><br />Below is a minimal example of an installation definition (in yaml):<br />install:<br /> namespace: example-namespace<br /> serviceAccount:<br /> name: example-sa | | Required: \{\} <br /> |
178+
| `install` _[ClusterExtensionInstallConfig](#clusterextensioninstallconfig)_ | install is an optional field used to configure the installation options<br />for the ClusterExtension such as the pre-flight check configuration. | | |
179179

180180

181181
#### ClusterExtensionStatus
@@ -220,7 +220,7 @@ ServiceAccountReference identifies the serviceAccount used fo install a ClusterE
220220

221221

222222
_Appears in:_
223-
- [ClusterExtensionInstallConfig](#clusterextensioninstallconfig)
223+
- [ClusterExtensionSpec](#clusterextensionspec)
224224

225225
| Field | Description | Default | Validation |
226226
| --- | --- | --- | --- |

internal/controllers/clusterextension_admission_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -397,25 +397,25 @@ func TestClusterExtensionAdmissionInstall(t *testing.T) {
397397
errMsg string
398398
}{
399399
{
400-
"install specified, nothing configured",
401-
&ocv1alpha1.ClusterExtensionInstallConfig{},
402-
oneOfErrMsg,
400+
name: "install specified, nothing configured",
401+
installConfig: &ocv1alpha1.ClusterExtensionInstallConfig{},
402+
errMsg: oneOfErrMsg,
403403
},
404404
{
405-
"install specified, preflight configured",
406-
&ocv1alpha1.ClusterExtensionInstallConfig{
405+
name: "install specified, preflight configured",
406+
installConfig: &ocv1alpha1.ClusterExtensionInstallConfig{
407407
Preflight: &ocv1alpha1.PreflightConfig{
408408
CRDUpgradeSafety: &ocv1alpha1.CRDUpgradeSafetyPreflightConfig{
409409
Enforcement: ocv1alpha1.CRDUpgradeSafetyEnforcementNone,
410410
},
411411
},
412412
},
413-
"",
413+
errMsg: "",
414414
},
415415
{
416-
"install not specified",
417-
nil,
418-
"",
416+
name: "install not specified",
417+
installConfig: nil,
418+
errMsg: "",
419419
},
420420
}
421421

0 commit comments

Comments
 (0)