-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathclusterextensionspec.go
More file actions
128 lines (116 loc) · 6.74 KB
/
clusterextensionspec.go
File metadata and controls
128 lines (116 loc) · 6.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
Copyright 2022.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by controller-gen-v0.20. DO NOT EDIT.
package v1
// ClusterExtensionSpecApplyConfiguration represents a declarative configuration of the ClusterExtensionSpec type for use
// with apply.
//
// ClusterExtensionSpec defines the desired state of ClusterExtension
type ClusterExtensionSpecApplyConfiguration struct {
// namespace specifies a Kubernetes namespace.
// This is the namespace where the provided ServiceAccount must exist.
// It also designates the default namespace where namespace-scoped resources for the extension are applied to the cluster.
// Some extensions may contain namespace-scoped resources to be applied in other namespaces.
// This namespace must exist.
//
// The namespace field is required, immutable, and follows the DNS label standard as defined in [RFC 1123].
// It must contain only lowercase alphanumeric characters or hyphens (-), start and end with an alphanumeric character,
// and be no longer than 63 characters.
//
// [RFC 1123]: https://tools.ietf.org/html/rfc1123
Namespace *string `json:"namespace,omitempty"`
// serviceAccount was previously used to specify a ServiceAccount for managing the extension.
// This field is now deprecated and ignored. operator-controller uses its own ServiceAccount
// for all Kubernetes API interactions.
//
// Deprecated: This field is ignored. It will be removed in a future API version.
ServiceAccount *ServiceAccountReferenceApplyConfiguration `json:"serviceAccount,omitempty"`
// source is required and selects the installation source of content for this ClusterExtension.
// Set the sourceType field to perform the selection.
//
// Catalog is currently the only implemented sourceType.
// Setting sourceType to "Catalog" requires the catalog field to also be defined.
//
// Below is a minimal example of a source definition (in yaml):
//
// source:
// sourceType: Catalog
// catalog:
// packageName: example-package
Source *SourceConfigApplyConfiguration `json:"source,omitempty"`
// install is optional and configures installation options for the ClusterExtension,
// such as the pre-flight check configuration.
Install *ClusterExtensionInstallConfigApplyConfiguration `json:"install,omitempty"`
// config is optional and specifies bundle-specific configuration.
// Configuration is bundle-specific and a bundle may provide a configuration schema.
// When not specified, the default configuration of the resolved bundle is used.
//
// config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide
// a configuration schema the bundle is deemed to not be configurable. More information on how
// to configure bundles can be found in the OLM documentation associated with your current OLM version.
Config *ClusterExtensionConfigApplyConfiguration `json:"config,omitempty"`
// progressDeadlineMinutes is an optional field that defines the maximum period
// of time in minutes after which an installation should be considered failed and
// require manual intervention. This functionality is disabled when no value
// is provided. The minimum period is 10 minutes, and the maximum is 720 minutes (12 hours).
//
// <opcon:experimental>
ProgressDeadlineMinutes *int32 `json:"progressDeadlineMinutes,omitempty"`
}
// ClusterExtensionSpecApplyConfiguration constructs a declarative configuration of the ClusterExtensionSpec type for use with
// apply.
func ClusterExtensionSpec() *ClusterExtensionSpecApplyConfiguration {
return &ClusterExtensionSpecApplyConfiguration{}
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ClusterExtensionSpecApplyConfiguration) WithNamespace(value string) *ClusterExtensionSpecApplyConfiguration {
b.Namespace = &value
return b
}
// WithServiceAccount sets the ServiceAccount field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ServiceAccount field is set to the value of the last call.
func (b *ClusterExtensionSpecApplyConfiguration) WithServiceAccount(value *ServiceAccountReferenceApplyConfiguration) *ClusterExtensionSpecApplyConfiguration {
b.ServiceAccount = value
return b
}
// WithSource sets the Source field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Source field is set to the value of the last call.
func (b *ClusterExtensionSpecApplyConfiguration) WithSource(value *SourceConfigApplyConfiguration) *ClusterExtensionSpecApplyConfiguration {
b.Source = value
return b
}
// WithInstall sets the Install field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Install field is set to the value of the last call.
func (b *ClusterExtensionSpecApplyConfiguration) WithInstall(value *ClusterExtensionInstallConfigApplyConfiguration) *ClusterExtensionSpecApplyConfiguration {
b.Install = value
return b
}
// WithConfig sets the Config field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Config field is set to the value of the last call.
func (b *ClusterExtensionSpecApplyConfiguration) WithConfig(value *ClusterExtensionConfigApplyConfiguration) *ClusterExtensionSpecApplyConfiguration {
b.Config = value
return b
}
// WithProgressDeadlineMinutes sets the ProgressDeadlineMinutes field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ProgressDeadlineMinutes field is set to the value of the last call.
func (b *ClusterExtensionSpecApplyConfiguration) WithProgressDeadlineMinutes(value int32) *ClusterExtensionSpecApplyConfiguration {
b.ProgressDeadlineMinutes = &value
return b
}