diff --git a/go.mod b/go.mod index f573a43078..83ddc2c48a 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/opencontainers/selinux v1.11.0 github.com/openshift/api v0.0.0-20240527133614-ba11c1587003 github.com/openshift/build-machinery-go v0.0.0-20240419090851-af9c868bcf52 - github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 + github.com/openshift/client-go v0.0.0-20240821135114-75c118605d5f github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.3.0 github.com/prometheus/client_golang v1.16.0 diff --git a/go.sum b/go.sum index 59cff9388f..e55d66ce66 100644 --- a/go.sum +++ b/go.sum @@ -198,6 +198,8 @@ github.com/openshift/build-machinery-go v0.0.0-20240419090851-af9c868bcf52 h1:bq github.com/openshift/build-machinery-go v0.0.0-20240419090851-af9c868bcf52/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 h1:JtLhaGpSEconE+1IKmIgCOof/Len5ceG6H1pk43yv5U= github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87/go.mod h1:3IPD4U0qyovZS4EFady2kqY32m8lGcbs/Wx+yprg9z8= +github.com/openshift/client-go v0.0.0-20240821135114-75c118605d5f h1:iYIcy36QilP/1KeiVYeqXP9oLsP2gCytGIG5+doS7x8= +github.com/openshift/client-go v0.0.0-20240821135114-75c118605d5f/go.mod h1:3IPD4U0qyovZS4EFady2kqY32m8lGcbs/Wx+yprg9z8= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/pkg/machineconfig/OWNERS b/pkg/machineconfig/OWNERS new file mode 100644 index 0000000000..a9f3a0dad3 --- /dev/null +++ b/pkg/machineconfig/OWNERS @@ -0,0 +1,3 @@ +reviewers: + +approvers: diff --git a/pkg/machineconfig/in_use_machineconfigs.go b/pkg/machineconfig/in_use_machineconfigs.go new file mode 100644 index 0000000000..6606cf49db --- /dev/null +++ b/pkg/machineconfig/in_use_machineconfigs.go @@ -0,0 +1,58 @@ +package machineconfig + +import ( + "context" + "fmt" + + mcfgclientset "github.com/openshift/client-go/machineconfiguration/clientset/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +// GetInUseMachineConfigs filters in-use MachineConfig resources and returns set of their names. +func GetInUseMachineConfigs(ctx context.Context, clientConfig *rest.Config, poolFilter string) (sets.Set[string], error) { + // Create a set to store in-use configs + inuseConfigs := sets.New[string]() + + machineConfigClient, err := mcfgclientset.NewForConfig(clientConfig) + if err != nil { + return nil, err + } + + poolList, err := machineConfigClient.MachineconfigurationV1().MachineConfigPools().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, fmt.Errorf("getting MachineConfigPools failed: %w", err) + } + + for _, pool := range poolList.Items { + // Check if the pool matches the specified pool name (if provided) + if poolFilter == "" || poolFilter == pool.Name { + // Get the rendered config name from the status section + inuseConfigs.Insert(pool.Status.Configuration.Name) + inuseConfigs.Insert(pool.Spec.Configuration.Name) + } + } + + kubeClient, err := kubernetes.NewForConfig(clientConfig) + if err != nil { + return nil, err + } + nodeList, err := kubeClient.CoreV1().Nodes().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + for _, node := range nodeList.Items { + current, ok := node.Annotations["machineconfiguration.openshift.io/currentConfig"] + if ok { + inuseConfigs.Insert(current) + } + desired, ok := node.Annotations["machineconfiguration.openshift.io/desiredConfig"] + if ok { + inuseConfigs.Insert(desired) + } + } + + return inuseConfigs, nil +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/Makefile b/vendor/github.com/openshift/api/machineconfiguration/v1/Makefile new file mode 100644 index 0000000000..7cd8eee901 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/Makefile @@ -0,0 +1,3 @@ +.PHONY: test +test: + make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="machineconfiguration.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/doc.go b/vendor/github.com/openshift/api/machineconfiguration/v1/doc.go new file mode 100644 index 0000000000..c3b273145d --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/doc.go @@ -0,0 +1,6 @@ +// +k8s:deepcopy-gen=package,register +// +groupName=machineconfiguration.openshift.io + +// +kubebuilder:validation:Optional +// Package v1 is the v1 version of the API. +package v1 diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/register.go b/vendor/github.com/openshift/api/machineconfiguration/v1/register.go new file mode 100644 index 0000000000..bbafc28dea --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/register.go @@ -0,0 +1,52 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + // GroupName is the group name of this api + GroupName = "machineconfiguration.openshift.io" + // GroupVersion is the version of this api group + GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // Install is a function which adds this version to a scheme + Install = schemeBuilder.AddToScheme + + // SchemeGroupVersion is DEPRECATED + SchemeGroupVersion = GroupVersion + // AddToScheme is DEPRECATED + AddToScheme = Install +) + +// addKnownTypes adds types to API group +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(GroupVersion, + &ContainerRuntimeConfig{}, + &ContainerRuntimeConfigList{}, + &ControllerConfig{}, + &ControllerConfigList{}, + &KubeletConfig{}, + &KubeletConfigList{}, + &MachineConfig{}, + &MachineConfigList{}, + &MachineConfigPool{}, + &MachineConfigPoolList{}, + ) + + metav1.AddToGroupVersion(scheme, GroupVersion) + + return nil +} + +// Resource is used to validate existence of a resource in this API group +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + +// Kind is used to validate existence of a resource kind in this API group +func Kind(kind string) schema.GroupKind { + return schema.GroupKind{Group: GroupName, Kind: kind} +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go new file mode 100644 index 0000000000..574c90035a --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go @@ -0,0 +1,906 @@ +package v1 + +import ( + configv1 "github.com/openshift/api/config/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// MachineConfigRoleLabelKey is metadata key in the MachineConfig. Specifies the node role that config should be applied to. +// For example: `master` or `worker` +const MachineConfigRoleLabelKey = "machineconfiguration.openshift.io/role" + +// KubeletConfigRoleLabelPrefix is the label that must be present in the KubeletConfig CR +const KubeletConfigRoleLabelPrefix = "pools.operator.machineconfiguration.openshift.io/" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=controllerconfigs,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1453 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +kubebuilder:metadata:labels=openshift.io/operator-managed= + +// ControllerConfig describes configuration for MachineConfigController. +// This is currently only used to drive the MachineConfig objects generated by the TemplateController. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type ControllerConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // TODO(jkyros): inconsistent historical generation resulted in the controllerconfig CRD being + // generated with all fields required, while everything else was generated with optional + + // +kubebuilder:validation:Required + Spec ControllerConfigSpec `json:"spec"` + // +optional + Status ControllerConfigStatus `json:"status"` +} + +// ControllerConfigSpec is the spec for ControllerConfig resource. +type ControllerConfigSpec struct { + // clusterDNSIP is the cluster DNS IP address + // +kubebuilder:validation:Required + ClusterDNSIP string `json:"clusterDNSIP"` + + // cloudProviderConfig is the configuration for the given cloud provider + // +kubebuilder:validation:Required + CloudProviderConfig string `json:"cloudProviderConfig"` + + // platform is deprecated, use Infra.Status.PlatformStatus.Type instead + // +optional + Platform string `json:"platform,omitempty"` + + // etcdDiscoveryDomain is deprecated, use Infra.Status.EtcdDiscoveryDomain instead + // +optional + EtcdDiscoveryDomain string `json:"etcdDiscoveryDomain,omitempty"` + + // TODO: Use string for CA data + + // kubeAPIServerServingCAData managed Kubelet to API Server Cert... Rotated automatically + // +kubebuilder:validation:Required + KubeAPIServerServingCAData []byte `json:"kubeAPIServerServingCAData"` + + // rootCAData specifies the root CA data + // +kubebuilder:validation:Required + RootCAData []byte `json:"rootCAData"` + + // cloudProvider specifies the cloud provider CA data + // +kubebuilder:validation:Required + // +nullable + CloudProviderCAData []byte `json:"cloudProviderCAData"` + + // additionalTrustBundle is a certificate bundle that will be added to the nodes + // trusted certificate store. + // +kubebuilder:validation:Required + // +nullable + AdditionalTrustBundle []byte `json:"additionalTrustBundle"` + + // imageRegistryBundleUserData is Image Registry Data provided by the user + // +listType=atomic + // +optional + ImageRegistryBundleUserData []ImageRegistryBundle `json:"imageRegistryBundleUserData"` + + // imageRegistryBundleData is the ImageRegistryData + // +listType=atomic + // +optional + ImageRegistryBundleData []ImageRegistryBundle `json:"imageRegistryBundleData"` + + // TODO: Investigate using a ConfigMapNameReference for the PullSecret and OSImageURL + + // pullSecret is the default pull secret that needs to be installed + // on all machines. + // +optional + PullSecret *corev1.ObjectReference `json:"pullSecret,omitempty"` + + // internalRegistryPullSecret is the pull secret for the internal registry, used by + // rpm-ostree to pull images from the internal registry if present + // +optional + // +nullable + InternalRegistryPullSecret []byte `json:"internalRegistryPullSecret"` + + // images is map of images that are used by the controller to render templates under ./templates/ + // +kubebuilder:validation:Required + Images map[string]string `json:"images"` + + // BaseOSContainerImage is the new-format container image for operating system updates. + // +kubebuilder:validation:Required + BaseOSContainerImage string `json:"baseOSContainerImage"` + + // BaseOSExtensionsContainerImage is the matching extensions container for the new-format container + // +optional + BaseOSExtensionsContainerImage string `json:"baseOSExtensionsContainerImage"` + + // OSImageURL is the old-format container image that contains the OS update payload. + // +optional + OSImageURL string `json:"osImageURL"` + + // releaseImage is the image used when installing the cluster + // +kubebuilder:validation:Required + ReleaseImage string `json:"releaseImage"` + + // proxy holds the current proxy configuration for the nodes + // +kubebuilder:validation:Required + // +nullable + Proxy *configv1.ProxyStatus `json:"proxy"` + + // infra holds the infrastructure details + // +kubebuilder:validation:EmbeddedResource + // +kubebuilder:validation:Required + // +nullable + Infra *configv1.Infrastructure `json:"infra"` + + // dns holds the cluster dns details + // +kubebuilder:validation:EmbeddedResource + // +kubebuilder:validation:Required + // +nullable + DNS *configv1.DNS `json:"dns"` + + // ipFamilies indicates the IP families in use by the cluster network + // +kubebuilder:validation:Required + IPFamilies IPFamiliesType `json:"ipFamilies"` + + // networkType holds the type of network the cluster is using + // XXX: this is temporary and will be dropped as soon as possible in favor of a better support + // to start network related services the proper way. + // Nobody is also changing this once the cluster is up and running the first time, so, disallow + // regeneration if this changes. + // +optional + NetworkType string `json:"networkType,omitempty"` + + // Network contains additional network related information + // +kubebuilder:validation:Required + // +nullable + Network *NetworkInfo `json:"network"` +} + +// ImageRegistryBundle contains information for writing image registry certificates +type ImageRegistryBundle struct { + // file holds the name of the file where the bundle will be written to disk + // +kubebuilder:validation:Required + File string `json:"file"` + // data holds the contents of the bundle that will be written to the file location + // +kubebuilder:validation:Required + Data []byte `json:"data"` +} + +// IPFamiliesType indicates whether the cluster network is IPv4-only, IPv6-only, or dual-stack +type IPFamiliesType string + +const ( + IPFamiliesIPv4 IPFamiliesType = "IPv4" + IPFamiliesIPv6 IPFamiliesType = "IPv6" + IPFamiliesDualStack IPFamiliesType = "DualStack" + IPFamiliesDualStackIPv6Primary IPFamiliesType = "DualStackIPv6Primary" +) + +// Network contains network related configuration +type NetworkInfo struct { + // MTUMigration contains the MTU migration configuration. + // +kubebuilder:validation:Required + // +nullable + MTUMigration *configv1.MTUMigration `json:"mtuMigration"` +} + +// ControllerConfigStatus is the status for ControllerConfig +type ControllerConfigStatus struct { + // observedGeneration represents the generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // conditions represents the latest available observations of current state. + // +listType=atomic + // +optional + Conditions []ControllerConfigStatusCondition `json:"conditions"` + + // controllerCertificates represents the latest available observations of the automatically rotating certificates in the MCO. + // +listType=atomic + // +optional + ControllerCertificates []ControllerCertificate `json:"controllerCertificates"` +} + +// ControllerCertificate contains info about a specific cert. +type ControllerCertificate struct { + // subject is the cert subject + // +kubebuilder:validation:Required + Subject string `json:"subject"` + + // signer is the cert Issuer + // +kubebuilder:validation:Required + Signer string `json:"signer"` + + // notBefore is the lower boundary for validity + // +optional + NotBefore *metav1.Time `json:"notBefore"` + + // notAfter is the upper boundary for validity + // +optional + NotAfter *metav1.Time `json:"notAfter"` + + // bundleFile is the larger bundle a cert comes from + // +kubebuilder:validation:Required + BundleFile string `json:"bundleFile"` +} + +// ControllerConfigStatusCondition contains condition information for ControllerConfigStatus +type ControllerConfigStatusCondition struct { + // type specifies the state of the operator's reconciliation functionality. + // +kubebuilder:validation:Required + Type ControllerConfigStatusConditionType `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +kubebuilder:validation:Required + Status corev1.ConditionStatus `json:"status"` + + // lastTransitionTime is the time of the last update to the current status object. + // +kubebuilder:validation:Required + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason is the reason for the condition's last transition. Reasons are PascalCase + // +optional + Reason string `json:"reason,omitempty"` + + // message provides additional information about the current condition. + // This is only to be consumed by humans. + // +optional + Message string `json:"message,omitempty"` +} + +// ControllerConfigStatusConditionType valid conditions of a ControllerConfigStatus +type ControllerConfigStatusConditionType string + +const ( + // TemplateControllerRunning means the template controller is currently running. + TemplateControllerRunning ControllerConfigStatusConditionType = "TemplateControllerRunning" + + // TemplateControllerCompleted means the template controller has completed reconciliation. + TemplateControllerCompleted ControllerConfigStatusConditionType = "TemplateControllerCompleted" + + // TemplateControllerFailing means the template controller is failing. + TemplateControllerFailing ControllerConfigStatusConditionType = "TemplateControllerFailing" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ControllerConfigList is a list of ControllerConfig resources +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type ControllerConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []ControllerConfig `json:"items"` +} + +// +genclient +// +genclient:noStatus +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfig defines the configuration for a machine +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machineconfigs,scope=Cluster,shortName=mc +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1453 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +kubebuilder:metadata:labels="openshift.io/operator-managed=" +// +kubebuilder:printcolumn:name=GeneratedByController,JSONPath=.metadata.annotations.machineconfiguration\.openshift\.io/generated-by-controller-version,type=string,description=Version of the controller that generated the machineconfig. This will be empty if the machineconfig is not managed by a controller. +// +kubebuilder:printcolumn:name=IgnitionVersion,JSONPath=.spec.config.ignition.version,type=string,description=Version of the Ignition Config defined in the machineconfig. +// +kubebuilder:printcolumn:name=Age,JSONPath=.metadata.creationTimestamp,type=date +// +openshift:compatibility-gen:level=1 +type MachineConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +optional + Spec MachineConfigSpec `json:"spec"` +} + +// MachineConfigSpec is the spec for MachineConfig +type MachineConfigSpec struct { + // OSImageURL specifies the remote location that will be used to + // fetch the OS. + // +optional + OSImageURL string `json:"osImageURL"` + + // BaseOSExtensionsContainerImage specifies the remote location that will be used + // to fetch the extensions container matching a new-format OS image + // +optional + BaseOSExtensionsContainerImage string `json:"baseOSExtensionsContainerImage"` + + // Config is a Ignition Config object. + // +optional + Config runtime.RawExtension `json:"config"` + + // kernelArguments contains a list of kernel arguments to be added + // +listType=atomic + // +nullable + // +optional + KernelArguments []string `json:"kernelArguments"` + + // extensions contains a list of additional features that can be enabled on host + // +listType=atomic + // +optional + Extensions []string `json:"extensions"` + + // fips controls FIPS mode + // +optional + FIPS bool `json:"fips"` + + // kernelType contains which kernel we want to be running like default + // (traditional), realtime, 64k-pages (aarch64 only). + // +optional + KernelType string `json:"kernelType"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfigList is a list of MachineConfig resources +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type MachineConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []MachineConfig `json:"items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfigPool describes a pool of MachineConfigs. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machineconfigpools,scope=Cluster,shortName=mcp +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1453 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +kubebuilder:metadata:labels="openshift.io/operator-managed=" +// +kubebuilder:printcolumn:name=Config,JSONPath=.status.configuration.name,type=string +// +kubebuilder:printcolumn:name=Updated,JSONPath=.status.conditions[?(@.type=="Updated")].status,type=string,description=When all the machines in the pool are updated to the correct machine config. +// +kubebuilder:printcolumn:name=Updating,JSONPath=.status.conditions[?(@.type=="Updating")].status,type=string,description=When at least one of machine is not either not updated or is in the process of updating to the desired machine config. +// +kubebuilder:printcolumn:name=Degraded,JSONPath=.status.conditions[?(@.type=="Degraded")].status,type=string,description=When progress is blocked on updating one or more nodes or the pool configuration is failing. +// +kubebuilder:printcolumn:name=MachineCount,JSONPath=.status.machineCount,type=number,description=Total number of machines in the machine config pool +// +kubebuilder:printcolumn:name=ReadyMachineCount,JSONPath=.status.readyMachineCount,type=number,description=Total number of ready machines targeted by the pool +// +kubebuilder:printcolumn:name=UpdatedMachineCount,JSONPath=.status.updatedMachineCount,type=number,description=Total number of machines targeted by the pool that have the CurrentMachineConfig as their config +// +kubebuilder:printcolumn:name=DegradedMachineCount,JSONPath=.status.degradedMachineCount,type=number,description=Total number of machines marked degraded (or unreconcilable) +// +kubebuilder:printcolumn:name=Age,JSONPath=.metadata.creationTimestamp,type=date +// +openshift:compatibility-gen:level=1 +type MachineConfigPool struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // +kubebuilder:validation:Required + Spec MachineConfigPoolSpec `json:"spec"` + // +optional + Status MachineConfigPoolStatus `json:"status"` +} + +// MachineConfigPoolSpec is the spec for MachineConfigPool resource. +type MachineConfigPoolSpec struct { + // machineConfigSelector specifies a label selector for MachineConfigs. + // Refer https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ on how label and selectors work. + // +optional + MachineConfigSelector *metav1.LabelSelector `json:"machineConfigSelector,omitempty"` + + // nodeSelector specifies a label selector for Machines + // +optional + NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"` + + // paused specifies whether or not changes to this machine config pool should be stopped. + // This includes generating new desiredMachineConfig and update of machines. + // +optional + Paused bool `json:"paused"` + + // maxUnavailable defines either an integer number or percentage + // of nodes in the pool that can go Unavailable during an update. + // This includes nodes Unavailable for any reason, including user + // initiated cordons, failing nodes, etc. The default value is 1. + // + // A value larger than 1 will mean multiple nodes going unavailable during + // the update, which may affect your workload stress on the remaining nodes. + // You cannot set this value to 0 to stop updates (it will default back to 1); + // to stop updates, use the 'paused' property instead. Drain will respect + // Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if + // maxUnavailable is greater than one. + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + + // The targeted MachineConfig object for the machine config pool. + // +optional + Configuration MachineConfigPoolStatusConfiguration `json:"configuration"` + + // pinnedImageSets specifies a sequence of PinnedImageSetRef objects for the + // pool. Nodes within this pool will preload and pin images defined in the + // PinnedImageSet. Before pulling images the MachineConfigDaemon will ensure + // the total uncompressed size of all the images does not exceed available + // resources. If the total size of the images exceeds the available + // resources the controller will report a Degraded status to the + // MachineConfigPool and not attempt to pull any images. Also to help ensure + // the kubelet can mitigate storage risk, the pinned_image configuration and + // subsequent service reload will happen only after all of the images have + // been pulled for each set. Images from multiple PinnedImageSets are loaded + // and pinned sequentially as listed. Duplicate and existing images will be + // skipped. + // + // Any failure to prefetch or pin images will result in a Degraded pool. + // Resolving these failures is the responsibility of the user. The admin + // should be proactive in ensuring adequate storage and proper image + // authentication exists in advance. + // +openshift:enable:FeatureGate=PinnedImages + // +optional + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=100 + PinnedImageSets []PinnedImageSetRef `json:"pinnedImageSets,omitempty"` +} + +type PinnedImageSetRef struct { + // name is a reference to the name of a PinnedImageSet. Must adhere to + // RFC-1123 (https://tools.ietf.org/html/rfc1123). + // Made up of one of more period-separated (.) segments, where each segment + // consists of alphanumeric characters and hyphens (-), must begin and end + // with an alphanumeric character, and is at most 63 characters in length. + // The total length of the name must not exceed 253 characters. + // +openshift:enable:FeatureGate=PinnedImages + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Name string `json:"name"` +} + +// MachineConfigPoolStatus is the status for MachineConfigPool resource. +type MachineConfigPoolStatus struct { + // observedGeneration represents the generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // configuration represents the current MachineConfig object for the machine config pool. + // +optional + Configuration MachineConfigPoolStatusConfiguration `json:"configuration"` + + // machineCount represents the total number of machines in the machine config pool. + // +optional + MachineCount int32 `json:"machineCount"` + + // updatedMachineCount represents the total number of machines targeted by the pool that have the CurrentMachineConfig as their config. + // +optional + UpdatedMachineCount int32 `json:"updatedMachineCount"` + + // readyMachineCount represents the total number of ready machines targeted by the pool. + // +optional + ReadyMachineCount int32 `json:"readyMachineCount"` + + // unavailableMachineCount represents the total number of unavailable (non-ready) machines targeted by the pool. + // A node is marked unavailable if it is in updating state or NodeReady condition is false. + // +optional + UnavailableMachineCount int32 `json:"unavailableMachineCount"` + + // degradedMachineCount represents the total number of machines marked degraded (or unreconcilable). + // A node is marked degraded if applying a configuration failed.. + // +optional + DegradedMachineCount int32 `json:"degradedMachineCount"` + + // conditions represents the latest available observations of current state. + // +listType=atomic + // +optional + Conditions []MachineConfigPoolCondition `json:"conditions"` + + // certExpirys keeps track of important certificate expiration data + // +listType=atomic + // +optional + CertExpirys []CertExpiry `json:"certExpirys"` + + // poolSynchronizersStatus is the status of the machines managed by the pool synchronizers. + // +openshift:enable:FeatureGate=PinnedImages + // +listType=map + // +listMapKey=poolSynchronizerType + // +optional + PoolSynchronizersStatus []PoolSynchronizerStatus `json:"poolSynchronizersStatus,omitempty"` +} + +// +kubebuilder:validation:XValidation:rule="self.machineCount >= self.updatedMachineCount", message="machineCount must be greater than or equal to updatedMachineCount" +// +kubebuilder:validation:XValidation:rule="self.machineCount >= self.availableMachineCount", message="machineCount must be greater than or equal to availableMachineCount" +// +kubebuilder:validation:XValidation:rule="self.machineCount >= self.unavailableMachineCount", message="machineCount must be greater than or equal to unavailableMachineCount" +// +kubebuilder:validation:XValidation:rule="self.machineCount >= self.readyMachineCount", message="machineCount must be greater than or equal to readyMachineCount" +// +kubebuilder:validation:XValidation:rule="self.availableMachineCount >= self.readyMachineCount", message="availableMachineCount must be greater than or equal to readyMachineCount" +type PoolSynchronizerStatus struct { + // poolSynchronizerType describes the type of the pool synchronizer. + // +kubebuilder:validation:Required + PoolSynchronizerType PoolSynchronizerType `json:"poolSynchronizerType"` + // machineCount is the number of machines that are managed by the node synchronizer. + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum=0 + MachineCount int64 `json:"machineCount"` + // updatedMachineCount is the number of machines that have been updated by the node synchronizer. + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum=0 + UpdatedMachineCount int64 `json:"updatedMachineCount"` + // readyMachineCount is the number of machines managed by the node synchronizer that are in a ready state. + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum=0 + ReadyMachineCount int64 `json:"readyMachineCount"` + // availableMachineCount is the number of machines managed by the node synchronizer which are available. + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum=0 + AvailableMachineCount int64 `json:"availableMachineCount"` + // unavailableMachineCount is the number of machines managed by the node synchronizer but are unavailable. + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum=0 + UnavailableMachineCount int64 `json:"unavailableMachineCount"` + // +kubebuilder:validation:XValidation:rule="self >= oldSelf || (self == 0 && oldSelf > 0)", message="observedGeneration must not move backwards except to zero" + // observedGeneration is the last generation change that has been applied. + // +kubebuilder:validation:Minimum=0 + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} + +// PoolSynchronizerType is an enum that describe the type of pool synchronizer. A pool synchronizer is a one or more controllers that +// manages the on disk state of a set of machines within a pool. +// +kubebuilder:validation:Enum:="PinnedImageSets" +// +kubebuilder:validation:MaxLength=256 +type PoolSynchronizerType string + +const ( + // PinnedImageSets represents a pool synchronizer for pinned image sets. + PinnedImageSets PoolSynchronizerType = "PinnedImageSets" +) + +// ceryExpiry contains the bundle name and the expiry date +type CertExpiry struct { + // bundle is the name of the bundle in which the subject certificate resides + // +kubebuilder:validation:Required + Bundle string `json:"bundle"` + // subject is the subject of the certificate + // +kubebuilder:validation:Required + Subject string `json:"subject"` + // expiry is the date after which the certificate will no longer be valid + // +optional + Expiry *metav1.Time `json:"expiry"` +} + +// MachineConfigPoolStatusConfiguration stores the current configuration for the pool, and +// optionally also stores the list of MachineConfig objects used to generate the configuration. +type MachineConfigPoolStatusConfiguration struct { + corev1.ObjectReference `json:",inline"` + + // source is the list of MachineConfig objects that were used to generate the single MachineConfig object specified in `content`. + // +listType=atomic + // +optional + Source []corev1.ObjectReference `json:"source,omitempty"` +} + +// MachineConfigPoolCondition contains condition information for an MachineConfigPool. +type MachineConfigPoolCondition struct { + // type of the condition, currently ('Done', 'Updating', 'Failed'). + // +optional + Type MachineConfigPoolConditionType `json:"type"` + + // status of the condition, one of ('True', 'False', 'Unknown'). + // +optional + Status corev1.ConditionStatus `json:"status"` + + // lastTransitionTime is the timestamp corresponding to the last status + // change of this condition. + // +nullable + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason is a brief machine readable explanation for the condition's last + // transition. + // +optional + Reason string `json:"reason"` + + // message is a human readable description of the details of the last + // transition, complementing reason. + // +optional + Message string `json:"message"` +} + +// MachineConfigPoolConditionType valid conditions of a MachineConfigPool +type MachineConfigPoolConditionType string + +const ( + // MachineConfigPoolUpdated means MachineConfigPool is updated completely. + // When the all the machines in the pool are updated to the correct machine config. + MachineConfigPoolUpdated MachineConfigPoolConditionType = "Updated" + + // MachineConfigPoolUpdating means MachineConfigPool is updating. + // When at least one of machine is not either not updated or is in the process of updating + // to the desired machine config. + MachineConfigPoolUpdating MachineConfigPoolConditionType = "Updating" + + // MachineConfigPoolNodeDegraded means the update for one of the machine is not progressing + MachineConfigPoolNodeDegraded MachineConfigPoolConditionType = "NodeDegraded" + + // MachineConfigPoolRenderDegraded means the rendered configuration for the pool cannot be generated because of an error + MachineConfigPoolRenderDegraded MachineConfigPoolConditionType = "RenderDegraded" + + // MachineConfigPoolPinnedImageSetsDegraded means the pinned image sets for the pool cannot be populated because of an error + // +openshift:enable:FeatureGate=PinnedImages + MachineConfigPoolPinnedImageSetsDegraded MachineConfigPoolConditionType = "PinnedImageSetsDegraded" + + // MachineConfigPoolSynchronizerDegraded means the pool synchronizer can not be updated because of an error + // +openshift:enable:FeatureGate=PinnedImages + MachineConfigPoolSynchronizerDegraded MachineConfigPoolConditionType = "PoolSynchronizerDegraded" + + // MachineConfigPoolDegraded is the overall status of the pool based, today, on whether we fail with NodeDegraded or RenderDegraded + MachineConfigPoolDegraded MachineConfigPoolConditionType = "Degraded" + + MachineConfigPoolBuildPending MachineConfigPoolConditionType = "BuildPending" + + MachineConfigPoolBuilding MachineConfigPoolConditionType = "Building" + + MachineConfigPoolBuildSuccess MachineConfigPoolConditionType = "BuildSuccess" + + MachineConfigPoolBuildFailed MachineConfigPoolConditionType = "BuildFailed" + + MachineConfigPoolBuildInterrupted MachineConfigPoolConditionType = "BuildInterrupted" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfigPoolList is a list of MachineConfigPool resources +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type MachineConfigPoolList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []MachineConfigPool `json:"items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// KubeletConfig describes a customized Kubelet configuration. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=kubeletconfigs,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1453 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +kubebuilder:metadata:labels="openshift.io/operator-managed=" +// +openshift:compatibility-gen:level=1 +type KubeletConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // +kubebuilder:validation:Required + Spec KubeletConfigSpec `json:"spec"` + // +optional + Status KubeletConfigStatus `json:"status"` +} + +// KubeletConfigSpec defines the desired state of KubeletConfig +type KubeletConfigSpec struct { + // +optional + AutoSizingReserved *bool `json:"autoSizingReserved,omitempty"` + // +optional + LogLevel *int32 `json:"logLevel,omitempty"` + + // MachineConfigPoolSelector selects which pools the KubeletConfig shoud apply to. + // A nil selector will result in no pools being selected. + // +optional + MachineConfigPoolSelector *metav1.LabelSelector `json:"machineConfigPoolSelector,omitempty"` + // kubeletConfig fields are defined in kubernetes upstream. Please refer to the types defined in the version/commit used by + // OpenShift of the upstream kubernetes. It's important to note that, since the fields of the kubelet configuration are directly fetched from + // upstream the validation of those values is handled directly by the kubelet. Please refer to the upstream version of the relevant kubernetes + // for the valid values of these fields. Invalid values of the kubelet configuration fields may render cluster nodes unusable. + // +optional + KubeletConfig *runtime.RawExtension `json:"kubeletConfig,omitempty"` + + // If unset, the default is based on the apiservers.config.openshift.io/cluster resource. + // Note that only Old and Intermediate profiles are currently supported, and + // the maximum available minTLSVersion is VersionTLS12. + // +optional + TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` +} + +// KubeletConfigStatus defines the observed state of a KubeletConfig +type KubeletConfigStatus struct { + // observedGeneration represents the generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // conditions represents the latest available observations of current state. + // +optional + Conditions []KubeletConfigCondition `json:"conditions"` +} + +// KubeletConfigCondition defines the state of the KubeletConfig +type KubeletConfigCondition struct { + // type specifies the state of the operator's reconciliation functionality. + // +optional + Type KubeletConfigStatusConditionType `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +optional + Status corev1.ConditionStatus `json:"status"` + + // lastTransitionTime is the time of the last update to the current status object. + // +optional + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason is the reason for the condition's last transition. Reasons are PascalCase + // +optional + Reason string `json:"reason,omitempty"` + + // message provides additional information about the current condition. + // This is only to be consumed by humans. + // +optional + Message string `json:"message,omitempty"` +} + +// KubeletConfigStatusConditionType is the state of the operator's reconciliation functionality. +type KubeletConfigStatusConditionType string + +const ( + // KubeletConfigSuccess designates a successful application of a KubeletConfig CR. + KubeletConfigSuccess KubeletConfigStatusConditionType = "Success" + + // KubeletConfigFailure designates a failure applying a KubeletConfig CR. + KubeletConfigFailure KubeletConfigStatusConditionType = "Failure" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// KubeletConfigList is a list of KubeletConfig resources +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type KubeletConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []KubeletConfig `json:"items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ContainerRuntimeConfig describes a customized Container Runtime configuration. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=containerruntimeconfigs,scope=Cluster,shortName=ctrcfg +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1453 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +kubebuilder:metadata:labels="openshift.io/operator-managed=" +// +openshift:compatibility-gen:level=1 +type ContainerRuntimeConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // +kubebuilder:validation:Required + Spec ContainerRuntimeConfigSpec `json:"spec"` + // +optional + Status ContainerRuntimeConfigStatus `json:"status"` +} + +// ContainerRuntimeConfigSpec defines the desired state of ContainerRuntimeConfig +type ContainerRuntimeConfigSpec struct { + // MachineConfigPoolSelector selects which pools the ContainerRuntimeConfig shoud apply to. + // A nil selector will result in no pools being selected. + // +optional + MachineConfigPoolSelector *metav1.LabelSelector `json:"machineConfigPoolSelector,omitempty"` + + // +kubebuilder:validation:Required + ContainerRuntimeConfig *ContainerRuntimeConfiguration `json:"containerRuntimeConfig,omitempty"` +} + +// ContainerRuntimeConfiguration defines the tuneables of the container runtime +type ContainerRuntimeConfiguration struct { + // pidsLimit specifies the maximum number of processes allowed in a container + // +optional + PidsLimit *int64 `json:"pidsLimit,omitempty"` + + // logLevel specifies the verbosity of the logs based on the level it is set to. + // Options are fatal, panic, error, warn, info, and debug. + // +optional + LogLevel string `json:"logLevel,omitempty"` + + // logSizeMax specifies the Maximum size allowed for the container log file. + // Negative numbers indicate that no size limit is imposed. + // If it is positive, it must be >= 8192 to match/exceed conmon's read buffer. + // +optional + LogSizeMax *resource.Quantity `json:"logSizeMax,omitempty"` + + // overlaySize specifies the maximum size of a container image. + // This flag can be used to set quota on the size of container images. (default: 10GB) + // +optional + OverlaySize *resource.Quantity `json:"overlaySize,omitempty"` + + // defaultRuntime is the name of the OCI runtime to be used as the default. + // +optional + DefaultRuntime ContainerRuntimeDefaultRuntime `json:"defaultRuntime,omitempty"` +} + +type ContainerRuntimeDefaultRuntime string + +const ( + ContainerRuntimeDefaultRuntimeEmpty = "" + ContainerRuntimeDefaultRuntimeRunc = "runc" + ContainerRuntimeDefaultRuntimeCrun = "crun" + ContainerRuntimeDefaultRuntimeDefault = ContainerRuntimeDefaultRuntimeRunc +) + +// ContainerRuntimeConfigStatus defines the observed state of a ContainerRuntimeConfig +type ContainerRuntimeConfigStatus struct { + // observedGeneration represents the generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // conditions represents the latest available observations of current state. + // +listType=atomic + // +optional + Conditions []ContainerRuntimeConfigCondition `json:"conditions"` +} + +// ContainerRuntimeConfigCondition defines the state of the ContainerRuntimeConfig +type ContainerRuntimeConfigCondition struct { + // type specifies the state of the operator's reconciliation functionality. + // +optional + Type ContainerRuntimeConfigStatusConditionType `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +optional + Status corev1.ConditionStatus `json:"status"` + + // lastTransitionTime is the time of the last update to the current status object. + // +nullable + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason is the reason for the condition's last transition. Reasons are PascalCase + // +optional + Reason string `json:"reason,omitempty"` + + // message provides additional information about the current condition. + // This is only to be consumed by humans. + // +optional + Message string `json:"message,omitempty"` +} + +// ContainerRuntimeConfigStatusConditionType is the state of the operator's reconciliation functionality. +type ContainerRuntimeConfigStatusConditionType string + +const ( + // ContainerRuntimeConfigSuccess designates a successful application of a ContainerRuntimeConfig CR. + ContainerRuntimeConfigSuccess ContainerRuntimeConfigStatusConditionType = "Success" + + // ContainerRuntimeConfigFailure designates a failure applying a ContainerRuntimeConfig CR. + ContainerRuntimeConfigFailure ContainerRuntimeConfigStatusConditionType = "Failure" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ContainerRuntimeConfigList is a list of ContainerRuntimeConfig resources +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type ContainerRuntimeConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []ContainerRuntimeConfig `json:"items"` +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..9ad13130fe --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go @@ -0,0 +1,887 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + configv1 "github.com/openshift/api/config/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CertExpiry) DeepCopyInto(out *CertExpiry) { + *out = *in + if in.Expiry != nil { + in, out := &in.Expiry, &out.Expiry + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertExpiry. +func (in *CertExpiry) DeepCopy() *CertExpiry { + if in == nil { + return nil + } + out := new(CertExpiry) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerRuntimeConfig) DeepCopyInto(out *ContainerRuntimeConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRuntimeConfig. +func (in *ContainerRuntimeConfig) DeepCopy() *ContainerRuntimeConfig { + if in == nil { + return nil + } + out := new(ContainerRuntimeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ContainerRuntimeConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerRuntimeConfigCondition) DeepCopyInto(out *ContainerRuntimeConfigCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRuntimeConfigCondition. +func (in *ContainerRuntimeConfigCondition) DeepCopy() *ContainerRuntimeConfigCondition { + if in == nil { + return nil + } + out := new(ContainerRuntimeConfigCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerRuntimeConfigList) DeepCopyInto(out *ContainerRuntimeConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ContainerRuntimeConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRuntimeConfigList. +func (in *ContainerRuntimeConfigList) DeepCopy() *ContainerRuntimeConfigList { + if in == nil { + return nil + } + out := new(ContainerRuntimeConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ContainerRuntimeConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerRuntimeConfigSpec) DeepCopyInto(out *ContainerRuntimeConfigSpec) { + *out = *in + if in.MachineConfigPoolSelector != nil { + in, out := &in.MachineConfigPoolSelector, &out.MachineConfigPoolSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ContainerRuntimeConfig != nil { + in, out := &in.ContainerRuntimeConfig, &out.ContainerRuntimeConfig + *out = new(ContainerRuntimeConfiguration) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRuntimeConfigSpec. +func (in *ContainerRuntimeConfigSpec) DeepCopy() *ContainerRuntimeConfigSpec { + if in == nil { + return nil + } + out := new(ContainerRuntimeConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerRuntimeConfigStatus) DeepCopyInto(out *ContainerRuntimeConfigStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ContainerRuntimeConfigCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRuntimeConfigStatus. +func (in *ContainerRuntimeConfigStatus) DeepCopy() *ContainerRuntimeConfigStatus { + if in == nil { + return nil + } + out := new(ContainerRuntimeConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerRuntimeConfiguration) DeepCopyInto(out *ContainerRuntimeConfiguration) { + *out = *in + if in.PidsLimit != nil { + in, out := &in.PidsLimit, &out.PidsLimit + *out = new(int64) + **out = **in + } + if in.LogSizeMax != nil { + in, out := &in.LogSizeMax, &out.LogSizeMax + x := (*in).DeepCopy() + *out = &x + } + if in.OverlaySize != nil { + in, out := &in.OverlaySize, &out.OverlaySize + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRuntimeConfiguration. +func (in *ContainerRuntimeConfiguration) DeepCopy() *ContainerRuntimeConfiguration { + if in == nil { + return nil + } + out := new(ContainerRuntimeConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerCertificate) DeepCopyInto(out *ControllerCertificate) { + *out = *in + if in.NotBefore != nil { + in, out := &in.NotBefore, &out.NotBefore + *out = (*in).DeepCopy() + } + if in.NotAfter != nil { + in, out := &in.NotAfter, &out.NotAfter + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerCertificate. +func (in *ControllerCertificate) DeepCopy() *ControllerCertificate { + if in == nil { + return nil + } + out := new(ControllerCertificate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerConfig) DeepCopyInto(out *ControllerConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfig. +func (in *ControllerConfig) DeepCopy() *ControllerConfig { + if in == nil { + return nil + } + out := new(ControllerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerConfigList) DeepCopyInto(out *ControllerConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ControllerConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfigList. +func (in *ControllerConfigList) DeepCopy() *ControllerConfigList { + if in == nil { + return nil + } + out := new(ControllerConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerConfigSpec) DeepCopyInto(out *ControllerConfigSpec) { + *out = *in + if in.KubeAPIServerServingCAData != nil { + in, out := &in.KubeAPIServerServingCAData, &out.KubeAPIServerServingCAData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.RootCAData != nil { + in, out := &in.RootCAData, &out.RootCAData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.CloudProviderCAData != nil { + in, out := &in.CloudProviderCAData, &out.CloudProviderCAData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.AdditionalTrustBundle != nil { + in, out := &in.AdditionalTrustBundle, &out.AdditionalTrustBundle + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.ImageRegistryBundleUserData != nil { + in, out := &in.ImageRegistryBundleUserData, &out.ImageRegistryBundleUserData + *out = make([]ImageRegistryBundle, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ImageRegistryBundleData != nil { + in, out := &in.ImageRegistryBundleData, &out.ImageRegistryBundleData + *out = make([]ImageRegistryBundle, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PullSecret != nil { + in, out := &in.PullSecret, &out.PullSecret + *out = new(corev1.ObjectReference) + **out = **in + } + if in.InternalRegistryPullSecret != nil { + in, out := &in.InternalRegistryPullSecret, &out.InternalRegistryPullSecret + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Images != nil { + in, out := &in.Images, &out.Images + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Proxy != nil { + in, out := &in.Proxy, &out.Proxy + *out = new(configv1.ProxyStatus) + **out = **in + } + if in.Infra != nil { + in, out := &in.Infra, &out.Infra + *out = new(configv1.Infrastructure) + (*in).DeepCopyInto(*out) + } + if in.DNS != nil { + in, out := &in.DNS, &out.DNS + *out = new(configv1.DNS) + (*in).DeepCopyInto(*out) + } + if in.Network != nil { + in, out := &in.Network, &out.Network + *out = new(NetworkInfo) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfigSpec. +func (in *ControllerConfigSpec) DeepCopy() *ControllerConfigSpec { + if in == nil { + return nil + } + out := new(ControllerConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerConfigStatus) DeepCopyInto(out *ControllerConfigStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ControllerConfigStatusCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ControllerCertificates != nil { + in, out := &in.ControllerCertificates, &out.ControllerCertificates + *out = make([]ControllerCertificate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfigStatus. +func (in *ControllerConfigStatus) DeepCopy() *ControllerConfigStatus { + if in == nil { + return nil + } + out := new(ControllerConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerConfigStatusCondition) DeepCopyInto(out *ControllerConfigStatusCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfigStatusCondition. +func (in *ControllerConfigStatusCondition) DeepCopy() *ControllerConfigStatusCondition { + if in == nil { + return nil + } + out := new(ControllerConfigStatusCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageRegistryBundle) DeepCopyInto(out *ImageRegistryBundle) { + *out = *in + if in.Data != nil { + in, out := &in.Data, &out.Data + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryBundle. +func (in *ImageRegistryBundle) DeepCopy() *ImageRegistryBundle { + if in == nil { + return nil + } + out := new(ImageRegistryBundle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfig) DeepCopyInto(out *KubeletConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfig. +func (in *KubeletConfig) DeepCopy() *KubeletConfig { + if in == nil { + return nil + } + out := new(KubeletConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeletConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfigCondition) DeepCopyInto(out *KubeletConfigCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfigCondition. +func (in *KubeletConfigCondition) DeepCopy() *KubeletConfigCondition { + if in == nil { + return nil + } + out := new(KubeletConfigCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfigList) DeepCopyInto(out *KubeletConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeletConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfigList. +func (in *KubeletConfigList) DeepCopy() *KubeletConfigList { + if in == nil { + return nil + } + out := new(KubeletConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeletConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) { + *out = *in + if in.AutoSizingReserved != nil { + in, out := &in.AutoSizingReserved, &out.AutoSizingReserved + *out = new(bool) + **out = **in + } + if in.LogLevel != nil { + in, out := &in.LogLevel, &out.LogLevel + *out = new(int32) + **out = **in + } + if in.MachineConfigPoolSelector != nil { + in, out := &in.MachineConfigPoolSelector, &out.MachineConfigPoolSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.KubeletConfig != nil { + in, out := &in.KubeletConfig, &out.KubeletConfig + *out = new(runtime.RawExtension) + (*in).DeepCopyInto(*out) + } + if in.TLSSecurityProfile != nil { + in, out := &in.TLSSecurityProfile, &out.TLSSecurityProfile + *out = new(configv1.TLSSecurityProfile) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfigSpec. +func (in *KubeletConfigSpec) DeepCopy() *KubeletConfigSpec { + if in == nil { + return nil + } + out := new(KubeletConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfigStatus) DeepCopyInto(out *KubeletConfigStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]KubeletConfigCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfigStatus. +func (in *KubeletConfigStatus) DeepCopy() *KubeletConfigStatus { + if in == nil { + return nil + } + out := new(KubeletConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfig) DeepCopyInto(out *MachineConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfig. +func (in *MachineConfig) DeepCopy() *MachineConfig { + if in == nil { + return nil + } + out := new(MachineConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigList) DeepCopyInto(out *MachineConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigList. +func (in *MachineConfigList) DeepCopy() *MachineConfigList { + if in == nil { + return nil + } + out := new(MachineConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigPool) DeepCopyInto(out *MachineConfigPool) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigPool. +func (in *MachineConfigPool) DeepCopy() *MachineConfigPool { + if in == nil { + return nil + } + out := new(MachineConfigPool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigPool) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigPoolCondition) DeepCopyInto(out *MachineConfigPoolCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigPoolCondition. +func (in *MachineConfigPoolCondition) DeepCopy() *MachineConfigPoolCondition { + if in == nil { + return nil + } + out := new(MachineConfigPoolCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigPoolList) DeepCopyInto(out *MachineConfigPoolList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineConfigPool, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigPoolList. +func (in *MachineConfigPoolList) DeepCopy() *MachineConfigPoolList { + if in == nil { + return nil + } + out := new(MachineConfigPoolList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigPoolList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigPoolSpec) DeepCopyInto(out *MachineConfigPoolSpec) { + *out = *in + if in.MachineConfigSelector != nil { + in, out := &in.MachineConfigSelector, &out.MachineConfigSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } + in.Configuration.DeepCopyInto(&out.Configuration) + if in.PinnedImageSets != nil { + in, out := &in.PinnedImageSets, &out.PinnedImageSets + *out = make([]PinnedImageSetRef, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigPoolSpec. +func (in *MachineConfigPoolSpec) DeepCopy() *MachineConfigPoolSpec { + if in == nil { + return nil + } + out := new(MachineConfigPoolSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigPoolStatus) DeepCopyInto(out *MachineConfigPoolStatus) { + *out = *in + in.Configuration.DeepCopyInto(&out.Configuration) + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]MachineConfigPoolCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.CertExpirys != nil { + in, out := &in.CertExpirys, &out.CertExpirys + *out = make([]CertExpiry, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PoolSynchronizersStatus != nil { + in, out := &in.PoolSynchronizersStatus, &out.PoolSynchronizersStatus + *out = make([]PoolSynchronizerStatus, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigPoolStatus. +func (in *MachineConfigPoolStatus) DeepCopy() *MachineConfigPoolStatus { + if in == nil { + return nil + } + out := new(MachineConfigPoolStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigPoolStatusConfiguration) DeepCopyInto(out *MachineConfigPoolStatusConfiguration) { + *out = *in + out.ObjectReference = in.ObjectReference + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = make([]corev1.ObjectReference, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigPoolStatusConfiguration. +func (in *MachineConfigPoolStatusConfiguration) DeepCopy() *MachineConfigPoolStatusConfiguration { + if in == nil { + return nil + } + out := new(MachineConfigPoolStatusConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigSpec) DeepCopyInto(out *MachineConfigSpec) { + *out = *in + in.Config.DeepCopyInto(&out.Config) + if in.KernelArguments != nil { + in, out := &in.KernelArguments, &out.KernelArguments + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigSpec. +func (in *MachineConfigSpec) DeepCopy() *MachineConfigSpec { + if in == nil { + return nil + } + out := new(MachineConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkInfo) DeepCopyInto(out *NetworkInfo) { + *out = *in + if in.MTUMigration != nil { + in, out := &in.MTUMigration, &out.MTUMigration + *out = new(configv1.MTUMigration) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkInfo. +func (in *NetworkInfo) DeepCopy() *NetworkInfo { + if in == nil { + return nil + } + out := new(NetworkInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PinnedImageSetRef) DeepCopyInto(out *PinnedImageSetRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnedImageSetRef. +func (in *PinnedImageSetRef) DeepCopy() *PinnedImageSetRef { + if in == nil { + return nil + } + out := new(PinnedImageSetRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PoolSynchronizerStatus) DeepCopyInto(out *PoolSynchronizerStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolSynchronizerStatus. +func (in *PoolSynchronizerStatus) DeepCopy() *PoolSynchronizerStatus { + if in == nil { + return nil + } + out := new(PoolSynchronizerStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml new file mode 100644 index 0000000000..00e41bca5e --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -0,0 +1,169 @@ +containerruntimeconfigs.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1453 + CRDName: containerruntimeconfigs.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: [] + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: ContainerRuntimeConfig + Labels: + openshift.io/operator-managed: "" + PluralName: containerruntimeconfigs + PrinterColumns: [] + Scope: Cluster + ShortNames: + - ctrcfg + TopLevelFeatureGates: [] + Version: v1 + +controllerconfigs.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1453 + CRDName: controllerconfigs.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - BareMetalLoadBalancer + - GCPClusterHostedDNS + - GCPLabelsTags + - VSphereControlPlaneMachineSet + - VSphereMultiVCenters + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: ControllerConfig + Labels: + openshift.io/operator-managed: "" + PluralName: controllerconfigs + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: [] + Version: v1 + +kubeletconfigs.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1453 + CRDName: kubeletconfigs.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: [] + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: KubeletConfig + Labels: + openshift.io/operator-managed: "" + PluralName: kubeletconfigs + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: [] + Version: v1 + +machineconfigs.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1453 + CRDName: machineconfigs.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: [] + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: false + KindName: MachineConfig + Labels: + openshift.io/operator-managed: "" + PluralName: machineconfigs + PrinterColumns: + - description: Version of the controller that generated the machineconfig. This + will be empty if the machineconfig is not managed by a controller. + jsonPath: .metadata.annotations.machineconfiguration\.openshift\.io/generated-by-controller-version + name: GeneratedByController + type: string + - description: Version of the Ignition Config defined in the machineconfig. + jsonPath: .spec.config.ignition.version + name: IgnitionVersion + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + Scope: Cluster + ShortNames: + - mc + TopLevelFeatureGates: [] + Version: v1 + +machineconfigpools.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1453 + CRDName: machineconfigpools.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - PinnedImages + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: MachineConfigPool + Labels: + openshift.io/operator-managed: "" + PluralName: machineconfigpools + PrinterColumns: + - jsonPath: .status.configuration.name + name: Config + type: string + - description: When all the machines in the pool are updated to the correct machine + config. + jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - description: When at least one of machine is not either not updated or is in the + process of updating to the desired machine config. + jsonPath: .status.conditions[?(@.type=="Updating")].status + name: Updating + type: string + - description: When progress is blocked on updating one or more nodes or the pool + configuration is failing. + jsonPath: .status.conditions[?(@.type=="Degraded")].status + name: Degraded + type: string + - description: Total number of machines in the machine config pool + jsonPath: .status.machineCount + name: MachineCount + type: number + - description: Total number of ready machines targeted by the pool + jsonPath: .status.readyMachineCount + name: ReadyMachineCount + type: number + - description: Total number of machines targeted by the pool that have the CurrentMachineConfig + as their config + jsonPath: .status.updatedMachineCount + name: UpdatedMachineCount + type: number + - description: Total number of machines marked degraded (or unreconcilable) + jsonPath: .status.degradedMachineCount + name: DegradedMachineCount + type: number + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + Scope: Cluster + ShortNames: + - mcp + TopLevelFeatureGates: [] + Version: v1 + diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go new file mode 100644 index 0000000000..29a3a2a902 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,362 @@ +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_CertExpiry = map[string]string{ + "": "ceryExpiry contains the bundle name and the expiry date", + "bundle": "bundle is the name of the bundle in which the subject certificate resides", + "subject": "subject is the subject of the certificate", + "expiry": "expiry is the date after which the certificate will no longer be valid", +} + +func (CertExpiry) SwaggerDoc() map[string]string { + return map_CertExpiry +} + +var map_ContainerRuntimeConfig = map[string]string{ + "": "ContainerRuntimeConfig describes a customized Container Runtime configuration.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (ContainerRuntimeConfig) SwaggerDoc() map[string]string { + return map_ContainerRuntimeConfig +} + +var map_ContainerRuntimeConfigCondition = map[string]string{ + "": "ContainerRuntimeConfigCondition defines the state of the ContainerRuntimeConfig", + "type": "type specifies the state of the operator's reconciliation functionality.", + "status": "status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "lastTransitionTime is the time of the last update to the current status object.", + "reason": "reason is the reason for the condition's last transition. Reasons are PascalCase", + "message": "message provides additional information about the current condition. This is only to be consumed by humans.", +} + +func (ContainerRuntimeConfigCondition) SwaggerDoc() map[string]string { + return map_ContainerRuntimeConfigCondition +} + +var map_ContainerRuntimeConfigList = map[string]string{ + "": "ContainerRuntimeConfigList is a list of ContainerRuntimeConfig resources\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (ContainerRuntimeConfigList) SwaggerDoc() map[string]string { + return map_ContainerRuntimeConfigList +} + +var map_ContainerRuntimeConfigSpec = map[string]string{ + "": "ContainerRuntimeConfigSpec defines the desired state of ContainerRuntimeConfig", + "machineConfigPoolSelector": "MachineConfigPoolSelector selects which pools the ContainerRuntimeConfig shoud apply to. A nil selector will result in no pools being selected.", +} + +func (ContainerRuntimeConfigSpec) SwaggerDoc() map[string]string { + return map_ContainerRuntimeConfigSpec +} + +var map_ContainerRuntimeConfigStatus = map[string]string{ + "": "ContainerRuntimeConfigStatus defines the observed state of a ContainerRuntimeConfig", + "observedGeneration": "observedGeneration represents the generation observed by the controller.", + "conditions": "conditions represents the latest available observations of current state.", +} + +func (ContainerRuntimeConfigStatus) SwaggerDoc() map[string]string { + return map_ContainerRuntimeConfigStatus +} + +var map_ContainerRuntimeConfiguration = map[string]string{ + "": "ContainerRuntimeConfiguration defines the tuneables of the container runtime", + "pidsLimit": "pidsLimit specifies the maximum number of processes allowed in a container", + "logLevel": "logLevel specifies the verbosity of the logs based on the level it is set to. Options are fatal, panic, error, warn, info, and debug.", + "logSizeMax": "logSizeMax specifies the Maximum size allowed for the container log file. Negative numbers indicate that no size limit is imposed. If it is positive, it must be >= 8192 to match/exceed conmon's read buffer.", + "overlaySize": "overlaySize specifies the maximum size of a container image. This flag can be used to set quota on the size of container images. (default: 10GB)", + "defaultRuntime": "defaultRuntime is the name of the OCI runtime to be used as the default.", +} + +func (ContainerRuntimeConfiguration) SwaggerDoc() map[string]string { + return map_ContainerRuntimeConfiguration +} + +var map_ControllerCertificate = map[string]string{ + "": "ControllerCertificate contains info about a specific cert.", + "subject": "subject is the cert subject", + "signer": "signer is the cert Issuer", + "notBefore": "notBefore is the lower boundary for validity", + "notAfter": "notAfter is the upper boundary for validity", + "bundleFile": "bundleFile is the larger bundle a cert comes from", +} + +func (ControllerCertificate) SwaggerDoc() map[string]string { + return map_ControllerCertificate +} + +var map_ControllerConfig = map[string]string{ + "": "ControllerConfig describes configuration for MachineConfigController. This is currently only used to drive the MachineConfig objects generated by the TemplateController.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (ControllerConfig) SwaggerDoc() map[string]string { + return map_ControllerConfig +} + +var map_ControllerConfigList = map[string]string{ + "": "ControllerConfigList is a list of ControllerConfig resources\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (ControllerConfigList) SwaggerDoc() map[string]string { + return map_ControllerConfigList +} + +var map_ControllerConfigSpec = map[string]string{ + "": "ControllerConfigSpec is the spec for ControllerConfig resource.", + "clusterDNSIP": "clusterDNSIP is the cluster DNS IP address", + "cloudProviderConfig": "cloudProviderConfig is the configuration for the given cloud provider", + "platform": "platform is deprecated, use Infra.Status.PlatformStatus.Type instead", + "etcdDiscoveryDomain": "etcdDiscoveryDomain is deprecated, use Infra.Status.EtcdDiscoveryDomain instead", + "kubeAPIServerServingCAData": "kubeAPIServerServingCAData managed Kubelet to API Server Cert... Rotated automatically", + "rootCAData": "rootCAData specifies the root CA data", + "cloudProviderCAData": "cloudProvider specifies the cloud provider CA data", + "additionalTrustBundle": "additionalTrustBundle is a certificate bundle that will be added to the nodes trusted certificate store.", + "imageRegistryBundleUserData": "imageRegistryBundleUserData is Image Registry Data provided by the user", + "imageRegistryBundleData": "imageRegistryBundleData is the ImageRegistryData", + "pullSecret": "pullSecret is the default pull secret that needs to be installed on all machines.", + "internalRegistryPullSecret": "internalRegistryPullSecret is the pull secret for the internal registry, used by rpm-ostree to pull images from the internal registry if present", + "images": "images is map of images that are used by the controller to render templates under ./templates/", + "baseOSContainerImage": "BaseOSContainerImage is the new-format container image for operating system updates.", + "baseOSExtensionsContainerImage": "BaseOSExtensionsContainerImage is the matching extensions container for the new-format container", + "osImageURL": "OSImageURL is the old-format container image that contains the OS update payload.", + "releaseImage": "releaseImage is the image used when installing the cluster", + "proxy": "proxy holds the current proxy configuration for the nodes", + "infra": "infra holds the infrastructure details", + "dns": "dns holds the cluster dns details", + "ipFamilies": "ipFamilies indicates the IP families in use by the cluster network", + "networkType": "networkType holds the type of network the cluster is using XXX: this is temporary and will be dropped as soon as possible in favor of a better support to start network related services the proper way. Nobody is also changing this once the cluster is up and running the first time, so, disallow regeneration if this changes.", + "network": "Network contains additional network related information", +} + +func (ControllerConfigSpec) SwaggerDoc() map[string]string { + return map_ControllerConfigSpec +} + +var map_ControllerConfigStatus = map[string]string{ + "": "ControllerConfigStatus is the status for ControllerConfig", + "observedGeneration": "observedGeneration represents the generation observed by the controller.", + "conditions": "conditions represents the latest available observations of current state.", + "controllerCertificates": "controllerCertificates represents the latest available observations of the automatically rotating certificates in the MCO.", +} + +func (ControllerConfigStatus) SwaggerDoc() map[string]string { + return map_ControllerConfigStatus +} + +var map_ControllerConfigStatusCondition = map[string]string{ + "": "ControllerConfigStatusCondition contains condition information for ControllerConfigStatus", + "type": "type specifies the state of the operator's reconciliation functionality.", + "status": "status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "lastTransitionTime is the time of the last update to the current status object.", + "reason": "reason is the reason for the condition's last transition. Reasons are PascalCase", + "message": "message provides additional information about the current condition. This is only to be consumed by humans.", +} + +func (ControllerConfigStatusCondition) SwaggerDoc() map[string]string { + return map_ControllerConfigStatusCondition +} + +var map_ImageRegistryBundle = map[string]string{ + "": "ImageRegistryBundle contains information for writing image registry certificates", + "file": "file holds the name of the file where the bundle will be written to disk", + "data": "data holds the contents of the bundle that will be written to the file location", +} + +func (ImageRegistryBundle) SwaggerDoc() map[string]string { + return map_ImageRegistryBundle +} + +var map_KubeletConfig = map[string]string{ + "": "KubeletConfig describes a customized Kubelet configuration.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (KubeletConfig) SwaggerDoc() map[string]string { + return map_KubeletConfig +} + +var map_KubeletConfigCondition = map[string]string{ + "": "KubeletConfigCondition defines the state of the KubeletConfig", + "type": "type specifies the state of the operator's reconciliation functionality.", + "status": "status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "lastTransitionTime is the time of the last update to the current status object.", + "reason": "reason is the reason for the condition's last transition. Reasons are PascalCase", + "message": "message provides additional information about the current condition. This is only to be consumed by humans.", +} + +func (KubeletConfigCondition) SwaggerDoc() map[string]string { + return map_KubeletConfigCondition +} + +var map_KubeletConfigList = map[string]string{ + "": "KubeletConfigList is a list of KubeletConfig resources\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (KubeletConfigList) SwaggerDoc() map[string]string { + return map_KubeletConfigList +} + +var map_KubeletConfigSpec = map[string]string{ + "": "KubeletConfigSpec defines the desired state of KubeletConfig", + "machineConfigPoolSelector": "MachineConfigPoolSelector selects which pools the KubeletConfig shoud apply to. A nil selector will result in no pools being selected.", + "kubeletConfig": "kubeletConfig fields are defined in kubernetes upstream. Please refer to the types defined in the version/commit used by OpenShift of the upstream kubernetes. It's important to note that, since the fields of the kubelet configuration are directly fetched from upstream the validation of those values is handled directly by the kubelet. Please refer to the upstream version of the relevant kubernetes for the valid values of these fields. Invalid values of the kubelet configuration fields may render cluster nodes unusable.", + "tlsSecurityProfile": "If unset, the default is based on the apiservers.config.openshift.io/cluster resource. Note that only Old and Intermediate profiles are currently supported, and the maximum available minTLSVersion is VersionTLS12.", +} + +func (KubeletConfigSpec) SwaggerDoc() map[string]string { + return map_KubeletConfigSpec +} + +var map_KubeletConfigStatus = map[string]string{ + "": "KubeletConfigStatus defines the observed state of a KubeletConfig", + "observedGeneration": "observedGeneration represents the generation observed by the controller.", + "conditions": "conditions represents the latest available observations of current state.", +} + +func (KubeletConfigStatus) SwaggerDoc() map[string]string { + return map_KubeletConfigStatus +} + +var map_MachineConfig = map[string]string{ + "": "MachineConfig defines the configuration for a machine\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (MachineConfig) SwaggerDoc() map[string]string { + return map_MachineConfig +} + +var map_MachineConfigList = map[string]string{ + "": "MachineConfigList is a list of MachineConfig resources\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (MachineConfigList) SwaggerDoc() map[string]string { + return map_MachineConfigList +} + +var map_MachineConfigPool = map[string]string{ + "": "MachineConfigPool describes a pool of MachineConfigs.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (MachineConfigPool) SwaggerDoc() map[string]string { + return map_MachineConfigPool +} + +var map_MachineConfigPoolCondition = map[string]string{ + "": "MachineConfigPoolCondition contains condition information for an MachineConfigPool.", + "type": "type of the condition, currently ('Done', 'Updating', 'Failed').", + "status": "status of the condition, one of ('True', 'False', 'Unknown').", + "lastTransitionTime": "lastTransitionTime is the timestamp corresponding to the last status change of this condition.", + "reason": "reason is a brief machine readable explanation for the condition's last transition.", + "message": "message is a human readable description of the details of the last transition, complementing reason.", +} + +func (MachineConfigPoolCondition) SwaggerDoc() map[string]string { + return map_MachineConfigPoolCondition +} + +var map_MachineConfigPoolList = map[string]string{ + "": "MachineConfigPoolList is a list of MachineConfigPool resources\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (MachineConfigPoolList) SwaggerDoc() map[string]string { + return map_MachineConfigPoolList +} + +var map_MachineConfigPoolSpec = map[string]string{ + "": "MachineConfigPoolSpec is the spec for MachineConfigPool resource.", + "machineConfigSelector": "machineConfigSelector specifies a label selector for MachineConfigs. Refer https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ on how label and selectors work.", + "nodeSelector": "nodeSelector specifies a label selector for Machines", + "paused": "paused specifies whether or not changes to this machine config pool should be stopped. This includes generating new desiredMachineConfig and update of machines.", + "maxUnavailable": "maxUnavailable defines either an integer number or percentage of nodes in the pool that can go Unavailable during an update. This includes nodes Unavailable for any reason, including user initiated cordons, failing nodes, etc. The default value is 1.\n\nA value larger than 1 will mean multiple nodes going unavailable during the update, which may affect your workload stress on the remaining nodes. You cannot set this value to 0 to stop updates (it will default back to 1); to stop updates, use the 'paused' property instead. Drain will respect Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if maxUnavailable is greater than one.", + "configuration": "The targeted MachineConfig object for the machine config pool.", + "pinnedImageSets": "pinnedImageSets specifies a sequence of PinnedImageSetRef objects for the pool. Nodes within this pool will preload and pin images defined in the PinnedImageSet. Before pulling images the MachineConfigDaemon will ensure the total uncompressed size of all the images does not exceed available resources. If the total size of the images exceeds the available resources the controller will report a Degraded status to the MachineConfigPool and not attempt to pull any images. Also to help ensure the kubelet can mitigate storage risk, the pinned_image configuration and subsequent service reload will happen only after all of the images have been pulled for each set. Images from multiple PinnedImageSets are loaded and pinned sequentially as listed. Duplicate and existing images will be skipped.\n\nAny failure to prefetch or pin images will result in a Degraded pool. Resolving these failures is the responsibility of the user. The admin should be proactive in ensuring adequate storage and proper image authentication exists in advance.", +} + +func (MachineConfigPoolSpec) SwaggerDoc() map[string]string { + return map_MachineConfigPoolSpec +} + +var map_MachineConfigPoolStatus = map[string]string{ + "": "MachineConfigPoolStatus is the status for MachineConfigPool resource.", + "observedGeneration": "observedGeneration represents the generation observed by the controller.", + "configuration": "configuration represents the current MachineConfig object for the machine config pool.", + "machineCount": "machineCount represents the total number of machines in the machine config pool.", + "updatedMachineCount": "updatedMachineCount represents the total number of machines targeted by the pool that have the CurrentMachineConfig as their config.", + "readyMachineCount": "readyMachineCount represents the total number of ready machines targeted by the pool.", + "unavailableMachineCount": "unavailableMachineCount represents the total number of unavailable (non-ready) machines targeted by the pool. A node is marked unavailable if it is in updating state or NodeReady condition is false.", + "degradedMachineCount": "degradedMachineCount represents the total number of machines marked degraded (or unreconcilable). A node is marked degraded if applying a configuration failed..", + "conditions": "conditions represents the latest available observations of current state.", + "certExpirys": "certExpirys keeps track of important certificate expiration data", + "poolSynchronizersStatus": "poolSynchronizersStatus is the status of the machines managed by the pool synchronizers.", +} + +func (MachineConfigPoolStatus) SwaggerDoc() map[string]string { + return map_MachineConfigPoolStatus +} + +var map_MachineConfigPoolStatusConfiguration = map[string]string{ + "": "MachineConfigPoolStatusConfiguration stores the current configuration for the pool, and optionally also stores the list of MachineConfig objects used to generate the configuration.", + "source": "source is the list of MachineConfig objects that were used to generate the single MachineConfig object specified in `content`.", +} + +func (MachineConfigPoolStatusConfiguration) SwaggerDoc() map[string]string { + return map_MachineConfigPoolStatusConfiguration +} + +var map_MachineConfigSpec = map[string]string{ + "": "MachineConfigSpec is the spec for MachineConfig", + "osImageURL": "OSImageURL specifies the remote location that will be used to fetch the OS.", + "baseOSExtensionsContainerImage": "BaseOSExtensionsContainerImage specifies the remote location that will be used to fetch the extensions container matching a new-format OS image", + "config": "Config is a Ignition Config object.", + "kernelArguments": "kernelArguments contains a list of kernel arguments to be added", + "extensions": "extensions contains a list of additional features that can be enabled on host", + "fips": "fips controls FIPS mode", + "kernelType": "kernelType contains which kernel we want to be running like default (traditional), realtime, 64k-pages (aarch64 only).", +} + +func (MachineConfigSpec) SwaggerDoc() map[string]string { + return map_MachineConfigSpec +} + +var map_NetworkInfo = map[string]string{ + "": "Network contains network related configuration", + "mtuMigration": "MTUMigration contains the MTU migration configuration.", +} + +func (NetworkInfo) SwaggerDoc() map[string]string { + return map_NetworkInfo +} + +var map_PinnedImageSetRef = map[string]string{ + "name": "name is a reference to the name of a PinnedImageSet. Must adhere to RFC-1123 (https://tools.ietf.org/html/rfc1123). Made up of one of more period-separated (.) segments, where each segment consists of alphanumeric characters and hyphens (-), must begin and end with an alphanumeric character, and is at most 63 characters in length. The total length of the name must not exceed 253 characters.", +} + +func (PinnedImageSetRef) SwaggerDoc() map[string]string { + return map_PinnedImageSetRef +} + +var map_PoolSynchronizerStatus = map[string]string{ + "poolSynchronizerType": "poolSynchronizerType describes the type of the pool synchronizer.", + "machineCount": "machineCount is the number of machines that are managed by the node synchronizer.", + "updatedMachineCount": "updatedMachineCount is the number of machines that have been updated by the node synchronizer.", + "readyMachineCount": "readyMachineCount is the number of machines managed by the node synchronizer that are in a ready state.", + "availableMachineCount": "availableMachineCount is the number of machines managed by the node synchronizer which are available.", + "unavailableMachineCount": "unavailableMachineCount is the number of machines managed by the node synchronizer but are unavailable.", + "observedGeneration": "observedGeneration is the last generation change that has been applied.", +} + +func (PoolSynchronizerStatus) SwaggerDoc() map[string]string { + return map_PoolSynchronizerStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/Makefile b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/Makefile new file mode 100644 index 0000000000..5943b2583a --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/Makefile @@ -0,0 +1,3 @@ +.PHONY: test +test: + make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="machineconfiguration.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/doc.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/doc.go new file mode 100644 index 0000000000..5876803877 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// +k8s:deepcopy-gen=package,register +// +groupName=machineconfiguration.openshift.io +// +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-gen=true + +// Package v1alpha1 is the v1alpha1 version of the API. +package v1alpha1 diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/register.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/register.go new file mode 100644 index 0000000000..e1399cf66d --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/register.go @@ -0,0 +1,49 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + GroupName = "machineconfiguration.openshift.io" + GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // Install is a function which adds this version to a scheme + Install = schemeBuilder.AddToScheme + + // SchemeGroupVersion generated code relies on this name + // Deprecated + SchemeGroupVersion = GroupVersion + // AddToScheme exists solely to keep the old generators creating valid code + // DEPRECATED + AddToScheme = schemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(GroupVersion, + &MachineConfigNode{}, + &MachineConfigNodeList{}, + &PinnedImageSet{}, + &PinnedImageSetList{}, + &MachineOSConfig{}, + &MachineOSConfigList{}, + &MachineOSBuild{}, + &MachineOSBuildList{}, + ) + metav1.AddToGroupVersion(scheme, GroupVersion) + return nil +} + +// Resource generated code relies on this being here, but it logically belongs to the group +// DEPRECATED +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + +// Kind is used to validate existence of a resource kind in this API group +func Kind(kind string) schema.GroupKind { + return schema.GroupKind{Group: GroupName, Kind: kind} +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go new file mode 100644 index 0000000000..b84910ad40 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go @@ -0,0 +1,249 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machineconfignodes,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1596 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +openshift:enable:FeatureGate=MachineConfigNodes +// +kubebuilder:printcolumn:name="Updated",type="string",JSONPath=.status.conditions[?(@.type=="Updated")].status +// +kubebuilder:printcolumn:name="UpdatePrepared",type="string",JSONPath=.status.conditions[?(@.type=="UpdatePrepared")].status +// +kubebuilder:printcolumn:name="UpdateExecuted",type="string",JSONPath=.status.conditions[?(@.type=="UpdateExecuted")].status +// +kubebuilder:printcolumn:name="UpdatePostActionComplete",type="string",JSONPath=.status.conditions[?(@.type=="UpdatePostActionComplete")].status +// +kubebuilder:printcolumn:name="UpdateComplete",type="string",JSONPath=.status.conditions[?(@.type=="UpdateComplete")].status +// +kubebuilder:printcolumn:name="Resumed",type="string",JSONPath=.status.conditions[?(@.type=="Resumed")].status +// +kubebuilder:printcolumn:name="UpdateCompatible",type="string",JSONPath=.status.conditions[?(@.type=="UpdateCompatible")].status,priority=1 +// +kubebuilder:printcolumn:name="UpdatedFilesAndOS",type="string",JSONPath=.status.conditions[?(@.type=="AppliedFilesAndOS")].status,priority=1 +// +kubebuilder:printcolumn:name="CordonedNode",type="string",JSONPath=.status.conditions[?(@.type=="Cordoned")].status,priority=1 +// +kubebuilder:printcolumn:name="DrainedNode",type="string",JSONPath=.status.conditions[?(@.type=="Drained")].status,priority=1 +// +kubebuilder:printcolumn:name="RebootedNode",type="string",JSONPath=.status.conditions[?(@.type=="RebootedNode")].status,priority=1 +// +kubebuilder:printcolumn:name="ReloadedCRIO",type="string",JSONPath=.status.conditions[?(@.type=="ReloadedCRIO")].status,priority=1 +// +kubebuilder:printcolumn:name="UncordonedNode",type="string",JSONPath=.status.conditions[?(@.type=="Uncordoned")].status,priority=1 +// +kubebuilder:metadata:labels=openshift.io/operator-managed= + +// MachineConfigNode describes the health of the Machines on the system +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +// +kubebuilder:validation:XValidation:rule="self.metadata.name == self.spec.node.name",message="spec.node.name should match metadata.name" +type MachineConfigNode struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec describes the configuration of the machine config node. + // +kubebuilder:validation:Required + Spec MachineConfigNodeSpec `json:"spec"` + + // status describes the last observed state of this machine config node. + // +optional + Status MachineConfigNodeStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfigNodeList describes all of the MachinesStates on the system +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type MachineConfigNodeList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []MachineConfigNode `json:"items"` +} + +// MCOObjectReference holds information about an object the MCO either owns +// or modifies in some way +type MCOObjectReference struct { + // name is the object name. + // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + // It may consist of only alphanumeric characters, hyphens (-) and periods (.) + // and must be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Name string `json:"name"` +} + +// MachineConfigNodeSpec describes the MachineConfigNode we are managing. +type MachineConfigNodeSpec struct { + // node contains a reference to the node for this machine config node. + // +kubebuilder:validation:Required + Node MCOObjectReference `json:"node"` + + // pool contains a reference to the machine config pool that this machine config node's + // referenced node belongs to. + // +kubebuilder:validation:Required + Pool MCOObjectReference `json:"pool"` + + // configVersion holds the desired config version for the node targeted by this machine config node resource. + // The desired version represents the machine config the node will attempt to update to. This gets set before the machine config operator validates + // the new machine config against the current machine config. + // +kubebuilder:validation:Required + ConfigVersion MachineConfigNodeSpecMachineConfigVersion `json:"configVersion"` + + // pinnedImageSets holds the desired pinned image sets that this node should pin and pull. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=100 + // +optional + PinnedImageSets []MachineConfigNodeSpecPinnedImageSet `json:"pinnedImageSets,omitempty"` +} + +// MachineConfigNodeStatus holds the reported information on a particular machine config node. +type MachineConfigNodeStatus struct { + // conditions represent the observations of a machine config node's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // observedGeneration represents the generation observed by the controller. + // This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec. + // +kubebuilder:validation:Required + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // configVersion describes the current and desired machine config for this node. + // The current version represents the current machine config for the node and is updated after a successful update. + // The desired version represents the machine config the node will attempt to update to. + // This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + // +kubebuilder:validation:Required + ConfigVersion MachineConfigNodeStatusMachineConfigVersion `json:"configVersion"` + // pinnedImageSets describes the current and desired pinned image sets for this node. + // The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. + // The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=100 + // +optional + PinnedImageSets []MachineConfigNodeStatusPinnedImageSet `json:"pinnedImageSets,omitempty"` +} + +// +kubebuilder:validation:XValidation:rule="has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true",message="desired generation must be greater than or equal to the current generation" +// +kubebuilder:validation:XValidation:rule="has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true",message="desired generation must be greater than last failed generation" +// +kubebuilder:validation:XValidation:rule="has(self.lastFailedGeneration) ? has(self.desiredGeneration): true",message="desired generation must be defined if last failed generation is defined" +type MachineConfigNodeStatusPinnedImageSet struct { + // name is the name of the pinned image set. + // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + // It may consist of only alphanumeric characters, hyphens (-) and periods (.) + // and must be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Name string `json:"name"` + // currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. + // +optional + CurrentGeneration int32 `json:"currentGeneration,omitempty"` + // desiredGeneration version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + // +kubebuilder:validation:Minimum=0 + // +optional + DesiredGeneration int32 `json:"desiredGeneration,omitempty"` + // lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned on this node. + // +kubebuilder:validation:Minimum=0 + // +optional + LastFailedGeneration int32 `json:"lastFailedGeneration,omitempty"` + // lastFailedGenerationErrors is a list of errors why the lastFailed generation failed to be pulled and pinned. + // +kubebuilder:validation:MaxItems=10 + // +optional + LastFailedGenerationErrors []string `json:"lastFailedGenerationErrors,omitempty"` +} + +// MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. +// When the current and desired versions are not matched, the machine config pool is processing an upgrade and the machine config node will +// monitor the upgrade process. +// When the current and desired versions do not match, +// the machine config node will ignore these events given that certain operations happen both during the MCO's upgrade mode and the daily operations mode. +type MachineConfigNodeStatusMachineConfigVersion struct { + // current is the name of the machine config currently in use on the node. + // This value is updated once the machine config daemon has completed the update of the configuration for the node. + // This value should match the desired version unless an upgrade is in progress. + // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + // It may consist of only alphanumeric characters, hyphens (-) and periods (.) + // and must be at most 253 characters in length. + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +optional + Current string `json:"current"` + // desired is the MachineConfig the node wants to upgrade to. + // This value gets set in the machine config node status once the machine config has been validated + // against the current machine config. + // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + // It may consist of only alphanumeric characters, hyphens (-) and periods (.) + // and must be at most 253 characters in length. + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Desired string `json:"desired"` +} + +// MachineConfigNodeSpecMachineConfigVersion holds the desired config version for the current observed machine config node. +// When Current is not equal to Desired; the MachineConfigOperator is in an upgrade phase and the machine config node will +// take account of upgrade related events. Otherwise they will be ignored given that certain operations +// happen both during the MCO's upgrade mode and the daily operations mode. +type MachineConfigNodeSpecMachineConfigVersion struct { + // desired is the name of the machine config that the the node should be upgraded to. + // This value is set when the machine config pool generates a new version of its rendered configuration. + // When this value is changed, the machine config daemon starts the node upgrade process. + // This value gets set in the machine config node spec once the machine config has been targeted for upgrade and before it is validated. + // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + // It may consist of only alphanumeric characters, hyphens (-) and periods (.) + // and must be at most 253 characters in length. + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Desired string `json:"desired"` +} + +type MachineConfigNodeSpecPinnedImageSet struct { + // name is the name of the pinned image set. + // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + // It may consist of only alphanumeric characters, hyphens (-) and periods (.) + // and must be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Name string `json:"name"` +} + +// StateProgress is each possible state for each possible MachineConfigNodeType +// UpgradeProgression Kind will only use the "MachinConfigPoolUpdate..." types for example +// Please note: These conditions are subject to change. Both additions and deletions may be made. +type StateProgress string + +const ( + // MachineConfigNodeUpdatePrepared describes a machine that is preparing in the daemon to trigger an update + MachineConfigNodeUpdatePrepared StateProgress = "UpdatePrepared" + // MachineConfigNodeUpdateExecuted describes a machine that has executed the body of the upgrade + MachineConfigNodeUpdateExecuted StateProgress = "UpdateExecuted" + // MachineConfigNodeUpdatePostActionComplete describes a machine that has executed its post update action + MachineConfigNodeUpdatePostActionComplete StateProgress = "UpdatePostActionComplete" + // MachineConfigNodeUpdateComplete describes a machine that has completed the core parts of an upgrade. + MachineConfigNodeUpdateComplete StateProgress = "UpdateComplete" + // MachineConfigNodeUpdated describes a machine that has a matching desired and current config after executing an update + MachineConfigNodeUpdated StateProgress = "Updated" + // MachineConfigNodeUpdateResumed describes a machine that has resumed normal processes + MachineConfigNodeResumed StateProgress = "Resumed" + // MachineConfigNodeUpdateCompatible the part of the preparing phase where the mco decides whether it can update + MachineConfigNodeUpdateCompatible StateProgress = "UpdateCompatible" + // MachineConfigNodeUpdateDrained describes the part of the inprogress phase where the node drains + MachineConfigNodeUpdateDrained StateProgress = "Drained" + // MachineConfigNodeUpdateFilesAndOS describes the part of the inprogress phase where the nodes file and OS config change + MachineConfigNodeUpdateFilesAndOS StateProgress = "AppliedFilesAndOS" + // MachineConfigNodeUpdateCordoned describes the part of the completing phase where the node cordons + MachineConfigNodeUpdateCordoned StateProgress = "Cordoned" + // MachineConfigNodeUpdateUncordoned describes the part of the completing phase where the node uncordons + MachineConfigNodeUpdateUncordoned StateProgress = "Uncordoned" + // MachineConfigNodeUpdateRebooted describes the part of the post action phase where the node reboots itself + MachineConfigNodeUpdateRebooted StateProgress = "RebootedNode" + // MachineConfigNodeUpdateReloaded describes the part of the post action phase where the node reloads its CRIO service + MachineConfigNodeUpdateReloaded StateProgress = "ReloadedCRIO" + // MachineConfigNodePinnedImageSetsProgressing describes a machine currently progressing to the desired pinned image sets + MachineConfigNodePinnedImageSetsProgressing StateProgress = "PinnedImageSetsProgressing" + // MachineConfigNodePinnedImageSetsDegraded describes a machine that has failed to progress to the desired pinned image sets + MachineConfigNodePinnedImageSetsDegraded StateProgress = "PinnedImageSetsDegraded" +) diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosbuild.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosbuild.go new file mode 100644 index 0000000000..82ae150c82 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosbuild.go @@ -0,0 +1,171 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machineosbuilds,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1773 +// +openshift:enable:FeatureGate=OnClusterBuild +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +kubebuilder:metadata:labels=openshift.io/operator-managed= +// +kubebuilder:printcolumn:name="Prepared",type="string",JSONPath=.status.conditions[?(@.type=="Prepared")].status +// +kubebuilder:printcolumn:name="Building",type="string",JSONPath=.status.conditions[?(@.type=="Building")].status +// +kubebuilder:printcolumn:name="Succeeded",type="string",JSONPath=.status.conditions[?(@.type=="Succeeded")].status +// +kubebuilder:printcolumn:name="Interrupted",type="string",JSONPath=.status.conditions[?(@.type=="Interrupted")].status +// +kubebuilder:printcolumn:name="Failed",type="string",JSONPath=.status.conditions[?(@.type=="Failed")].status + +// MachineOSBuild describes a build process managed and deployed by the MCO +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type MachineOSBuild struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec describes the configuration of the machine os build + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="machineOSBuildSpec is immutable once set" + // +kubebuilder:validation:Required + Spec MachineOSBuildSpec `json:"spec"` + + // status describes the lst observed state of this machine os build + // +optional + Status MachineOSBuildStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineOSBuildList describes all of the Builds on the system +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type MachineOSBuildList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []MachineOSBuild `json:"items"` +} + +// MachineOSBuildSpec describes information about a build process primarily populated from a MachineOSConfig object. +type MachineOSBuildSpec struct { + // configGeneration tracks which version of MachineOSConfig this build is based off of + // +kubebuilder:validation:Minimum=1 + // +kubebuilder:validation:Required + ConfigGeneration int64 `json:"configGeneration"` + // desiredConfig is the desired config we want to build an image for. + // +kubebuilder:validation:Required + DesiredConfig RenderedMachineConfigReference `json:"desiredConfig"` + // machineOSConfig is the config object which the build is based off of + // +kubebuilder:validation:Required + MachineOSConfig MachineOSConfigReference `json:"machineOSConfig"` + // version tracks the newest MachineOSBuild for each MachineOSConfig + // +kubebuilder:validation:Minimum=1 + // +kubebuilder:validation:Required + Version int64 `json:"version"` + // renderedImagePushspec is set from the MachineOSConfig + // The format of the image pullspec is: + // host[:port][/namespace]/name: or svc_name.namespace.svc[:port]/repository/name: + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[1].matches('^([a-zA-Z0-9-./:])+$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image reference must end with a valid :, where '' is 64 characters long and '' is any valid string Or it must be a valid .svc followed by a port, repository, image name, and tag." + // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme. Or it must be a valid .svc followed by a port, repository, image name, and tag." + // +kubebuilder:validation:Required + RenderedImagePushspec string `json:"renderedImagePushspec"` +} + +// MachineOSBuildStatus describes the state of a build and other helpful information. +type MachineOSBuildStatus struct { + // conditions are state related conditions for the build. Valid types are: + // Prepared, Building, Failed, Interrupted, and Succeeded + // once a Build is marked as Failed, no future conditions can be set. This is enforced by the MCO. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // ImageBuilderType describes the image builder set in the MachineOSConfig + // +optional + BuilderReference *MachineOSBuilderReference `json:"builderReference"` + // relatedObjects is a list of objects that are related to the build process. + RelatedObjects []ObjectReference `json:"relatedObjects,omitempty"` + // buildStart describes when the build started. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="buildStart is immutable once set" + // +kubebuilder:validation:Required + BuildStart *metav1.Time `json:"buildStart"` + // buildEnd describes when the build ended. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="buildEnd is immutable once set" + //+optional + BuildEnd *metav1.Time `json:"buildEnd,omitempty"` + // finalImagePushSpec describes the fully qualified pushspec produced by this build that the final image can be. Must be in sha format. + // +kubebuilder:validation:XValidation:rule=`((self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +optional + FinalImagePushspec string `json:"finalImagePullspec,omitempty"` +} + +// MachineOSBuilderReference describes which ImageBuilder backend to use for this build/ +// +union +// +kubebuilder:validation:XValidation:rule="has(self.imageBuilderType) && self.imageBuilderType == 'PodImageBuilder' ? true : !has(self.buildPod)",message="buildPod is required when imageBuilderType is PodImageBuilder, and forbidden otherwise" +type MachineOSBuilderReference struct { + // ImageBuilderType describes the image builder set in the MachineOSConfig + // +unionDiscriminator + ImageBuilderType MachineOSImageBuilderType `json:"imageBuilderType"` + + // relatedObjects is a list of objects that are related to the build process. + // +unionMember,optional + PodImageBuilder *ObjectReference `json:"buildPod,omitempty"` +} + +// BuildProgess highlights some of the key phases of a build to be tracked in Conditions. +type BuildProgress string + +const ( + // prepared indicates that the build has finished preparing. A build is prepared + // by gathering the build inputs, validating them, and making sure we can do an update as specified. + MachineOSBuildPrepared BuildProgress = "Prepared" + // building indicates that the build has been kicked off with the specified image builder + MachineOSBuilding BuildProgress = "Building" + // failed indicates that during the build or preparation process, the build failed. + MachineOSBuildFailed BuildProgress = "Failed" + // interrupted indicates that the user stopped the build process by modifying part of the build config + MachineOSBuildInterrupted BuildProgress = "Interrupted" + // succeeded indicates that the build has completed and the image is ready to roll out. + MachineOSBuildSucceeded BuildProgress = "Succeeded" +) + +// Refers to the name of a rendered MachineConfig (e.g., "rendered-worker-ec40d2965ff81bce7cd7a7e82a680739", etc.): +// the build targets this MachineConfig, this is often used to tell us whether we need an update. +type RenderedMachineConfigReference struct { + // name is the name of the rendered MachineConfig object. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Name string `json:"name"` +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +type ObjectReference struct { + // group of the referent. + // +kubebuilder:validation:Required + Group string `json:"group"` + // resource of the referent. + // +kubebuilder:validation:Required + Resource string `json:"resource"` + // namespace of the referent. + // +optional + Namespace string `json:"namespace,omitempty"` + // name of the referent. + // +kubebuilder:validation:Required + Name string `json:"name"` +} + +// MachineOSConfigReference refers to the MachineOSConfig this build is based off of +type MachineOSConfigReference struct { + // name of the MachineOSConfig + // +kubebuilder:validation:Required + Name string `json:"name"` +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosconfig.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosconfig.go new file mode 100644 index 0000000000..35863517a5 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosconfig.go @@ -0,0 +1,227 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machineosconfigs,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1773 +// +openshift:enable:FeatureGate=OnClusterBuild +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +kubebuilder:metadata:labels=openshift.io/operator-managed= + +// MachineOSConfig describes the configuration for a build process managed by the MCO +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type MachineOSConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec describes the configuration of the machineosconfig + // +kubebuilder:validation:Required + Spec MachineOSConfigSpec `json:"spec"` + + // status describes the status of the machineosconfig + // +optional + Status MachineOSConfigStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineOSConfigList describes all configurations for image builds on the system +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type MachineOSConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []MachineOSConfig `json:"items"` +} + +// MachineOSConfigSpec describes user-configurable options as well as information about a build process. +type MachineOSConfigSpec struct { + // machineConfigPool is the pool which the build is for + // +kubebuilder:validation:Required + MachineConfigPool MachineConfigPoolReference `json:"machineConfigPool"` + // buildInputs is where user input options for the build live + // +kubebuilder:validation:Required + BuildInputs BuildInputs `json:"buildInputs"` + // buildOutputs is where user input options for the build live + // +optional + BuildOutputs BuildOutputs `json:"buildOutputs,omitempty"` +} + +// MachineOSConfigStatus describes the status this config object and relates it to the builds associated with this MachineOSConfig +type MachineOSConfigStatus struct { + // conditions are state related conditions for the config. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // observedGeneration represents the generation observed by the controller. + // this field is updated when the user changes the configuration in BuildSettings or the MCP this object is associated with. + // +kubebuilder:validation:Required + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // currentImagePullspec is the fully qualified image pull spec used by the MCO to pull down the new OSImage. This must include sha256. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" + // +optional + CurrentImagePullspec string `json:"currentImagePullspec,omitempty"` +} + +// BuildInputs holds all of the information needed to trigger a build +type BuildInputs struct { + // baseOSExtensionsImagePullspec is the base Extensions image used in the build process + // the MachineOSConfig object will use the in cluster image registry configuration. + // if you wish to use a mirror or any other settings specific to registries.conf, please specify those in the cluster wide registries.conf. + // The format of the image pullspec is: + // host[:port][/namespace]/name@sha256: + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" + // +optional + BaseOSExtensionsImagePullspec string `json:"baseOSExtensionsImagePullspec,omitempty"` + // baseOSImagePullspec is the base OSImage we use to build our custom image. + // the MachineOSConfig object will use the in cluster image registry configuration. + // if you wish to use a mirror or any other settings specific to registries.conf, please specify those in the cluster wide registries.conf. + // The format of the image pullspec is: + // host[:port][/namespace]/name@sha256: + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" + // +optional + BaseOSImagePullspec string `json:"baseOSImagePullspec,omitempty"` + // baseImagePullSecret is the secret used to pull the base image. + // must live in the openshift-machine-config-operator namespace + // +kubebuilder:validation:Required + BaseImagePullSecret ImageSecretObjectReference `json:"baseImagePullSecret"` + // machineOSImageBuilder describes which image builder will be used in each build triggered by this MachineOSConfig + // +kubebuilder:validation:Required + ImageBuilder *MachineOSImageBuilder `json:"imageBuilder"` + // renderedImagePushSecret is the secret used to connect to a user registry. + // the final image push and pull secrets should be separate for security concerns. If the final image push secret is somehow exfiltrated, + // that gives someone the power to push images to the image repository. By comparison, if the final image pull secret gets exfiltrated, + // that only gives someone to pull images from the image repository. It's basically the principle of least permissions. + // this push secret will be used only by the MachineConfigController pod to push the image to the final destination. Not all nodes will need to push this image, most of them + // will only need to pull the image in order to use it. + // +kubebuilder:validation:Required + RenderedImagePushSecret ImageSecretObjectReference `json:"renderedImagePushSecret"` + // renderedImagePushspec describes the location of the final image. + // the MachineOSConfig object will use the in cluster image registry configuration. + // if you wish to use a mirror or any other settings specific to registries.conf, please specify those in the cluster wide registries.conf. + // The format of the image pushspec is: + // host[:port][/namespace]/name: or svc_name.namespace.svc[:port]/repository/name: + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[1].matches('^([a-zA-Z0-9-./:])+$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image reference must end with a valid :, where '' is 64 characters long and '' is any valid string Or it must be a valid .svc followed by a port, repository, image name, and tag." + // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme. Or it must be a valid .svc followed by a port, repository, image name, and tag." + // +kubebuilder:validation:Required + RenderedImagePushspec string `json:"renderedImagePushspec"` + // releaseVersion is associated with the base OS Image. This is the version of Openshift that the Base Image is associated with. + // This field is populated from the machine-config-osimageurl configmap in the openshift-machine-config-operator namespace. + // It will come in the format: 4.16.0-0.nightly-2024-04-03-065948 or any valid release. The MachineOSBuilder populates this field and validates that this is a valid stream. + // This is used as a label in the dockerfile that builds the OS image. + // +optional + ReleaseVersion string `json:"releaseVersion,omitempty"` + // containerFile describes the custom data the user has specified to build into the image. + // this is also commonly called a Dockerfile and you can treat it as such. The content is the content of your Dockerfile. + // +patchMergeKey=containerfileArch + // +patchStrategy=merge + // +listType=map + // +listMapKey=containerfileArch + // +kubebuilder:validation:MinItems=0 + // +kubebuilder:validation:MaxItems=7 + // +optional + Containerfile []MachineOSContainerfile `json:"containerFile" patchStrategy:"merge" patchMergeKey:"containerfileArch"` +} + +// BuildOutputs holds all information needed to handle booting the image after a build +// +union +type BuildOutputs struct { + // currentImagePullSecret is the secret used to pull the final produced image. + // must live in the openshift-machine-config-operator namespace + // the final image push and pull secrets should be separate for security concerns. If the final image push secret is somehow exfiltrated, + // that gives someone the power to push images to the image repository. By comparison, if the final image pull secret gets exfiltrated, + // that only gives someone to pull images from the image repository. It's basically the principle of least permissions. + // this pull secret will be used on all nodes in the pool. These nodes will need to pull the final OS image and boot into it using rpm-ostree or bootc. + // +optional + CurrentImagePullSecret ImageSecretObjectReference `json:"currentImagePullSecret,omitempty"` +} + +type MachineOSImageBuilder struct { + // imageBuilderType specifies the backend to be used to build the image. + // +kubebuilder:default:=PodImageBuilder + // +kubebuilder:validation:Enum:=PodImageBuilder + // Valid options are: PodImageBuilder + ImageBuilderType MachineOSImageBuilderType `json:"imageBuilderType"` +} + +// MachineOSContainerfile contains all custom content the user wants built into the image +type MachineOSContainerfile struct { + // containerfileArch describes the architecture this containerfile is to be built for + // this arch is optional. If the user does not specify an architecture, it is assumed + // that the content can be applied to all architectures, or in a single arch cluster: the only architecture. + // +kubebuilder:validation:Enum:=arm64;amd64;ppc64le;s390x;aarch64;x86_64;noarch + // +kubebuilder:default:=noarch + // +optional + ContainerfileArch ContainerfileArch `json:"containerfileArch"` + // content is the custom content to be built + // +kubebuilder:validation:Required + Content string `json:"content"` +} + +type ContainerfileArch string + +const ( + // describes the arm64 architecture + Arm64 ContainerfileArch = "arm64" + // describes the amd64 architecture + Amd64 ContainerfileArch = "amd64" + // describes the ppc64le architecture + Ppc ContainerfileArch = "ppc64le" + // describes the s390x architecture + S390 ContainerfileArch = "s390x" + // describes the aarch64 architecture + Aarch64 ContainerfileArch = "aarch64" + // describes the fx86_64 architecture + X86_64 ContainerfileArch = "x86_64" + // describes a containerfile that can be applied to any arch + NoArch ContainerfileArch = "noarch" +) + +// Refers to the name of a MachineConfigPool (e.g., "worker", "infra", etc.): +// the MachineOSBuilder pod validates that the user has provided a valid pool +type MachineConfigPoolReference struct { + // name of the MachineConfigPool object. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +kubebuilder:validation:Required + Name string `json:"name"` +} + +// Refers to the name of an image registry push/pull secret needed in the build process. +type ImageSecretObjectReference struct { + // name is the name of the secret used to push or pull this MachineOSConfig object. + // this secret must be in the openshift-machine-config-operator namespace. + // +kubebuilder:validation:Required + Name string `json:"name"` +} + +type MachineOSImageBuilderType string + +const ( + // describes that the machine-os-builder will use a custom pod builder that uses buildah + PodBuilder MachineOSImageBuilderType = "PodImageBuilder" +) diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go new file mode 100644 index 0000000000..2718d98deb --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go @@ -0,0 +1,96 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=pinnedimagesets,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1713 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +openshift:enable:FeatureGate=PinnedImages +// +kubebuilder:metadata:labels=openshift.io/operator-managed= + +// PinnedImageSet describes a set of images that should be pinned by CRI-O and +// pulled to the nodes which are members of the declared MachineConfigPools. +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type PinnedImageSet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec describes the configuration of this pinned image set. + // +kubebuilder:validation:Required + Spec PinnedImageSetSpec `json:"spec"` + + // status describes the last observed state of this pinned image set. + // +optional + Status PinnedImageSetStatus `json:"status"` +} + +// PinnedImageSetStatus describes the current state of a PinnedImageSet. +type PinnedImageSetStatus struct { + // conditions represent the observations of a pinned image set's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` +} + +// PinnedImageSetSpec defines the desired state of a PinnedImageSet. +type PinnedImageSetSpec struct { + // pinnedImages is a list of OCI Image referenced by digest that should be + // pinned and pre-loaded by the nodes of a MachineConfigPool. + // Translates into a new file inside the /etc/crio/crio.conf.d directory + // with content similar to this: + // + // pinned_images = [ + // "quay.io/openshift-release-dev/ocp-release@sha256:...", + // "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...", + // "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...", + // ... + // ] + // + // These image references should all be by digest, tags aren't allowed. + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=500 + // +listType=map + // +listMapKey=name + PinnedImages []PinnedImageRef `json:"pinnedImages"` +} + +type PinnedImageRef struct { + // name is an OCI Image referenced by digest. + // + // The format of the image ref is: + // host[:port][/namespace]/name@sha256: + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +kubebuilder:validation:XValidation:rule=`self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" + Name string `json:"name"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PinnedImageSetList is a list of PinnedImageSet resources +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type PinnedImageSetList struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard list's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ListMeta `json:"metadata"` + + Items []PinnedImageSet `json:"items"` +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..c8363d128e --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,734 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BuildInputs) DeepCopyInto(out *BuildInputs) { + *out = *in + out.BaseImagePullSecret = in.BaseImagePullSecret + if in.ImageBuilder != nil { + in, out := &in.ImageBuilder, &out.ImageBuilder + *out = new(MachineOSImageBuilder) + **out = **in + } + out.RenderedImagePushSecret = in.RenderedImagePushSecret + if in.Containerfile != nil { + in, out := &in.Containerfile, &out.Containerfile + *out = make([]MachineOSContainerfile, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildInputs. +func (in *BuildInputs) DeepCopy() *BuildInputs { + if in == nil { + return nil + } + out := new(BuildInputs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BuildOutputs) DeepCopyInto(out *BuildOutputs) { + *out = *in + out.CurrentImagePullSecret = in.CurrentImagePullSecret + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildOutputs. +func (in *BuildOutputs) DeepCopy() *BuildOutputs { + if in == nil { + return nil + } + out := new(BuildOutputs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageSecretObjectReference) DeepCopyInto(out *ImageSecretObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSecretObjectReference. +func (in *ImageSecretObjectReference) DeepCopy() *ImageSecretObjectReference { + if in == nil { + return nil + } + out := new(ImageSecretObjectReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MCOObjectReference) DeepCopyInto(out *MCOObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MCOObjectReference. +func (in *MCOObjectReference) DeepCopy() *MCOObjectReference { + if in == nil { + return nil + } + out := new(MCOObjectReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNode) DeepCopyInto(out *MachineConfigNode) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNode. +func (in *MachineConfigNode) DeepCopy() *MachineConfigNode { + if in == nil { + return nil + } + out := new(MachineConfigNode) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigNode) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeList) DeepCopyInto(out *MachineConfigNodeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineConfigNode, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeList. +func (in *MachineConfigNodeList) DeepCopy() *MachineConfigNodeList { + if in == nil { + return nil + } + out := new(MachineConfigNodeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigNodeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeSpec) DeepCopyInto(out *MachineConfigNodeSpec) { + *out = *in + out.Node = in.Node + out.Pool = in.Pool + out.ConfigVersion = in.ConfigVersion + if in.PinnedImageSets != nil { + in, out := &in.PinnedImageSets, &out.PinnedImageSets + *out = make([]MachineConfigNodeSpecPinnedImageSet, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeSpec. +func (in *MachineConfigNodeSpec) DeepCopy() *MachineConfigNodeSpec { + if in == nil { + return nil + } + out := new(MachineConfigNodeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeSpecMachineConfigVersion) DeepCopyInto(out *MachineConfigNodeSpecMachineConfigVersion) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeSpecMachineConfigVersion. +func (in *MachineConfigNodeSpecMachineConfigVersion) DeepCopy() *MachineConfigNodeSpecMachineConfigVersion { + if in == nil { + return nil + } + out := new(MachineConfigNodeSpecMachineConfigVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeSpecPinnedImageSet) DeepCopyInto(out *MachineConfigNodeSpecPinnedImageSet) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeSpecPinnedImageSet. +func (in *MachineConfigNodeSpecPinnedImageSet) DeepCopy() *MachineConfigNodeSpecPinnedImageSet { + if in == nil { + return nil + } + out := new(MachineConfigNodeSpecPinnedImageSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatus) DeepCopyInto(out *MachineConfigNodeStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + out.ConfigVersion = in.ConfigVersion + if in.PinnedImageSets != nil { + in, out := &in.PinnedImageSets, &out.PinnedImageSets + *out = make([]MachineConfigNodeStatusPinnedImageSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatus. +func (in *MachineConfigNodeStatus) DeepCopy() *MachineConfigNodeStatus { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatusMachineConfigVersion) DeepCopyInto(out *MachineConfigNodeStatusMachineConfigVersion) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatusMachineConfigVersion. +func (in *MachineConfigNodeStatusMachineConfigVersion) DeepCopy() *MachineConfigNodeStatusMachineConfigVersion { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatusMachineConfigVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatusPinnedImageSet) DeepCopyInto(out *MachineConfigNodeStatusPinnedImageSet) { + *out = *in + if in.LastFailedGenerationErrors != nil { + in, out := &in.LastFailedGenerationErrors, &out.LastFailedGenerationErrors + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatusPinnedImageSet. +func (in *MachineConfigNodeStatusPinnedImageSet) DeepCopy() *MachineConfigNodeStatusPinnedImageSet { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatusPinnedImageSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigPoolReference) DeepCopyInto(out *MachineConfigPoolReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigPoolReference. +func (in *MachineConfigPoolReference) DeepCopy() *MachineConfigPoolReference { + if in == nil { + return nil + } + out := new(MachineConfigPoolReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSBuild) DeepCopyInto(out *MachineOSBuild) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSBuild. +func (in *MachineOSBuild) DeepCopy() *MachineOSBuild { + if in == nil { + return nil + } + out := new(MachineOSBuild) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineOSBuild) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSBuildList) DeepCopyInto(out *MachineOSBuildList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineOSBuild, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSBuildList. +func (in *MachineOSBuildList) DeepCopy() *MachineOSBuildList { + if in == nil { + return nil + } + out := new(MachineOSBuildList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineOSBuildList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSBuildSpec) DeepCopyInto(out *MachineOSBuildSpec) { + *out = *in + out.DesiredConfig = in.DesiredConfig + out.MachineOSConfig = in.MachineOSConfig + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSBuildSpec. +func (in *MachineOSBuildSpec) DeepCopy() *MachineOSBuildSpec { + if in == nil { + return nil + } + out := new(MachineOSBuildSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSBuildStatus) DeepCopyInto(out *MachineOSBuildStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BuilderReference != nil { + in, out := &in.BuilderReference, &out.BuilderReference + *out = new(MachineOSBuilderReference) + (*in).DeepCopyInto(*out) + } + if in.RelatedObjects != nil { + in, out := &in.RelatedObjects, &out.RelatedObjects + *out = make([]ObjectReference, len(*in)) + copy(*out, *in) + } + if in.BuildStart != nil { + in, out := &in.BuildStart, &out.BuildStart + *out = (*in).DeepCopy() + } + if in.BuildEnd != nil { + in, out := &in.BuildEnd, &out.BuildEnd + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSBuildStatus. +func (in *MachineOSBuildStatus) DeepCopy() *MachineOSBuildStatus { + if in == nil { + return nil + } + out := new(MachineOSBuildStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSBuilderReference) DeepCopyInto(out *MachineOSBuilderReference) { + *out = *in + if in.PodImageBuilder != nil { + in, out := &in.PodImageBuilder, &out.PodImageBuilder + *out = new(ObjectReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSBuilderReference. +func (in *MachineOSBuilderReference) DeepCopy() *MachineOSBuilderReference { + if in == nil { + return nil + } + out := new(MachineOSBuilderReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSConfig) DeepCopyInto(out *MachineOSConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSConfig. +func (in *MachineOSConfig) DeepCopy() *MachineOSConfig { + if in == nil { + return nil + } + out := new(MachineOSConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineOSConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSConfigList) DeepCopyInto(out *MachineOSConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineOSConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSConfigList. +func (in *MachineOSConfigList) DeepCopy() *MachineOSConfigList { + if in == nil { + return nil + } + out := new(MachineOSConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineOSConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSConfigReference) DeepCopyInto(out *MachineOSConfigReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSConfigReference. +func (in *MachineOSConfigReference) DeepCopy() *MachineOSConfigReference { + if in == nil { + return nil + } + out := new(MachineOSConfigReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSConfigSpec) DeepCopyInto(out *MachineOSConfigSpec) { + *out = *in + out.MachineConfigPool = in.MachineConfigPool + in.BuildInputs.DeepCopyInto(&out.BuildInputs) + out.BuildOutputs = in.BuildOutputs + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSConfigSpec. +func (in *MachineOSConfigSpec) DeepCopy() *MachineOSConfigSpec { + if in == nil { + return nil + } + out := new(MachineOSConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSConfigStatus) DeepCopyInto(out *MachineOSConfigStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSConfigStatus. +func (in *MachineOSConfigStatus) DeepCopy() *MachineOSConfigStatus { + if in == nil { + return nil + } + out := new(MachineOSConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSContainerfile) DeepCopyInto(out *MachineOSContainerfile) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSContainerfile. +func (in *MachineOSContainerfile) DeepCopy() *MachineOSContainerfile { + if in == nil { + return nil + } + out := new(MachineOSContainerfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineOSImageBuilder) DeepCopyInto(out *MachineOSImageBuilder) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineOSImageBuilder. +func (in *MachineOSImageBuilder) DeepCopy() *MachineOSImageBuilder { + if in == nil { + return nil + } + out := new(MachineOSImageBuilder) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. +func (in *ObjectReference) DeepCopy() *ObjectReference { + if in == nil { + return nil + } + out := new(ObjectReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PinnedImageRef) DeepCopyInto(out *PinnedImageRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnedImageRef. +func (in *PinnedImageRef) DeepCopy() *PinnedImageRef { + if in == nil { + return nil + } + out := new(PinnedImageRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PinnedImageSet) DeepCopyInto(out *PinnedImageSet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnedImageSet. +func (in *PinnedImageSet) DeepCopy() *PinnedImageSet { + if in == nil { + return nil + } + out := new(PinnedImageSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PinnedImageSet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PinnedImageSetList) DeepCopyInto(out *PinnedImageSetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PinnedImageSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnedImageSetList. +func (in *PinnedImageSetList) DeepCopy() *PinnedImageSetList { + if in == nil { + return nil + } + out := new(PinnedImageSetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PinnedImageSetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PinnedImageSetSpec) DeepCopyInto(out *PinnedImageSetSpec) { + *out = *in + if in.PinnedImages != nil { + in, out := &in.PinnedImages, &out.PinnedImages + *out = make([]PinnedImageRef, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnedImageSetSpec. +func (in *PinnedImageSetSpec) DeepCopy() *PinnedImageSetSpec { + if in == nil { + return nil + } + out := new(PinnedImageSetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PinnedImageSetStatus) DeepCopyInto(out *PinnedImageSetStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnedImageSetStatus. +func (in *PinnedImageSetStatus) DeepCopy() *PinnedImageSetStatus { + if in == nil { + return nil + } + out := new(PinnedImageSetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RenderedMachineConfigReference) DeepCopyInto(out *RenderedMachineConfigReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RenderedMachineConfigReference. +func (in *RenderedMachineConfigReference) DeepCopy() *RenderedMachineConfigReference { + if in == nil { + return nil + } + out := new(RenderedMachineConfigReference) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml new file mode 100644 index 0000000000..68c8828e55 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml @@ -0,0 +1,157 @@ +machineconfignodes.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1596 + CRDName: machineconfignodes.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - MachineConfigNodes + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: MachineConfigNode + Labels: + openshift.io/operator-managed: "" + PluralName: machineconfignodes + PrinterColumns: + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status + name: UpdateCompatible + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status + name: ReloadedCRIO + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - MachineConfigNodes + Version: v1alpha1 + +machineosbuilds.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1773 + CRDName: machineosbuilds.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - OnClusterBuild + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: MachineOSBuild + Labels: + openshift.io/operator-managed: "" + PluralName: machineosbuilds + PrinterColumns: + - jsonPath: .status.conditions[?(@.type=="Prepared")].status + name: Prepared + type: string + - jsonPath: .status.conditions[?(@.type=="Building")].status + name: Building + type: string + - jsonPath: .status.conditions[?(@.type=="Succeeded")].status + name: Succeeded + type: string + - jsonPath: .status.conditions[?(@.type=="Interrupted")].status + name: Interrupted + type: string + - jsonPath: .status.conditions[?(@.type=="Failed")].status + name: Failed + type: string + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - OnClusterBuild + Version: v1alpha1 + +machineosconfigs.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1773 + CRDName: machineosconfigs.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - OnClusterBuild + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: MachineOSConfig + Labels: + openshift.io/operator-managed: "" + PluralName: machineosconfigs + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - OnClusterBuild + Version: v1alpha1 + +pinnedimagesets.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/1713 + CRDName: pinnedimagesets.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - PinnedImages + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: PinnedImageSet + Labels: + openshift.io/operator-managed: "" + PluralName: pinnedimagesets + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - PinnedImages + Version: v1alpha1 + diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go new file mode 100644 index 0000000000..a51ffee142 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,335 @@ +package v1alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_MCOObjectReference = map[string]string{ + "": "MCOObjectReference holds information about an object the MCO either owns or modifies in some way", + "name": "name is the object name. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", +} + +func (MCOObjectReference) SwaggerDoc() map[string]string { + return map_MCOObjectReference +} + +var map_MachineConfigNode = map[string]string{ + "": "MachineConfigNode describes the health of the Machines on the system Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "spec": "spec describes the configuration of the machine config node.", + "status": "status describes the last observed state of this machine config node.", +} + +func (MachineConfigNode) SwaggerDoc() map[string]string { + return map_MachineConfigNode +} + +var map_MachineConfigNodeList = map[string]string{ + "": "MachineConfigNodeList describes all of the MachinesStates on the system\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", +} + +func (MachineConfigNodeList) SwaggerDoc() map[string]string { + return map_MachineConfigNodeList +} + +var map_MachineConfigNodeSpec = map[string]string{ + "": "MachineConfigNodeSpec describes the MachineConfigNode we are managing.", + "node": "node contains a reference to the node for this machine config node.", + "pool": "pool contains a reference to the machine config pool that this machine config node's referenced node belongs to.", + "configVersion": "configVersion holds the desired config version for the node targeted by this machine config node resource. The desired version represents the machine config the node will attempt to update to. This gets set before the machine config operator validates the new machine config against the current machine config.", + "pinnedImageSets": "pinnedImageSets holds the desired pinned image sets that this node should pin and pull.", +} + +func (MachineConfigNodeSpec) SwaggerDoc() map[string]string { + return map_MachineConfigNodeSpec +} + +var map_MachineConfigNodeSpecMachineConfigVersion = map[string]string{ + "": "MachineConfigNodeSpecMachineConfigVersion holds the desired config version for the current observed machine config node. When Current is not equal to Desired; the MachineConfigOperator is in an upgrade phase and the machine config node will take account of upgrade related events. Otherwise they will be ignored given that certain operations happen both during the MCO's upgrade mode and the daily operations mode.", + "desired": "desired is the name of the machine config that the the node should be upgraded to. This value is set when the machine config pool generates a new version of its rendered configuration. When this value is changed, the machine config daemon starts the node upgrade process. This value gets set in the machine config node spec once the machine config has been targeted for upgrade and before it is validated. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", +} + +func (MachineConfigNodeSpecMachineConfigVersion) SwaggerDoc() map[string]string { + return map_MachineConfigNodeSpecMachineConfigVersion +} + +var map_MachineConfigNodeSpecPinnedImageSet = map[string]string{ + "name": "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", +} + +func (MachineConfigNodeSpecPinnedImageSet) SwaggerDoc() map[string]string { + return map_MachineConfigNodeSpecPinnedImageSet +} + +var map_MachineConfigNodeStatus = map[string]string{ + "": "MachineConfigNodeStatus holds the reported information on a particular machine config node.", + "conditions": "conditions represent the observations of a machine config node's current state.", + "observedGeneration": "observedGeneration represents the generation observed by the controller. This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.", + "configVersion": "configVersion describes the current and desired machine config for this node. The current version represents the current machine config for the node and is updated after a successful update. The desired version represents the machine config the node will attempt to update to. This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists.", + "pinnedImageSets": "pinnedImageSets describes the current and desired pinned image sets for this node. The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", +} + +func (MachineConfigNodeStatus) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatus +} + +var map_MachineConfigNodeStatusMachineConfigVersion = map[string]string{ + "": "MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. When the current and desired versions are not matched, the machine config pool is processing an upgrade and the machine config node will monitor the upgrade process. When the current and desired versions do not match, the machine config node will ignore these events given that certain operations happen both during the MCO's upgrade mode and the daily operations mode.", + "current": "current is the name of the machine config currently in use on the node. This value is updated once the machine config daemon has completed the update of the configuration for the node. This value should match the desired version unless an upgrade is in progress. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "desired": "desired is the MachineConfig the node wants to upgrade to. This value gets set in the machine config node status once the machine config has been validated against the current machine config. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", +} + +func (MachineConfigNodeStatusMachineConfigVersion) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatusMachineConfigVersion +} + +var map_MachineConfigNodeStatusPinnedImageSet = map[string]string{ + "name": "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "currentGeneration": "currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node.", + "desiredGeneration": "desiredGeneration version is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", + "lastFailedGeneration": "lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned on this node.", + "lastFailedGenerationErrors": "lastFailedGenerationErrors is a list of errors why the lastFailed generation failed to be pulled and pinned.", +} + +func (MachineConfigNodeStatusPinnedImageSet) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatusPinnedImageSet +} + +var map_MachineOSBuild = map[string]string{ + "": "MachineOSBuild describes a build process managed and deployed by the MCO Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "spec": "spec describes the configuration of the machine os build", + "status": "status describes the lst observed state of this machine os build", +} + +func (MachineOSBuild) SwaggerDoc() map[string]string { + return map_MachineOSBuild +} + +var map_MachineOSBuildList = map[string]string{ + "": "MachineOSBuildList describes all of the Builds on the system\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", +} + +func (MachineOSBuildList) SwaggerDoc() map[string]string { + return map_MachineOSBuildList +} + +var map_MachineOSBuildSpec = map[string]string{ + "": "MachineOSBuildSpec describes information about a build process primarily populated from a MachineOSConfig object.", + "configGeneration": "configGeneration tracks which version of MachineOSConfig this build is based off of", + "desiredConfig": "desiredConfig is the desired config we want to build an image for.", + "machineOSConfig": "machineOSConfig is the config object which the build is based off of", + "version": "version tracks the newest MachineOSBuild for each MachineOSConfig", + "renderedImagePushspec": "renderedImagePushspec is set from the MachineOSConfig The format of the image pullspec is: host[:port][/namespace]/name: or svc_name.namespace.svc[:port]/repository/name:", +} + +func (MachineOSBuildSpec) SwaggerDoc() map[string]string { + return map_MachineOSBuildSpec +} + +var map_MachineOSBuildStatus = map[string]string{ + "": "MachineOSBuildStatus describes the state of a build and other helpful information.", + "conditions": "conditions are state related conditions for the build. Valid types are: Prepared, Building, Failed, Interrupted, and Succeeded once a Build is marked as Failed, no future conditions can be set. This is enforced by the MCO.", + "builderReference": "ImageBuilderType describes the image builder set in the MachineOSConfig", + "relatedObjects": "relatedObjects is a list of objects that are related to the build process.", + "buildStart": "buildStart describes when the build started.", + "buildEnd": "buildEnd describes when the build ended.", + "finalImagePullspec": "finalImagePushSpec describes the fully qualified pushspec produced by this build that the final image can be. Must be in sha format.", +} + +func (MachineOSBuildStatus) SwaggerDoc() map[string]string { + return map_MachineOSBuildStatus +} + +var map_MachineOSBuilderReference = map[string]string{ + "": "MachineOSBuilderReference describes which ImageBuilder backend to use for this build/", + "imageBuilderType": "ImageBuilderType describes the image builder set in the MachineOSConfig", + "buildPod": "relatedObjects is a list of objects that are related to the build process.", +} + +func (MachineOSBuilderReference) SwaggerDoc() map[string]string { + return map_MachineOSBuilderReference +} + +var map_MachineOSConfigReference = map[string]string{ + "": "MachineOSConfigReference refers to the MachineOSConfig this build is based off of", + "name": "name of the MachineOSConfig", +} + +func (MachineOSConfigReference) SwaggerDoc() map[string]string { + return map_MachineOSConfigReference +} + +var map_ObjectReference = map[string]string{ + "": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "group": "group of the referent.", + "resource": "resource of the referent.", + "namespace": "namespace of the referent.", + "name": "name of the referent.", +} + +func (ObjectReference) SwaggerDoc() map[string]string { + return map_ObjectReference +} + +var map_RenderedMachineConfigReference = map[string]string{ + "": "Refers to the name of a rendered MachineConfig (e.g., \"rendered-worker-ec40d2965ff81bce7cd7a7e82a680739\", etc.): the build targets this MachineConfig, this is often used to tell us whether we need an update.", + "name": "name is the name of the rendered MachineConfig object.", +} + +func (RenderedMachineConfigReference) SwaggerDoc() map[string]string { + return map_RenderedMachineConfigReference +} + +var map_BuildInputs = map[string]string{ + "": "BuildInputs holds all of the information needed to trigger a build", + "baseOSExtensionsImagePullspec": "baseOSExtensionsImagePullspec is the base Extensions image used in the build process the MachineOSConfig object will use the in cluster image registry configuration. if you wish to use a mirror or any other settings specific to registries.conf, please specify those in the cluster wide registries.conf. The format of the image pullspec is: host[:port][/namespace]/name@sha256:", + "baseOSImagePullspec": "baseOSImagePullspec is the base OSImage we use to build our custom image. the MachineOSConfig object will use the in cluster image registry configuration. if you wish to use a mirror or any other settings specific to registries.conf, please specify those in the cluster wide registries.conf. The format of the image pullspec is: host[:port][/namespace]/name@sha256:", + "baseImagePullSecret": "baseImagePullSecret is the secret used to pull the base image. must live in the openshift-machine-config-operator namespace", + "imageBuilder": "machineOSImageBuilder describes which image builder will be used in each build triggered by this MachineOSConfig", + "renderedImagePushSecret": "renderedImagePushSecret is the secret used to connect to a user registry. the final image push and pull secrets should be separate for security concerns. If the final image push secret is somehow exfiltrated, that gives someone the power to push images to the image repository. By comparison, if the final image pull secret gets exfiltrated, that only gives someone to pull images from the image repository. It's basically the principle of least permissions. this push secret will be used only by the MachineConfigController pod to push the image to the final destination. Not all nodes will need to push this image, most of them will only need to pull the image in order to use it.", + "renderedImagePushspec": "renderedImagePushspec describes the location of the final image. the MachineOSConfig object will use the in cluster image registry configuration. if you wish to use a mirror or any other settings specific to registries.conf, please specify those in the cluster wide registries.conf. The format of the image pushspec is: host[:port][/namespace]/name: or svc_name.namespace.svc[:port]/repository/name:", + "releaseVersion": "releaseVersion is associated with the base OS Image. This is the version of Openshift that the Base Image is associated with. This field is populated from the machine-config-osimageurl configmap in the openshift-machine-config-operator namespace. It will come in the format: 4.16.0-0.nightly-2024-04-03-065948 or any valid release. The MachineOSBuilder populates this field and validates that this is a valid stream. This is used as a label in the dockerfile that builds the OS image.", + "containerFile": "containerFile describes the custom data the user has specified to build into the image. this is also commonly called a Dockerfile and you can treat it as such. The content is the content of your Dockerfile.", +} + +func (BuildInputs) SwaggerDoc() map[string]string { + return map_BuildInputs +} + +var map_BuildOutputs = map[string]string{ + "": "BuildOutputs holds all information needed to handle booting the image after a build", + "currentImagePullSecret": "currentImagePullSecret is the secret used to pull the final produced image. must live in the openshift-machine-config-operator namespace the final image push and pull secrets should be separate for security concerns. If the final image push secret is somehow exfiltrated, that gives someone the power to push images to the image repository. By comparison, if the final image pull secret gets exfiltrated, that only gives someone to pull images from the image repository. It's basically the principle of least permissions. this pull secret will be used on all nodes in the pool. These nodes will need to pull the final OS image and boot into it using rpm-ostree or bootc.", +} + +func (BuildOutputs) SwaggerDoc() map[string]string { + return map_BuildOutputs +} + +var map_ImageSecretObjectReference = map[string]string{ + "": "Refers to the name of an image registry push/pull secret needed in the build process.", + "name": "name is the name of the secret used to push or pull this MachineOSConfig object. this secret must be in the openshift-machine-config-operator namespace.", +} + +func (ImageSecretObjectReference) SwaggerDoc() map[string]string { + return map_ImageSecretObjectReference +} + +var map_MachineConfigPoolReference = map[string]string{ + "": "Refers to the name of a MachineConfigPool (e.g., \"worker\", \"infra\", etc.): the MachineOSBuilder pod validates that the user has provided a valid pool", + "name": "name of the MachineConfigPool object.", +} + +func (MachineConfigPoolReference) SwaggerDoc() map[string]string { + return map_MachineConfigPoolReference +} + +var map_MachineOSConfig = map[string]string{ + "": "MachineOSConfig describes the configuration for a build process managed by the MCO Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "spec": "spec describes the configuration of the machineosconfig", + "status": "status describes the status of the machineosconfig", +} + +func (MachineOSConfig) SwaggerDoc() map[string]string { + return map_MachineOSConfig +} + +var map_MachineOSConfigList = map[string]string{ + "": "MachineOSConfigList describes all configurations for image builds on the system\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", +} + +func (MachineOSConfigList) SwaggerDoc() map[string]string { + return map_MachineOSConfigList +} + +var map_MachineOSConfigSpec = map[string]string{ + "": "MachineOSConfigSpec describes user-configurable options as well as information about a build process.", + "machineConfigPool": "machineConfigPool is the pool which the build is for", + "buildInputs": "buildInputs is where user input options for the build live", + "buildOutputs": "buildOutputs is where user input options for the build live", +} + +func (MachineOSConfigSpec) SwaggerDoc() map[string]string { + return map_MachineOSConfigSpec +} + +var map_MachineOSConfigStatus = map[string]string{ + "": "MachineOSConfigStatus describes the status this config object and relates it to the builds associated with this MachineOSConfig", + "conditions": "conditions are state related conditions for the config.", + "observedGeneration": "observedGeneration represents the generation observed by the controller. this field is updated when the user changes the configuration in BuildSettings or the MCP this object is associated with.", + "currentImagePullspec": "currentImagePullspec is the fully qualified image pull spec used by the MCO to pull down the new OSImage. This must include sha256.", +} + +func (MachineOSConfigStatus) SwaggerDoc() map[string]string { + return map_MachineOSConfigStatus +} + +var map_MachineOSContainerfile = map[string]string{ + "": "MachineOSContainerfile contains all custom content the user wants built into the image", + "containerfileArch": "containerfileArch describes the architecture this containerfile is to be built for this arch is optional. If the user does not specify an architecture, it is assumed that the content can be applied to all architectures, or in a single arch cluster: the only architecture.", + "content": "content is the custom content to be built", +} + +func (MachineOSContainerfile) SwaggerDoc() map[string]string { + return map_MachineOSContainerfile +} + +var map_MachineOSImageBuilder = map[string]string{ + "imageBuilderType": "imageBuilderType specifies the backend to be used to build the image. Valid options are: PodImageBuilder", +} + +func (MachineOSImageBuilder) SwaggerDoc() map[string]string { + return map_MachineOSImageBuilder +} + +var map_PinnedImageRef = map[string]string{ + "name": "name is an OCI Image referenced by digest.\n\nThe format of the image ref is: host[:port][/namespace]/name@sha256:", +} + +func (PinnedImageRef) SwaggerDoc() map[string]string { + return map_PinnedImageRef +} + +var map_PinnedImageSet = map[string]string{ + "": "PinnedImageSet describes a set of images that should be pinned by CRI-O and pulled to the nodes which are members of the declared MachineConfigPools.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "spec": "spec describes the configuration of this pinned image set.", + "status": "status describes the last observed state of this pinned image set.", +} + +func (PinnedImageSet) SwaggerDoc() map[string]string { + return map_PinnedImageSet +} + +var map_PinnedImageSetList = map[string]string{ + "": "PinnedImageSetList is a list of PinnedImageSet resources\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", +} + +func (PinnedImageSetList) SwaggerDoc() map[string]string { + return map_PinnedImageSetList +} + +var map_PinnedImageSetSpec = map[string]string{ + "": "PinnedImageSetSpec defines the desired state of a PinnedImageSet.", + "pinnedImages": "pinnedImages is a list of OCI Image referenced by digest that should be pinned and pre-loaded by the nodes of a MachineConfigPool. Translates into a new file inside the /etc/crio/crio.conf.d directory with content similar to this:\n\n pinned_images = [\n \"quay.io/openshift-release-dev/ocp-release@sha256:...\",\n \"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...\",\n \"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...\",\n ...\n ]\n\nThese image references should all be by digest, tags aren't allowed.", +} + +func (PinnedImageSetSpec) SwaggerDoc() map[string]string { + return map_PinnedImageSetSpec +} + +var map_PinnedImageSetStatus = map[string]string{ + "": "PinnedImageSetStatus describes the current state of a PinnedImageSet.", + "conditions": "conditions represent the observations of a pinned image set's current state.", +} + +func (PinnedImageSetStatus) SwaggerDoc() map[string]string { + return map_PinnedImageSetStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal/internal.go new file mode 100644 index 0000000000..feda430ace --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal/internal.go @@ -0,0 +1,675 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package internal + +import ( + "fmt" + "sync" + + typed "sigs.k8s.io/structured-merge-diff/v4/typed" +) + +func Parser() *typed.Parser { + parserOnce.Do(func() { + var err error + parser, err = typed.NewParser(schemaYAML) + if err != nil { + panic(fmt.Sprintf("Failed to parse schema: %v", err)) + } + }) + return parser +} + +var parserOnce sync.Once +var parser *typed.Parser +var schemaYAML = typed.YAMLObject(`types: +- name: com.github.openshift.api.machineconfiguration.v1.ContainerRuntimeConfig + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: com.github.openshift.api.machineconfiguration.v1.ControllerConfig + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: com.github.openshift.api.machineconfiguration.v1.KubeletConfig + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: com.github.openshift.api.machineconfiguration.v1.MachineConfig + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: com.github.openshift.api.machineconfiguration.v1.MachineConfigPool + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: com.github.openshift.api.machineconfiguration.v1alpha1.BuildInputs + map: + fields: + - name: baseImagePullSecret + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.ImageSecretObjectReference + default: {} + - name: baseOSExtensionsImagePullspec + type: + scalar: string + - name: baseOSImagePullspec + type: + scalar: string + - name: containerFile + type: + list: + elementType: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSContainerfile + elementRelationship: associative + keys: + - containerfileArch + - name: imageBuilder + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSImageBuilder + - name: releaseVersion + type: + scalar: string + - name: renderedImagePushSecret + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.ImageSecretObjectReference + default: {} + - name: renderedImagePushspec + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.BuildOutputs + map: + fields: + - name: currentImagePullSecret + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.ImageSecretObjectReference + default: {} + unions: + - fields: + - fieldName: currentImagePullSecret + discriminatorValue: CurrentImagePullSecret +- name: com.github.openshift.api.machineconfiguration.v1alpha1.ImageSecretObjectReference + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MCOObjectReference + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNode + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpec + default: {} + - name: status + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatus + default: {} +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpec + map: + fields: + - name: configVersion + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecMachineConfigVersion + default: {} + - name: node + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MCOObjectReference + default: {} + - name: pinnedImageSets + type: + list: + elementType: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecPinnedImageSet + elementRelationship: associative + keys: + - name + - name: pool + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MCOObjectReference + default: {} +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecMachineConfigVersion + map: + fields: + - name: desired + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecPinnedImageSet + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: configVersion + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatusMachineConfigVersion + default: {} + - name: observedGeneration + type: + scalar: numeric + - name: pinnedImageSets + type: + list: + elementType: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatusPinnedImageSet + elementRelationship: associative + keys: + - name +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatusMachineConfigVersion + map: + fields: + - name: current + type: + scalar: string + default: "" + - name: desired + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatusPinnedImageSet + map: + fields: + - name: currentGeneration + type: + scalar: numeric + - name: desiredGeneration + type: + scalar: numeric + - name: lastFailedGeneration + type: + scalar: numeric + - name: lastFailedGenerationErrors + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigPoolReference + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuild + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuildSpec + default: {} + - name: status + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuildStatus + default: {} +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuildSpec + map: + fields: + - name: configGeneration + type: + scalar: numeric + default: 0 + - name: desiredConfig + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.RenderedMachineConfigReference + default: {} + - name: machineOSConfig + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfigReference + default: {} + - name: renderedImagePushspec + type: + scalar: string + default: "" + - name: version + type: + scalar: numeric + default: 0 +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuildStatus + map: + fields: + - name: buildEnd + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: buildStart + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: builderReference + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuilderReference + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: finalImagePullspec + type: + scalar: string + - name: relatedObjects + type: + list: + elementType: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.ObjectReference + elementRelationship: atomic +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuilderReference + map: + fields: + - name: buildPod + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.ObjectReference + - name: imageBuilderType + type: + scalar: string + default: "" + unions: + - discriminator: imageBuilderType + fields: + - fieldName: buildPod + discriminatorValue: PodImageBuilder +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfig + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfigSpec + default: {} + - name: status + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfigStatus + default: {} +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfigReference + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfigSpec + map: + fields: + - name: buildInputs + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.BuildInputs + default: {} + - name: buildOutputs + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.BuildOutputs + default: {} + - name: machineConfigPool + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigPoolReference + default: {} +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfigStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: currentImagePullspec + type: + scalar: string + - name: observedGeneration + type: + scalar: numeric +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSContainerfile + map: + fields: + - name: containerfileArch + type: + scalar: string + default: "" + - name: content + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSImageBuilder + map: + fields: + - name: imageBuilderType + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.ObjectReference + map: + fields: + - name: group + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: namespace + type: + scalar: string + - name: resource + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageRef + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageSet + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageSetSpec + default: {} + - name: status + type: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageSetStatus + default: {} +- name: com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageSetSpec + map: + fields: + - name: pinnedImages + type: + list: + elementType: + namedType: com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageRef + elementRelationship: associative + keys: + - name +- name: com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageSetStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type +- name: com.github.openshift.api.machineconfiguration.v1alpha1.RenderedMachineConfigReference + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + map: + fields: + - name: lastTransitionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: message + type: + scalar: string + default: "" + - name: observedGeneration + type: + scalar: numeric + - name: reason + type: + scalar: string + default: "" + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 + map: + elementType: + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry + map: + fields: + - name: apiVersion + type: + scalar: string + - name: fieldsType + type: + scalar: string + - name: fieldsV1 + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 + - name: manager + type: + scalar: string + - name: operation + type: + scalar: string + - name: subresource + type: + scalar: string + - name: time + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time +- name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + map: + fields: + - name: annotations + type: + map: + elementType: + scalar: string + - name: creationTimestamp + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: deletionGracePeriodSeconds + type: + scalar: numeric + - name: deletionTimestamp + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: finalizers + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: generateName + type: + scalar: string + - name: generation + type: + scalar: numeric + - name: labels + type: + map: + elementType: + scalar: string + - name: managedFields + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry + elementRelationship: atomic + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string + - name: ownerReferences + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference + elementRelationship: associative + keys: + - uid + - name: resourceVersion + type: + scalar: string + - name: selfLink + type: + scalar: string + - name: uid + type: + scalar: string +- name: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference + map: + fields: + - name: apiVersion + type: + scalar: string + default: "" + - name: blockOwnerDeletion + type: + scalar: boolean + - name: controller + type: + scalar: boolean + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: uid + type: + scalar: string + default: "" + elementRelationship: atomic +- name: io.k8s.apimachinery.pkg.apis.meta.v1.Time + scalar: untyped +- name: __untyped_atomic_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic +- name: __untyped_deduced_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +`) diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/certexpiry.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/certexpiry.go new file mode 100644 index 0000000000..f48af82559 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/certexpiry.go @@ -0,0 +1,45 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// CertExpiryApplyConfiguration represents an declarative configuration of the CertExpiry type for use +// with apply. +type CertExpiryApplyConfiguration struct { + Bundle *string `json:"bundle,omitempty"` + Subject *string `json:"subject,omitempty"` + Expiry *v1.Time `json:"expiry,omitempty"` +} + +// CertExpiryApplyConfiguration constructs an declarative configuration of the CertExpiry type for use with +// apply. +func CertExpiry() *CertExpiryApplyConfiguration { + return &CertExpiryApplyConfiguration{} +} + +// WithBundle sets the Bundle 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 Bundle field is set to the value of the last call. +func (b *CertExpiryApplyConfiguration) WithBundle(value string) *CertExpiryApplyConfiguration { + b.Bundle = &value + return b +} + +// WithSubject sets the Subject 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 Subject field is set to the value of the last call. +func (b *CertExpiryApplyConfiguration) WithSubject(value string) *CertExpiryApplyConfiguration { + b.Subject = &value + return b +} + +// WithExpiry sets the Expiry 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 Expiry field is set to the value of the last call. +func (b *CertExpiryApplyConfiguration) WithExpiry(value v1.Time) *CertExpiryApplyConfiguration { + b.Expiry = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfig.go new file mode 100644 index 0000000000..6c63049f6b --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfig.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ContainerRuntimeConfigApplyConfiguration represents an declarative configuration of the ContainerRuntimeConfig type for use +// with apply. +type ContainerRuntimeConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ContainerRuntimeConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *ContainerRuntimeConfigStatusApplyConfiguration `json:"status,omitempty"` +} + +// ContainerRuntimeConfig constructs an declarative configuration of the ContainerRuntimeConfig type for use with +// apply. +func ContainerRuntimeConfig(name string) *ContainerRuntimeConfigApplyConfiguration { + b := &ContainerRuntimeConfigApplyConfiguration{} + b.WithName(name) + b.WithKind("ContainerRuntimeConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b +} + +// ExtractContainerRuntimeConfig extracts the applied configuration owned by fieldManager from +// containerRuntimeConfig. If no managedFields are found in containerRuntimeConfig for fieldManager, a +// ContainerRuntimeConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// containerRuntimeConfig must be a unmodified ContainerRuntimeConfig API object that was retrieved from the Kubernetes API. +// ExtractContainerRuntimeConfig provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractContainerRuntimeConfig(containerRuntimeConfig *apimachineconfigurationv1.ContainerRuntimeConfig, fieldManager string) (*ContainerRuntimeConfigApplyConfiguration, error) { + return extractContainerRuntimeConfig(containerRuntimeConfig, fieldManager, "") +} + +// ExtractContainerRuntimeConfigStatus is the same as ExtractContainerRuntimeConfig except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractContainerRuntimeConfigStatus(containerRuntimeConfig *apimachineconfigurationv1.ContainerRuntimeConfig, fieldManager string) (*ContainerRuntimeConfigApplyConfiguration, error) { + return extractContainerRuntimeConfig(containerRuntimeConfig, fieldManager, "status") +} + +func extractContainerRuntimeConfig(containerRuntimeConfig *apimachineconfigurationv1.ContainerRuntimeConfig, fieldManager string, subresource string) (*ContainerRuntimeConfigApplyConfiguration, error) { + b := &ContainerRuntimeConfigApplyConfiguration{} + err := managedfields.ExtractInto(containerRuntimeConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.ContainerRuntimeConfig"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(containerRuntimeConfig.Name) + + b.WithKind("ContainerRuntimeConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithKind(value string) *ContainerRuntimeConfigApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithAPIVersion(value string) *ContainerRuntimeConfigApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithName(value string) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithGenerateName(value string) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *ContainerRuntimeConfigApplyConfiguration) WithNamespace(value string) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithUID(value types.UID) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithResourceVersion(value string) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithGeneration(value int64) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ContainerRuntimeConfigApplyConfiguration) WithLabels(entries map[string]string) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ContainerRuntimeConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ContainerRuntimeConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ContainerRuntimeConfigApplyConfiguration) WithFinalizers(values ...string) *ContainerRuntimeConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ContainerRuntimeConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithSpec(value *ContainerRuntimeConfigSpecApplyConfiguration) *ContainerRuntimeConfigApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *ContainerRuntimeConfigApplyConfiguration) WithStatus(value *ContainerRuntimeConfigStatusApplyConfiguration) *ContainerRuntimeConfigApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigcondition.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigcondition.go new file mode 100644 index 0000000000..910ea5cbd1 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigcondition.go @@ -0,0 +1,65 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/machineconfiguration/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ContainerRuntimeConfigConditionApplyConfiguration represents an declarative configuration of the ContainerRuntimeConfigCondition type for use +// with apply. +type ContainerRuntimeConfigConditionApplyConfiguration struct { + Type *v1.ContainerRuntimeConfigStatusConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// ContainerRuntimeConfigConditionApplyConfiguration constructs an declarative configuration of the ContainerRuntimeConfigCondition type for use with +// apply. +func ContainerRuntimeConfigCondition() *ContainerRuntimeConfigConditionApplyConfiguration { + return &ContainerRuntimeConfigConditionApplyConfiguration{} +} + +// WithType sets the Type 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 Type field is set to the value of the last call. +func (b *ContainerRuntimeConfigConditionApplyConfiguration) WithType(value v1.ContainerRuntimeConfigStatusConditionType) *ContainerRuntimeConfigConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *ContainerRuntimeConfigConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *ContainerRuntimeConfigConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. +func (b *ContainerRuntimeConfigConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ContainerRuntimeConfigConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} + +// WithReason sets the Reason 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 Reason field is set to the value of the last call. +func (b *ContainerRuntimeConfigConditionApplyConfiguration) WithReason(value string) *ContainerRuntimeConfigConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message 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 Message field is set to the value of the last call. +func (b *ContainerRuntimeConfigConditionApplyConfiguration) WithMessage(value string) *ContainerRuntimeConfigConditionApplyConfiguration { + b.Message = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigspec.go new file mode 100644 index 0000000000..109e9f5b3d --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigspec.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ContainerRuntimeConfigSpecApplyConfiguration represents an declarative configuration of the ContainerRuntimeConfigSpec type for use +// with apply. +type ContainerRuntimeConfigSpecApplyConfiguration struct { + MachineConfigPoolSelector *v1.LabelSelectorApplyConfiguration `json:"machineConfigPoolSelector,omitempty"` + ContainerRuntimeConfig *ContainerRuntimeConfigurationApplyConfiguration `json:"containerRuntimeConfig,omitempty"` +} + +// ContainerRuntimeConfigSpecApplyConfiguration constructs an declarative configuration of the ContainerRuntimeConfigSpec type for use with +// apply. +func ContainerRuntimeConfigSpec() *ContainerRuntimeConfigSpecApplyConfiguration { + return &ContainerRuntimeConfigSpecApplyConfiguration{} +} + +// WithMachineConfigPoolSelector sets the MachineConfigPoolSelector 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 MachineConfigPoolSelector field is set to the value of the last call. +func (b *ContainerRuntimeConfigSpecApplyConfiguration) WithMachineConfigPoolSelector(value *v1.LabelSelectorApplyConfiguration) *ContainerRuntimeConfigSpecApplyConfiguration { + b.MachineConfigPoolSelector = value + return b +} + +// WithContainerRuntimeConfig sets the ContainerRuntimeConfig 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 ContainerRuntimeConfig field is set to the value of the last call. +func (b *ContainerRuntimeConfigSpecApplyConfiguration) WithContainerRuntimeConfig(value *ContainerRuntimeConfigurationApplyConfiguration) *ContainerRuntimeConfigSpecApplyConfiguration { + b.ContainerRuntimeConfig = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigstatus.go new file mode 100644 index 0000000000..4f5811f601 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigstatus.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ContainerRuntimeConfigStatusApplyConfiguration represents an declarative configuration of the ContainerRuntimeConfigStatus type for use +// with apply. +type ContainerRuntimeConfigStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Conditions []ContainerRuntimeConfigConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// ContainerRuntimeConfigStatusApplyConfiguration constructs an declarative configuration of the ContainerRuntimeConfigStatus type for use with +// apply. +func ContainerRuntimeConfigStatus() *ContainerRuntimeConfigStatusApplyConfiguration { + return &ContainerRuntimeConfigStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. +func (b *ContainerRuntimeConfigStatusApplyConfiguration) WithObservedGeneration(value int64) *ContainerRuntimeConfigStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ContainerRuntimeConfigStatusApplyConfiguration) WithConditions(values ...*ContainerRuntimeConfigConditionApplyConfiguration) *ContainerRuntimeConfigStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfiguration.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfiguration.go new file mode 100644 index 0000000000..8af4f5cffb --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfiguration.go @@ -0,0 +1,64 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/machineconfiguration/v1" + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// ContainerRuntimeConfigurationApplyConfiguration represents an declarative configuration of the ContainerRuntimeConfiguration type for use +// with apply. +type ContainerRuntimeConfigurationApplyConfiguration struct { + PidsLimit *int64 `json:"pidsLimit,omitempty"` + LogLevel *string `json:"logLevel,omitempty"` + LogSizeMax *resource.Quantity `json:"logSizeMax,omitempty"` + OverlaySize *resource.Quantity `json:"overlaySize,omitempty"` + DefaultRuntime *v1.ContainerRuntimeDefaultRuntime `json:"defaultRuntime,omitempty"` +} + +// ContainerRuntimeConfigurationApplyConfiguration constructs an declarative configuration of the ContainerRuntimeConfiguration type for use with +// apply. +func ContainerRuntimeConfiguration() *ContainerRuntimeConfigurationApplyConfiguration { + return &ContainerRuntimeConfigurationApplyConfiguration{} +} + +// WithPidsLimit sets the PidsLimit 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 PidsLimit field is set to the value of the last call. +func (b *ContainerRuntimeConfigurationApplyConfiguration) WithPidsLimit(value int64) *ContainerRuntimeConfigurationApplyConfiguration { + b.PidsLimit = &value + return b +} + +// WithLogLevel sets the LogLevel 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 LogLevel field is set to the value of the last call. +func (b *ContainerRuntimeConfigurationApplyConfiguration) WithLogLevel(value string) *ContainerRuntimeConfigurationApplyConfiguration { + b.LogLevel = &value + return b +} + +// WithLogSizeMax sets the LogSizeMax 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 LogSizeMax field is set to the value of the last call. +func (b *ContainerRuntimeConfigurationApplyConfiguration) WithLogSizeMax(value resource.Quantity) *ContainerRuntimeConfigurationApplyConfiguration { + b.LogSizeMax = &value + return b +} + +// WithOverlaySize sets the OverlaySize 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 OverlaySize field is set to the value of the last call. +func (b *ContainerRuntimeConfigurationApplyConfiguration) WithOverlaySize(value resource.Quantity) *ContainerRuntimeConfigurationApplyConfiguration { + b.OverlaySize = &value + return b +} + +// WithDefaultRuntime sets the DefaultRuntime 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 DefaultRuntime field is set to the value of the last call. +func (b *ContainerRuntimeConfigurationApplyConfiguration) WithDefaultRuntime(value v1.ContainerRuntimeDefaultRuntime) *ContainerRuntimeConfigurationApplyConfiguration { + b.DefaultRuntime = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllercertificate.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllercertificate.go new file mode 100644 index 0000000000..cfb8a76d78 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllercertificate.go @@ -0,0 +1,63 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ControllerCertificateApplyConfiguration represents an declarative configuration of the ControllerCertificate type for use +// with apply. +type ControllerCertificateApplyConfiguration struct { + Subject *string `json:"subject,omitempty"` + Signer *string `json:"signer,omitempty"` + NotBefore *v1.Time `json:"notBefore,omitempty"` + NotAfter *v1.Time `json:"notAfter,omitempty"` + BundleFile *string `json:"bundleFile,omitempty"` +} + +// ControllerCertificateApplyConfiguration constructs an declarative configuration of the ControllerCertificate type for use with +// apply. +func ControllerCertificate() *ControllerCertificateApplyConfiguration { + return &ControllerCertificateApplyConfiguration{} +} + +// WithSubject sets the Subject 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 Subject field is set to the value of the last call. +func (b *ControllerCertificateApplyConfiguration) WithSubject(value string) *ControllerCertificateApplyConfiguration { + b.Subject = &value + return b +} + +// WithSigner sets the Signer 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 Signer field is set to the value of the last call. +func (b *ControllerCertificateApplyConfiguration) WithSigner(value string) *ControllerCertificateApplyConfiguration { + b.Signer = &value + return b +} + +// WithNotBefore sets the NotBefore 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 NotBefore field is set to the value of the last call. +func (b *ControllerCertificateApplyConfiguration) WithNotBefore(value v1.Time) *ControllerCertificateApplyConfiguration { + b.NotBefore = &value + return b +} + +// WithNotAfter sets the NotAfter 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 NotAfter field is set to the value of the last call. +func (b *ControllerCertificateApplyConfiguration) WithNotAfter(value v1.Time) *ControllerCertificateApplyConfiguration { + b.NotAfter = &value + return b +} + +// WithBundleFile sets the BundleFile 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 BundleFile field is set to the value of the last call. +func (b *ControllerCertificateApplyConfiguration) WithBundleFile(value string) *ControllerCertificateApplyConfiguration { + b.BundleFile = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfig.go new file mode 100644 index 0000000000..76d4e9e4d4 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfig.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ControllerConfigApplyConfiguration represents an declarative configuration of the ControllerConfig type for use +// with apply. +type ControllerConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ControllerConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *ControllerConfigStatusApplyConfiguration `json:"status,omitempty"` +} + +// ControllerConfig constructs an declarative configuration of the ControllerConfig type for use with +// apply. +func ControllerConfig(name string) *ControllerConfigApplyConfiguration { + b := &ControllerConfigApplyConfiguration{} + b.WithName(name) + b.WithKind("ControllerConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b +} + +// ExtractControllerConfig extracts the applied configuration owned by fieldManager from +// controllerConfig. If no managedFields are found in controllerConfig for fieldManager, a +// ControllerConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// controllerConfig must be a unmodified ControllerConfig API object that was retrieved from the Kubernetes API. +// ExtractControllerConfig provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractControllerConfig(controllerConfig *apimachineconfigurationv1.ControllerConfig, fieldManager string) (*ControllerConfigApplyConfiguration, error) { + return extractControllerConfig(controllerConfig, fieldManager, "") +} + +// ExtractControllerConfigStatus is the same as ExtractControllerConfig except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractControllerConfigStatus(controllerConfig *apimachineconfigurationv1.ControllerConfig, fieldManager string) (*ControllerConfigApplyConfiguration, error) { + return extractControllerConfig(controllerConfig, fieldManager, "status") +} + +func extractControllerConfig(controllerConfig *apimachineconfigurationv1.ControllerConfig, fieldManager string, subresource string) (*ControllerConfigApplyConfiguration, error) { + b := &ControllerConfigApplyConfiguration{} + err := managedfields.ExtractInto(controllerConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.ControllerConfig"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(controllerConfig.Name) + + b.WithKind("ControllerConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithKind(value string) *ControllerConfigApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithAPIVersion(value string) *ControllerConfigApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithName(value string) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithGenerateName(value string) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *ControllerConfigApplyConfiguration) WithNamespace(value string) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithUID(value types.UID) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithResourceVersion(value string) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithGeneration(value int64) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ControllerConfigApplyConfiguration) WithLabels(entries map[string]string) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ControllerConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ControllerConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ControllerConfigApplyConfiguration) WithFinalizers(values ...string) *ControllerConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ControllerConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithSpec(value *ControllerConfigSpecApplyConfiguration) *ControllerConfigApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *ControllerConfigApplyConfiguration) WithStatus(value *ControllerConfigStatusApplyConfiguration) *ControllerConfigApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigspec.go new file mode 100644 index 0000000000..b58ba32161 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigspec.go @@ -0,0 +1,253 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + configv1 "github.com/openshift/api/config/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + corev1 "k8s.io/client-go/applyconfigurations/core/v1" +) + +// ControllerConfigSpecApplyConfiguration represents an declarative configuration of the ControllerConfigSpec type for use +// with apply. +type ControllerConfigSpecApplyConfiguration struct { + ClusterDNSIP *string `json:"clusterDNSIP,omitempty"` + CloudProviderConfig *string `json:"cloudProviderConfig,omitempty"` + Platform *string `json:"platform,omitempty"` + EtcdDiscoveryDomain *string `json:"etcdDiscoveryDomain,omitempty"` + KubeAPIServerServingCAData []byte `json:"kubeAPIServerServingCAData,omitempty"` + RootCAData []byte `json:"rootCAData,omitempty"` + CloudProviderCAData []byte `json:"cloudProviderCAData,omitempty"` + AdditionalTrustBundle []byte `json:"additionalTrustBundle,omitempty"` + ImageRegistryBundleUserData []ImageRegistryBundleApplyConfiguration `json:"imageRegistryBundleUserData,omitempty"` + ImageRegistryBundleData []ImageRegistryBundleApplyConfiguration `json:"imageRegistryBundleData,omitempty"` + PullSecret *corev1.ObjectReferenceApplyConfiguration `json:"pullSecret,omitempty"` + InternalRegistryPullSecret []byte `json:"internalRegistryPullSecret,omitempty"` + Images map[string]string `json:"images,omitempty"` + BaseOSContainerImage *string `json:"baseOSContainerImage,omitempty"` + BaseOSExtensionsContainerImage *string `json:"baseOSExtensionsContainerImage,omitempty"` + OSImageURL *string `json:"osImageURL,omitempty"` + ReleaseImage *string `json:"releaseImage,omitempty"` + Proxy *configv1.ProxyStatus `json:"proxy,omitempty"` + Infra *configv1.Infrastructure `json:"infra,omitempty"` + DNS *configv1.DNS `json:"dns,omitempty"` + IPFamilies *machineconfigurationv1.IPFamiliesType `json:"ipFamilies,omitempty"` + NetworkType *string `json:"networkType,omitempty"` + Network *NetworkInfoApplyConfiguration `json:"network,omitempty"` +} + +// ControllerConfigSpecApplyConfiguration constructs an declarative configuration of the ControllerConfigSpec type for use with +// apply. +func ControllerConfigSpec() *ControllerConfigSpecApplyConfiguration { + return &ControllerConfigSpecApplyConfiguration{} +} + +// WithClusterDNSIP sets the ClusterDNSIP 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 ClusterDNSIP field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithClusterDNSIP(value string) *ControllerConfigSpecApplyConfiguration { + b.ClusterDNSIP = &value + return b +} + +// WithCloudProviderConfig sets the CloudProviderConfig 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 CloudProviderConfig field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithCloudProviderConfig(value string) *ControllerConfigSpecApplyConfiguration { + b.CloudProviderConfig = &value + return b +} + +// WithPlatform sets the Platform 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 Platform field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithPlatform(value string) *ControllerConfigSpecApplyConfiguration { + b.Platform = &value + return b +} + +// WithEtcdDiscoveryDomain sets the EtcdDiscoveryDomain 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 EtcdDiscoveryDomain field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithEtcdDiscoveryDomain(value string) *ControllerConfigSpecApplyConfiguration { + b.EtcdDiscoveryDomain = &value + return b +} + +// WithKubeAPIServerServingCAData adds the given value to the KubeAPIServerServingCAData field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the KubeAPIServerServingCAData field. +func (b *ControllerConfigSpecApplyConfiguration) WithKubeAPIServerServingCAData(values ...byte) *ControllerConfigSpecApplyConfiguration { + for i := range values { + b.KubeAPIServerServingCAData = append(b.KubeAPIServerServingCAData, values[i]) + } + return b +} + +// WithRootCAData adds the given value to the RootCAData field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the RootCAData field. +func (b *ControllerConfigSpecApplyConfiguration) WithRootCAData(values ...byte) *ControllerConfigSpecApplyConfiguration { + for i := range values { + b.RootCAData = append(b.RootCAData, values[i]) + } + return b +} + +// WithCloudProviderCAData adds the given value to the CloudProviderCAData field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the CloudProviderCAData field. +func (b *ControllerConfigSpecApplyConfiguration) WithCloudProviderCAData(values ...byte) *ControllerConfigSpecApplyConfiguration { + for i := range values { + b.CloudProviderCAData = append(b.CloudProviderCAData, values[i]) + } + return b +} + +// WithAdditionalTrustBundle adds the given value to the AdditionalTrustBundle field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AdditionalTrustBundle field. +func (b *ControllerConfigSpecApplyConfiguration) WithAdditionalTrustBundle(values ...byte) *ControllerConfigSpecApplyConfiguration { + for i := range values { + b.AdditionalTrustBundle = append(b.AdditionalTrustBundle, values[i]) + } + return b +} + +// WithImageRegistryBundleUserData adds the given value to the ImageRegistryBundleUserData field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ImageRegistryBundleUserData field. +func (b *ControllerConfigSpecApplyConfiguration) WithImageRegistryBundleUserData(values ...*ImageRegistryBundleApplyConfiguration) *ControllerConfigSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithImageRegistryBundleUserData") + } + b.ImageRegistryBundleUserData = append(b.ImageRegistryBundleUserData, *values[i]) + } + return b +} + +// WithImageRegistryBundleData adds the given value to the ImageRegistryBundleData field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ImageRegistryBundleData field. +func (b *ControllerConfigSpecApplyConfiguration) WithImageRegistryBundleData(values ...*ImageRegistryBundleApplyConfiguration) *ControllerConfigSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithImageRegistryBundleData") + } + b.ImageRegistryBundleData = append(b.ImageRegistryBundleData, *values[i]) + } + return b +} + +// WithPullSecret sets the PullSecret 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 PullSecret field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithPullSecret(value *corev1.ObjectReferenceApplyConfiguration) *ControllerConfigSpecApplyConfiguration { + b.PullSecret = value + return b +} + +// WithInternalRegistryPullSecret adds the given value to the InternalRegistryPullSecret field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the InternalRegistryPullSecret field. +func (b *ControllerConfigSpecApplyConfiguration) WithInternalRegistryPullSecret(values ...byte) *ControllerConfigSpecApplyConfiguration { + for i := range values { + b.InternalRegistryPullSecret = append(b.InternalRegistryPullSecret, values[i]) + } + return b +} + +// WithImages puts the entries into the Images field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Images field, +// overwriting an existing map entries in Images field with the same key. +func (b *ControllerConfigSpecApplyConfiguration) WithImages(entries map[string]string) *ControllerConfigSpecApplyConfiguration { + if b.Images == nil && len(entries) > 0 { + b.Images = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Images[k] = v + } + return b +} + +// WithBaseOSContainerImage sets the BaseOSContainerImage 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 BaseOSContainerImage field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithBaseOSContainerImage(value string) *ControllerConfigSpecApplyConfiguration { + b.BaseOSContainerImage = &value + return b +} + +// WithBaseOSExtensionsContainerImage sets the BaseOSExtensionsContainerImage 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 BaseOSExtensionsContainerImage field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithBaseOSExtensionsContainerImage(value string) *ControllerConfigSpecApplyConfiguration { + b.BaseOSExtensionsContainerImage = &value + return b +} + +// WithOSImageURL sets the OSImageURL 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 OSImageURL field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithOSImageURL(value string) *ControllerConfigSpecApplyConfiguration { + b.OSImageURL = &value + return b +} + +// WithReleaseImage sets the ReleaseImage 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 ReleaseImage field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithReleaseImage(value string) *ControllerConfigSpecApplyConfiguration { + b.ReleaseImage = &value + return b +} + +// WithProxy sets the Proxy 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 Proxy field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithProxy(value configv1.ProxyStatus) *ControllerConfigSpecApplyConfiguration { + b.Proxy = &value + return b +} + +// WithInfra sets the Infra 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 Infra field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithInfra(value configv1.Infrastructure) *ControllerConfigSpecApplyConfiguration { + b.Infra = &value + return b +} + +// WithDNS sets the DNS 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 DNS field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithDNS(value configv1.DNS) *ControllerConfigSpecApplyConfiguration { + b.DNS = &value + return b +} + +// WithIPFamilies sets the IPFamilies 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 IPFamilies field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithIPFamilies(value machineconfigurationv1.IPFamiliesType) *ControllerConfigSpecApplyConfiguration { + b.IPFamilies = &value + return b +} + +// WithNetworkType sets the NetworkType 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 NetworkType field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithNetworkType(value string) *ControllerConfigSpecApplyConfiguration { + b.NetworkType = &value + return b +} + +// WithNetwork sets the Network 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 Network field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithNetwork(value *NetworkInfoApplyConfiguration) *ControllerConfigSpecApplyConfiguration { + b.Network = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatus.go new file mode 100644 index 0000000000..7d9a2be8ba --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatus.go @@ -0,0 +1,51 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ControllerConfigStatusApplyConfiguration represents an declarative configuration of the ControllerConfigStatus type for use +// with apply. +type ControllerConfigStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Conditions []ControllerConfigStatusConditionApplyConfiguration `json:"conditions,omitempty"` + ControllerCertificates []ControllerCertificateApplyConfiguration `json:"controllerCertificates,omitempty"` +} + +// ControllerConfigStatusApplyConfiguration constructs an declarative configuration of the ControllerConfigStatus type for use with +// apply. +func ControllerConfigStatus() *ControllerConfigStatusApplyConfiguration { + return &ControllerConfigStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. +func (b *ControllerConfigStatusApplyConfiguration) WithObservedGeneration(value int64) *ControllerConfigStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ControllerConfigStatusApplyConfiguration) WithConditions(values ...*ControllerConfigStatusConditionApplyConfiguration) *ControllerConfigStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithControllerCertificates adds the given value to the ControllerCertificates field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ControllerCertificates field. +func (b *ControllerConfigStatusApplyConfiguration) WithControllerCertificates(values ...*ControllerCertificateApplyConfiguration) *ControllerConfigStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithControllerCertificates") + } + b.ControllerCertificates = append(b.ControllerCertificates, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatuscondition.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatuscondition.go new file mode 100644 index 0000000000..d2fc0fa459 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatuscondition.go @@ -0,0 +1,65 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/machineconfiguration/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ControllerConfigStatusConditionApplyConfiguration represents an declarative configuration of the ControllerConfigStatusCondition type for use +// with apply. +type ControllerConfigStatusConditionApplyConfiguration struct { + Type *v1.ControllerConfigStatusConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// ControllerConfigStatusConditionApplyConfiguration constructs an declarative configuration of the ControllerConfigStatusCondition type for use with +// apply. +func ControllerConfigStatusCondition() *ControllerConfigStatusConditionApplyConfiguration { + return &ControllerConfigStatusConditionApplyConfiguration{} +} + +// WithType sets the Type 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 Type field is set to the value of the last call. +func (b *ControllerConfigStatusConditionApplyConfiguration) WithType(value v1.ControllerConfigStatusConditionType) *ControllerConfigStatusConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *ControllerConfigStatusConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *ControllerConfigStatusConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. +func (b *ControllerConfigStatusConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ControllerConfigStatusConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} + +// WithReason sets the Reason 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 Reason field is set to the value of the last call. +func (b *ControllerConfigStatusConditionApplyConfiguration) WithReason(value string) *ControllerConfigStatusConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message 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 Message field is set to the value of the last call. +func (b *ControllerConfigStatusConditionApplyConfiguration) WithMessage(value string) *ControllerConfigStatusConditionApplyConfiguration { + b.Message = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/imageregistrybundle.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/imageregistrybundle.go new file mode 100644 index 0000000000..8166e3695b --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/imageregistrybundle.go @@ -0,0 +1,34 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ImageRegistryBundleApplyConfiguration represents an declarative configuration of the ImageRegistryBundle type for use +// with apply. +type ImageRegistryBundleApplyConfiguration struct { + File *string `json:"file,omitempty"` + Data []byte `json:"data,omitempty"` +} + +// ImageRegistryBundleApplyConfiguration constructs an declarative configuration of the ImageRegistryBundle type for use with +// apply. +func ImageRegistryBundle() *ImageRegistryBundleApplyConfiguration { + return &ImageRegistryBundleApplyConfiguration{} +} + +// WithFile sets the File 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 File field is set to the value of the last call. +func (b *ImageRegistryBundleApplyConfiguration) WithFile(value string) *ImageRegistryBundleApplyConfiguration { + b.File = &value + return b +} + +// WithData adds the given value to the Data field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Data field. +func (b *ImageRegistryBundleApplyConfiguration) WithData(values ...byte) *ImageRegistryBundleApplyConfiguration { + for i := range values { + b.Data = append(b.Data, values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfig.go new file mode 100644 index 0000000000..d84c8264d2 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfig.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// KubeletConfigApplyConfiguration represents an declarative configuration of the KubeletConfig type for use +// with apply. +type KubeletConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *KubeletConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *KubeletConfigStatusApplyConfiguration `json:"status,omitempty"` +} + +// KubeletConfig constructs an declarative configuration of the KubeletConfig type for use with +// apply. +func KubeletConfig(name string) *KubeletConfigApplyConfiguration { + b := &KubeletConfigApplyConfiguration{} + b.WithName(name) + b.WithKind("KubeletConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b +} + +// ExtractKubeletConfig extracts the applied configuration owned by fieldManager from +// kubeletConfig. If no managedFields are found in kubeletConfig for fieldManager, a +// KubeletConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// kubeletConfig must be a unmodified KubeletConfig API object that was retrieved from the Kubernetes API. +// ExtractKubeletConfig provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractKubeletConfig(kubeletConfig *apimachineconfigurationv1.KubeletConfig, fieldManager string) (*KubeletConfigApplyConfiguration, error) { + return extractKubeletConfig(kubeletConfig, fieldManager, "") +} + +// ExtractKubeletConfigStatus is the same as ExtractKubeletConfig except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractKubeletConfigStatus(kubeletConfig *apimachineconfigurationv1.KubeletConfig, fieldManager string) (*KubeletConfigApplyConfiguration, error) { + return extractKubeletConfig(kubeletConfig, fieldManager, "status") +} + +func extractKubeletConfig(kubeletConfig *apimachineconfigurationv1.KubeletConfig, fieldManager string, subresource string) (*KubeletConfigApplyConfiguration, error) { + b := &KubeletConfigApplyConfiguration{} + err := managedfields.ExtractInto(kubeletConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.KubeletConfig"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(kubeletConfig.Name) + + b.WithKind("KubeletConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithKind(value string) *KubeletConfigApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithAPIVersion(value string) *KubeletConfigApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithName(value string) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithGenerateName(value string) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *KubeletConfigApplyConfiguration) WithNamespace(value string) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithUID(value types.UID) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithResourceVersion(value string) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithGeneration(value int64) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *KubeletConfigApplyConfiguration) WithLabels(entries map[string]string) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *KubeletConfigApplyConfiguration) WithAnnotations(entries map[string]string) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *KubeletConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *KubeletConfigApplyConfiguration) WithFinalizers(values ...string) *KubeletConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *KubeletConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithSpec(value *KubeletConfigSpecApplyConfiguration) *KubeletConfigApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *KubeletConfigApplyConfiguration) WithStatus(value *KubeletConfigStatusApplyConfiguration) *KubeletConfigApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigcondition.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigcondition.go new file mode 100644 index 0000000000..f4903c845e --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigcondition.go @@ -0,0 +1,65 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/machineconfiguration/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// KubeletConfigConditionApplyConfiguration represents an declarative configuration of the KubeletConfigCondition type for use +// with apply. +type KubeletConfigConditionApplyConfiguration struct { + Type *v1.KubeletConfigStatusConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// KubeletConfigConditionApplyConfiguration constructs an declarative configuration of the KubeletConfigCondition type for use with +// apply. +func KubeletConfigCondition() *KubeletConfigConditionApplyConfiguration { + return &KubeletConfigConditionApplyConfiguration{} +} + +// WithType sets the Type 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 Type field is set to the value of the last call. +func (b *KubeletConfigConditionApplyConfiguration) WithType(value v1.KubeletConfigStatusConditionType) *KubeletConfigConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *KubeletConfigConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *KubeletConfigConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. +func (b *KubeletConfigConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *KubeletConfigConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} + +// WithReason sets the Reason 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 Reason field is set to the value of the last call. +func (b *KubeletConfigConditionApplyConfiguration) WithReason(value string) *KubeletConfigConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message 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 Message field is set to the value of the last call. +func (b *KubeletConfigConditionApplyConfiguration) WithMessage(value string) *KubeletConfigConditionApplyConfiguration { + b.Message = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigspec.go new file mode 100644 index 0000000000..b2c3fdd1b7 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigspec.go @@ -0,0 +1,65 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + configv1 "github.com/openshift/api/config/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// KubeletConfigSpecApplyConfiguration represents an declarative configuration of the KubeletConfigSpec type for use +// with apply. +type KubeletConfigSpecApplyConfiguration struct { + AutoSizingReserved *bool `json:"autoSizingReserved,omitempty"` + LogLevel *int32 `json:"logLevel,omitempty"` + MachineConfigPoolSelector *v1.LabelSelectorApplyConfiguration `json:"machineConfigPoolSelector,omitempty"` + KubeletConfig *runtime.RawExtension `json:"kubeletConfig,omitempty"` + TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` +} + +// KubeletConfigSpecApplyConfiguration constructs an declarative configuration of the KubeletConfigSpec type for use with +// apply. +func KubeletConfigSpec() *KubeletConfigSpecApplyConfiguration { + return &KubeletConfigSpecApplyConfiguration{} +} + +// WithAutoSizingReserved sets the AutoSizingReserved 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 AutoSizingReserved field is set to the value of the last call. +func (b *KubeletConfigSpecApplyConfiguration) WithAutoSizingReserved(value bool) *KubeletConfigSpecApplyConfiguration { + b.AutoSizingReserved = &value + return b +} + +// WithLogLevel sets the LogLevel 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 LogLevel field is set to the value of the last call. +func (b *KubeletConfigSpecApplyConfiguration) WithLogLevel(value int32) *KubeletConfigSpecApplyConfiguration { + b.LogLevel = &value + return b +} + +// WithMachineConfigPoolSelector sets the MachineConfigPoolSelector 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 MachineConfigPoolSelector field is set to the value of the last call. +func (b *KubeletConfigSpecApplyConfiguration) WithMachineConfigPoolSelector(value *v1.LabelSelectorApplyConfiguration) *KubeletConfigSpecApplyConfiguration { + b.MachineConfigPoolSelector = value + return b +} + +// WithKubeletConfig sets the KubeletConfig 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 KubeletConfig field is set to the value of the last call. +func (b *KubeletConfigSpecApplyConfiguration) WithKubeletConfig(value runtime.RawExtension) *KubeletConfigSpecApplyConfiguration { + b.KubeletConfig = &value + return b +} + +// WithTLSSecurityProfile sets the TLSSecurityProfile 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 TLSSecurityProfile field is set to the value of the last call. +func (b *KubeletConfigSpecApplyConfiguration) WithTLSSecurityProfile(value configv1.TLSSecurityProfile) *KubeletConfigSpecApplyConfiguration { + b.TLSSecurityProfile = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigstatus.go new file mode 100644 index 0000000000..68a2ae773b --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigstatus.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// KubeletConfigStatusApplyConfiguration represents an declarative configuration of the KubeletConfigStatus type for use +// with apply. +type KubeletConfigStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Conditions []KubeletConfigConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// KubeletConfigStatusApplyConfiguration constructs an declarative configuration of the KubeletConfigStatus type for use with +// apply. +func KubeletConfigStatus() *KubeletConfigStatusApplyConfiguration { + return &KubeletConfigStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. +func (b *KubeletConfigStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeletConfigStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *KubeletConfigStatusApplyConfiguration) WithConditions(values ...*KubeletConfigConditionApplyConfiguration) *KubeletConfigStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfig.go new file mode 100644 index 0000000000..16f1ffbd16 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfig.go @@ -0,0 +1,223 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigApplyConfiguration represents an declarative configuration of the MachineConfig type for use +// with apply. +type MachineConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigSpecApplyConfiguration `json:"spec,omitempty"` +} + +// MachineConfig constructs an declarative configuration of the MachineConfig type for use with +// apply. +func MachineConfig(name string) *MachineConfigApplyConfiguration { + b := &MachineConfigApplyConfiguration{} + b.WithName(name) + b.WithKind("MachineConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b +} + +// ExtractMachineConfig extracts the applied configuration owned by fieldManager from +// machineConfig. If no managedFields are found in machineConfig for fieldManager, a +// MachineConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// machineConfig must be a unmodified MachineConfig API object that was retrieved from the Kubernetes API. +// ExtractMachineConfig provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractMachineConfig(machineConfig *apimachineconfigurationv1.MachineConfig, fieldManager string) (*MachineConfigApplyConfiguration, error) { + return extractMachineConfig(machineConfig, fieldManager, "") +} +func extractMachineConfig(machineConfig *apimachineconfigurationv1.MachineConfig, fieldManager string, subresource string) (*MachineConfigApplyConfiguration, error) { + b := &MachineConfigApplyConfiguration{} + err := managedfields.ExtractInto(machineConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.MachineConfig"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(machineConfig.Name) + + b.WithKind("MachineConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithKind(value string) *MachineConfigApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithAPIVersion(value string) *MachineConfigApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithName(value string) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithGenerateName(value string) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *MachineConfigApplyConfiguration) WithNamespace(value string) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithUID(value types.UID) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithResourceVersion(value string) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithGeneration(value int64) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *MachineConfigApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *MachineConfigApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *MachineConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *MachineConfigApplyConfiguration) WithFinalizers(values ...string) *MachineConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *MachineConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *MachineConfigApplyConfiguration) WithSpec(value *MachineConfigSpecApplyConfiguration) *MachineConfigApplyConfiguration { + b.Spec = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpool.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpool.go new file mode 100644 index 0000000000..1192d23962 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpool.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigPoolApplyConfiguration represents an declarative configuration of the MachineConfigPool type for use +// with apply. +type MachineConfigPoolApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigPoolSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineConfigPoolStatusApplyConfiguration `json:"status,omitempty"` +} + +// MachineConfigPool constructs an declarative configuration of the MachineConfigPool type for use with +// apply. +func MachineConfigPool(name string) *MachineConfigPoolApplyConfiguration { + b := &MachineConfigPoolApplyConfiguration{} + b.WithName(name) + b.WithKind("MachineConfigPool") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b +} + +// ExtractMachineConfigPool extracts the applied configuration owned by fieldManager from +// machineConfigPool. If no managedFields are found in machineConfigPool for fieldManager, a +// MachineConfigPoolApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// machineConfigPool must be a unmodified MachineConfigPool API object that was retrieved from the Kubernetes API. +// ExtractMachineConfigPool provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractMachineConfigPool(machineConfigPool *apimachineconfigurationv1.MachineConfigPool, fieldManager string) (*MachineConfigPoolApplyConfiguration, error) { + return extractMachineConfigPool(machineConfigPool, fieldManager, "") +} + +// ExtractMachineConfigPoolStatus is the same as ExtractMachineConfigPool except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractMachineConfigPoolStatus(machineConfigPool *apimachineconfigurationv1.MachineConfigPool, fieldManager string) (*MachineConfigPoolApplyConfiguration, error) { + return extractMachineConfigPool(machineConfigPool, fieldManager, "status") +} + +func extractMachineConfigPool(machineConfigPool *apimachineconfigurationv1.MachineConfigPool, fieldManager string, subresource string) (*MachineConfigPoolApplyConfiguration, error) { + b := &MachineConfigPoolApplyConfiguration{} + err := managedfields.ExtractInto(machineConfigPool, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.MachineConfigPool"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(machineConfigPool.Name) + + b.WithKind("MachineConfigPool") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithKind(value string) *MachineConfigPoolApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithAPIVersion(value string) *MachineConfigPoolApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithName(value string) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithGenerateName(value string) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *MachineConfigPoolApplyConfiguration) WithNamespace(value string) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithUID(value types.UID) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithResourceVersion(value string) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithGeneration(value int64) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *MachineConfigPoolApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *MachineConfigPoolApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *MachineConfigPoolApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *MachineConfigPoolApplyConfiguration) WithFinalizers(values ...string) *MachineConfigPoolApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *MachineConfigPoolApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithSpec(value *MachineConfigPoolSpecApplyConfiguration) *MachineConfigPoolApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *MachineConfigPoolApplyConfiguration) WithStatus(value *MachineConfigPoolStatusApplyConfiguration) *MachineConfigPoolApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolcondition.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolcondition.go new file mode 100644 index 0000000000..e31bc17a8f --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolcondition.go @@ -0,0 +1,65 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/machineconfiguration/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// MachineConfigPoolConditionApplyConfiguration represents an declarative configuration of the MachineConfigPoolCondition type for use +// with apply. +type MachineConfigPoolConditionApplyConfiguration struct { + Type *v1.MachineConfigPoolConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// MachineConfigPoolConditionApplyConfiguration constructs an declarative configuration of the MachineConfigPoolCondition type for use with +// apply. +func MachineConfigPoolCondition() *MachineConfigPoolConditionApplyConfiguration { + return &MachineConfigPoolConditionApplyConfiguration{} +} + +// WithType sets the Type 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 Type field is set to the value of the last call. +func (b *MachineConfigPoolConditionApplyConfiguration) WithType(value v1.MachineConfigPoolConditionType) *MachineConfigPoolConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *MachineConfigPoolConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *MachineConfigPoolConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. +func (b *MachineConfigPoolConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *MachineConfigPoolConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} + +// WithReason sets the Reason 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 Reason field is set to the value of the last call. +func (b *MachineConfigPoolConditionApplyConfiguration) WithReason(value string) *MachineConfigPoolConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message 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 Message field is set to the value of the last call. +func (b *MachineConfigPoolConditionApplyConfiguration) WithMessage(value string) *MachineConfigPoolConditionApplyConfiguration { + b.Message = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolspec.go new file mode 100644 index 0000000000..465221cba9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolspec.go @@ -0,0 +1,78 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + intstr "k8s.io/apimachinery/pkg/util/intstr" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigPoolSpecApplyConfiguration represents an declarative configuration of the MachineConfigPoolSpec type for use +// with apply. +type MachineConfigPoolSpecApplyConfiguration struct { + MachineConfigSelector *v1.LabelSelectorApplyConfiguration `json:"machineConfigSelector,omitempty"` + NodeSelector *v1.LabelSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + Paused *bool `json:"paused,omitempty"` + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + Configuration *MachineConfigPoolStatusConfigurationApplyConfiguration `json:"configuration,omitempty"` + PinnedImageSets []PinnedImageSetRefApplyConfiguration `json:"pinnedImageSets,omitempty"` +} + +// MachineConfigPoolSpecApplyConfiguration constructs an declarative configuration of the MachineConfigPoolSpec type for use with +// apply. +func MachineConfigPoolSpec() *MachineConfigPoolSpecApplyConfiguration { + return &MachineConfigPoolSpecApplyConfiguration{} +} + +// WithMachineConfigSelector sets the MachineConfigSelector 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 MachineConfigSelector field is set to the value of the last call. +func (b *MachineConfigPoolSpecApplyConfiguration) WithMachineConfigSelector(value *v1.LabelSelectorApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { + b.MachineConfigSelector = value + return b +} + +// WithNodeSelector sets the NodeSelector 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 NodeSelector field is set to the value of the last call. +func (b *MachineConfigPoolSpecApplyConfiguration) WithNodeSelector(value *v1.LabelSelectorApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { + b.NodeSelector = value + return b +} + +// WithPaused sets the Paused 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 Paused field is set to the value of the last call. +func (b *MachineConfigPoolSpecApplyConfiguration) WithPaused(value bool) *MachineConfigPoolSpecApplyConfiguration { + b.Paused = &value + return b +} + +// WithMaxUnavailable sets the MaxUnavailable 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 MaxUnavailable field is set to the value of the last call. +func (b *MachineConfigPoolSpecApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *MachineConfigPoolSpecApplyConfiguration { + b.MaxUnavailable = &value + return b +} + +// WithConfiguration sets the Configuration 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 Configuration field is set to the value of the last call. +func (b *MachineConfigPoolSpecApplyConfiguration) WithConfiguration(value *MachineConfigPoolStatusConfigurationApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { + b.Configuration = value + return b +} + +// WithPinnedImageSets adds the given value to the PinnedImageSets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PinnedImageSets field. +func (b *MachineConfigPoolSpecApplyConfiguration) WithPinnedImageSets(values ...*PinnedImageSetRefApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPinnedImageSets") + } + b.PinnedImageSets = append(b.PinnedImageSets, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatus.go new file mode 100644 index 0000000000..1dfea16dcc --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatus.go @@ -0,0 +1,119 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// MachineConfigPoolStatusApplyConfiguration represents an declarative configuration of the MachineConfigPoolStatus type for use +// with apply. +type MachineConfigPoolStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Configuration *MachineConfigPoolStatusConfigurationApplyConfiguration `json:"configuration,omitempty"` + MachineCount *int32 `json:"machineCount,omitempty"` + UpdatedMachineCount *int32 `json:"updatedMachineCount,omitempty"` + ReadyMachineCount *int32 `json:"readyMachineCount,omitempty"` + UnavailableMachineCount *int32 `json:"unavailableMachineCount,omitempty"` + DegradedMachineCount *int32 `json:"degradedMachineCount,omitempty"` + Conditions []MachineConfigPoolConditionApplyConfiguration `json:"conditions,omitempty"` + CertExpirys []CertExpiryApplyConfiguration `json:"certExpirys,omitempty"` + PoolSynchronizersStatus []PoolSynchronizerStatusApplyConfiguration `json:"poolSynchronizersStatus,omitempty"` +} + +// MachineConfigPoolStatusApplyConfiguration constructs an declarative configuration of the MachineConfigPoolStatus type for use with +// apply. +func MachineConfigPoolStatus() *MachineConfigPoolStatusApplyConfiguration { + return &MachineConfigPoolStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. +func (b *MachineConfigPoolStatusApplyConfiguration) WithObservedGeneration(value int64) *MachineConfigPoolStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConfiguration sets the Configuration 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 Configuration field is set to the value of the last call. +func (b *MachineConfigPoolStatusApplyConfiguration) WithConfiguration(value *MachineConfigPoolStatusConfigurationApplyConfiguration) *MachineConfigPoolStatusApplyConfiguration { + b.Configuration = value + return b +} + +// WithMachineCount sets the MachineCount 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 MachineCount field is set to the value of the last call. +func (b *MachineConfigPoolStatusApplyConfiguration) WithMachineCount(value int32) *MachineConfigPoolStatusApplyConfiguration { + b.MachineCount = &value + return b +} + +// WithUpdatedMachineCount sets the UpdatedMachineCount 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 UpdatedMachineCount field is set to the value of the last call. +func (b *MachineConfigPoolStatusApplyConfiguration) WithUpdatedMachineCount(value int32) *MachineConfigPoolStatusApplyConfiguration { + b.UpdatedMachineCount = &value + return b +} + +// WithReadyMachineCount sets the ReadyMachineCount 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 ReadyMachineCount field is set to the value of the last call. +func (b *MachineConfigPoolStatusApplyConfiguration) WithReadyMachineCount(value int32) *MachineConfigPoolStatusApplyConfiguration { + b.ReadyMachineCount = &value + return b +} + +// WithUnavailableMachineCount sets the UnavailableMachineCount 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 UnavailableMachineCount field is set to the value of the last call. +func (b *MachineConfigPoolStatusApplyConfiguration) WithUnavailableMachineCount(value int32) *MachineConfigPoolStatusApplyConfiguration { + b.UnavailableMachineCount = &value + return b +} + +// WithDegradedMachineCount sets the DegradedMachineCount 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 DegradedMachineCount field is set to the value of the last call. +func (b *MachineConfigPoolStatusApplyConfiguration) WithDegradedMachineCount(value int32) *MachineConfigPoolStatusApplyConfiguration { + b.DegradedMachineCount = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *MachineConfigPoolStatusApplyConfiguration) WithConditions(values ...*MachineConfigPoolConditionApplyConfiguration) *MachineConfigPoolStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithCertExpirys adds the given value to the CertExpirys field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the CertExpirys field. +func (b *MachineConfigPoolStatusApplyConfiguration) WithCertExpirys(values ...*CertExpiryApplyConfiguration) *MachineConfigPoolStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithCertExpirys") + } + b.CertExpirys = append(b.CertExpirys, *values[i]) + } + return b +} + +// WithPoolSynchronizersStatus adds the given value to the PoolSynchronizersStatus field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PoolSynchronizersStatus field. +func (b *MachineConfigPoolStatusApplyConfiguration) WithPoolSynchronizersStatus(values ...*PoolSynchronizerStatusApplyConfiguration) *MachineConfigPoolStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPoolSynchronizersStatus") + } + b.PoolSynchronizersStatus = append(b.PoolSynchronizersStatus, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatusconfiguration.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatusconfiguration.go new file mode 100644 index 0000000000..6840c1f635 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatusconfiguration.go @@ -0,0 +1,90 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/core/v1" +) + +// MachineConfigPoolStatusConfigurationApplyConfiguration represents an declarative configuration of the MachineConfigPoolStatusConfiguration type for use +// with apply. +type MachineConfigPoolStatusConfigurationApplyConfiguration struct { + v1.ObjectReferenceApplyConfiguration `json:",inline"` + Source []v1.ObjectReferenceApplyConfiguration `json:"source,omitempty"` +} + +// MachineConfigPoolStatusConfigurationApplyConfiguration constructs an declarative configuration of the MachineConfigPoolStatusConfiguration type for use with +// apply. +func MachineConfigPoolStatusConfiguration() *MachineConfigPoolStatusConfigurationApplyConfiguration { + return &MachineConfigPoolStatusConfigurationApplyConfiguration{} +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithKind(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { + b.Kind = &value + return b +} + +// 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 *MachineConfigPoolStatusConfigurationApplyConfiguration) WithNamespace(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { + b.Namespace = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithName(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { + b.Name = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithUID(value types.UID) *MachineConfigPoolStatusConfigurationApplyConfiguration { + b.UID = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithAPIVersion(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithResourceVersion(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { + b.ResourceVersion = &value + return b +} + +// WithFieldPath sets the FieldPath 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 FieldPath field is set to the value of the last call. +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithFieldPath(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { + b.FieldPath = &value + return b +} + +// WithSource adds the given value to the Source field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Source field. +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithSource(values ...*v1.ObjectReferenceApplyConfiguration) *MachineConfigPoolStatusConfigurationApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSource") + } + b.Source = append(b.Source, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigspec.go new file mode 100644 index 0000000000..7ac9a761ab --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigspec.go @@ -0,0 +1,85 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// MachineConfigSpecApplyConfiguration represents an declarative configuration of the MachineConfigSpec type for use +// with apply. +type MachineConfigSpecApplyConfiguration struct { + OSImageURL *string `json:"osImageURL,omitempty"` + BaseOSExtensionsContainerImage *string `json:"baseOSExtensionsContainerImage,omitempty"` + Config *runtime.RawExtension `json:"config,omitempty"` + KernelArguments []string `json:"kernelArguments,omitempty"` + Extensions []string `json:"extensions,omitempty"` + FIPS *bool `json:"fips,omitempty"` + KernelType *string `json:"kernelType,omitempty"` +} + +// MachineConfigSpecApplyConfiguration constructs an declarative configuration of the MachineConfigSpec type for use with +// apply. +func MachineConfigSpec() *MachineConfigSpecApplyConfiguration { + return &MachineConfigSpecApplyConfiguration{} +} + +// WithOSImageURL sets the OSImageURL 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 OSImageURL field is set to the value of the last call. +func (b *MachineConfigSpecApplyConfiguration) WithOSImageURL(value string) *MachineConfigSpecApplyConfiguration { + b.OSImageURL = &value + return b +} + +// WithBaseOSExtensionsContainerImage sets the BaseOSExtensionsContainerImage 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 BaseOSExtensionsContainerImage field is set to the value of the last call. +func (b *MachineConfigSpecApplyConfiguration) WithBaseOSExtensionsContainerImage(value string) *MachineConfigSpecApplyConfiguration { + b.BaseOSExtensionsContainerImage = &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 *MachineConfigSpecApplyConfiguration) WithConfig(value runtime.RawExtension) *MachineConfigSpecApplyConfiguration { + b.Config = &value + return b +} + +// WithKernelArguments adds the given value to the KernelArguments field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the KernelArguments field. +func (b *MachineConfigSpecApplyConfiguration) WithKernelArguments(values ...string) *MachineConfigSpecApplyConfiguration { + for i := range values { + b.KernelArguments = append(b.KernelArguments, values[i]) + } + return b +} + +// WithExtensions adds the given value to the Extensions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Extensions field. +func (b *MachineConfigSpecApplyConfiguration) WithExtensions(values ...string) *MachineConfigSpecApplyConfiguration { + for i := range values { + b.Extensions = append(b.Extensions, values[i]) + } + return b +} + +// WithFIPS sets the FIPS 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 FIPS field is set to the value of the last call. +func (b *MachineConfigSpecApplyConfiguration) WithFIPS(value bool) *MachineConfigSpecApplyConfiguration { + b.FIPS = &value + return b +} + +// WithKernelType sets the KernelType 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 KernelType field is set to the value of the last call. +func (b *MachineConfigSpecApplyConfiguration) WithKernelType(value string) *MachineConfigSpecApplyConfiguration { + b.KernelType = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/networkinfo.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/networkinfo.go new file mode 100644 index 0000000000..5029fc9ab7 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/networkinfo.go @@ -0,0 +1,27 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/config/v1" +) + +// NetworkInfoApplyConfiguration represents an declarative configuration of the NetworkInfo type for use +// with apply. +type NetworkInfoApplyConfiguration struct { + MTUMigration *v1.MTUMigration `json:"mtuMigration,omitempty"` +} + +// NetworkInfoApplyConfiguration constructs an declarative configuration of the NetworkInfo type for use with +// apply. +func NetworkInfo() *NetworkInfoApplyConfiguration { + return &NetworkInfoApplyConfiguration{} +} + +// WithMTUMigration sets the MTUMigration 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 MTUMigration field is set to the value of the last call. +func (b *NetworkInfoApplyConfiguration) WithMTUMigration(value v1.MTUMigration) *NetworkInfoApplyConfiguration { + b.MTUMigration = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/pinnedimagesetref.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/pinnedimagesetref.go new file mode 100644 index 0000000000..087694af2b --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/pinnedimagesetref.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// PinnedImageSetRefApplyConfiguration represents an declarative configuration of the PinnedImageSetRef type for use +// with apply. +type PinnedImageSetRefApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// PinnedImageSetRefApplyConfiguration constructs an declarative configuration of the PinnedImageSetRef type for use with +// apply. +func PinnedImageSetRef() *PinnedImageSetRefApplyConfiguration { + return &PinnedImageSetRefApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *PinnedImageSetRefApplyConfiguration) WithName(value string) *PinnedImageSetRefApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/poolsynchronizerstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/poolsynchronizerstatus.go new file mode 100644 index 0000000000..7c94e0d34f --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/poolsynchronizerstatus.go @@ -0,0 +1,81 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/machineconfiguration/v1" +) + +// PoolSynchronizerStatusApplyConfiguration represents an declarative configuration of the PoolSynchronizerStatus type for use +// with apply. +type PoolSynchronizerStatusApplyConfiguration struct { + PoolSynchronizerType *v1.PoolSynchronizerType `json:"poolSynchronizerType,omitempty"` + MachineCount *int64 `json:"machineCount,omitempty"` + UpdatedMachineCount *int64 `json:"updatedMachineCount,omitempty"` + ReadyMachineCount *int64 `json:"readyMachineCount,omitempty"` + AvailableMachineCount *int64 `json:"availableMachineCount,omitempty"` + UnavailableMachineCount *int64 `json:"unavailableMachineCount,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` +} + +// PoolSynchronizerStatusApplyConfiguration constructs an declarative configuration of the PoolSynchronizerStatus type for use with +// apply. +func PoolSynchronizerStatus() *PoolSynchronizerStatusApplyConfiguration { + return &PoolSynchronizerStatusApplyConfiguration{} +} + +// WithPoolSynchronizerType sets the PoolSynchronizerType 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 PoolSynchronizerType field is set to the value of the last call. +func (b *PoolSynchronizerStatusApplyConfiguration) WithPoolSynchronizerType(value v1.PoolSynchronizerType) *PoolSynchronizerStatusApplyConfiguration { + b.PoolSynchronizerType = &value + return b +} + +// WithMachineCount sets the MachineCount 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 MachineCount field is set to the value of the last call. +func (b *PoolSynchronizerStatusApplyConfiguration) WithMachineCount(value int64) *PoolSynchronizerStatusApplyConfiguration { + b.MachineCount = &value + return b +} + +// WithUpdatedMachineCount sets the UpdatedMachineCount 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 UpdatedMachineCount field is set to the value of the last call. +func (b *PoolSynchronizerStatusApplyConfiguration) WithUpdatedMachineCount(value int64) *PoolSynchronizerStatusApplyConfiguration { + b.UpdatedMachineCount = &value + return b +} + +// WithReadyMachineCount sets the ReadyMachineCount 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 ReadyMachineCount field is set to the value of the last call. +func (b *PoolSynchronizerStatusApplyConfiguration) WithReadyMachineCount(value int64) *PoolSynchronizerStatusApplyConfiguration { + b.ReadyMachineCount = &value + return b +} + +// WithAvailableMachineCount sets the AvailableMachineCount 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 AvailableMachineCount field is set to the value of the last call. +func (b *PoolSynchronizerStatusApplyConfiguration) WithAvailableMachineCount(value int64) *PoolSynchronizerStatusApplyConfiguration { + b.AvailableMachineCount = &value + return b +} + +// WithUnavailableMachineCount sets the UnavailableMachineCount 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 UnavailableMachineCount field is set to the value of the last call. +func (b *PoolSynchronizerStatusApplyConfiguration) WithUnavailableMachineCount(value int64) *PoolSynchronizerStatusApplyConfiguration { + b.UnavailableMachineCount = &value + return b +} + +// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. +func (b *PoolSynchronizerStatusApplyConfiguration) WithObservedGeneration(value int64) *PoolSynchronizerStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/buildinputs.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/buildinputs.go new file mode 100644 index 0000000000..b51e0240ef --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/buildinputs.go @@ -0,0 +1,91 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// BuildInputsApplyConfiguration represents an declarative configuration of the BuildInputs type for use +// with apply. +type BuildInputsApplyConfiguration struct { + BaseOSExtensionsImagePullspec *string `json:"baseOSExtensionsImagePullspec,omitempty"` + BaseOSImagePullspec *string `json:"baseOSImagePullspec,omitempty"` + BaseImagePullSecret *ImageSecretObjectReferenceApplyConfiguration `json:"baseImagePullSecret,omitempty"` + ImageBuilder *MachineOSImageBuilderApplyConfiguration `json:"imageBuilder,omitempty"` + RenderedImagePushSecret *ImageSecretObjectReferenceApplyConfiguration `json:"renderedImagePushSecret,omitempty"` + RenderedImagePushspec *string `json:"renderedImagePushspec,omitempty"` + ReleaseVersion *string `json:"releaseVersion,omitempty"` + Containerfile []MachineOSContainerfileApplyConfiguration `json:"containerFile,omitempty"` +} + +// BuildInputsApplyConfiguration constructs an declarative configuration of the BuildInputs type for use with +// apply. +func BuildInputs() *BuildInputsApplyConfiguration { + return &BuildInputsApplyConfiguration{} +} + +// WithBaseOSExtensionsImagePullspec sets the BaseOSExtensionsImagePullspec 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 BaseOSExtensionsImagePullspec field is set to the value of the last call. +func (b *BuildInputsApplyConfiguration) WithBaseOSExtensionsImagePullspec(value string) *BuildInputsApplyConfiguration { + b.BaseOSExtensionsImagePullspec = &value + return b +} + +// WithBaseOSImagePullspec sets the BaseOSImagePullspec 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 BaseOSImagePullspec field is set to the value of the last call. +func (b *BuildInputsApplyConfiguration) WithBaseOSImagePullspec(value string) *BuildInputsApplyConfiguration { + b.BaseOSImagePullspec = &value + return b +} + +// WithBaseImagePullSecret sets the BaseImagePullSecret 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 BaseImagePullSecret field is set to the value of the last call. +func (b *BuildInputsApplyConfiguration) WithBaseImagePullSecret(value *ImageSecretObjectReferenceApplyConfiguration) *BuildInputsApplyConfiguration { + b.BaseImagePullSecret = value + return b +} + +// WithImageBuilder sets the ImageBuilder 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 ImageBuilder field is set to the value of the last call. +func (b *BuildInputsApplyConfiguration) WithImageBuilder(value *MachineOSImageBuilderApplyConfiguration) *BuildInputsApplyConfiguration { + b.ImageBuilder = value + return b +} + +// WithRenderedImagePushSecret sets the RenderedImagePushSecret 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 RenderedImagePushSecret field is set to the value of the last call. +func (b *BuildInputsApplyConfiguration) WithRenderedImagePushSecret(value *ImageSecretObjectReferenceApplyConfiguration) *BuildInputsApplyConfiguration { + b.RenderedImagePushSecret = value + return b +} + +// WithRenderedImagePushspec sets the RenderedImagePushspec 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 RenderedImagePushspec field is set to the value of the last call. +func (b *BuildInputsApplyConfiguration) WithRenderedImagePushspec(value string) *BuildInputsApplyConfiguration { + b.RenderedImagePushspec = &value + return b +} + +// WithReleaseVersion sets the ReleaseVersion 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 ReleaseVersion field is set to the value of the last call. +func (b *BuildInputsApplyConfiguration) WithReleaseVersion(value string) *BuildInputsApplyConfiguration { + b.ReleaseVersion = &value + return b +} + +// WithContainerfile adds the given value to the Containerfile field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Containerfile field. +func (b *BuildInputsApplyConfiguration) WithContainerfile(values ...*MachineOSContainerfileApplyConfiguration) *BuildInputsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithContainerfile") + } + b.Containerfile = append(b.Containerfile, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/buildoutputs.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/buildoutputs.go new file mode 100644 index 0000000000..803414dd68 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/buildoutputs.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// BuildOutputsApplyConfiguration represents an declarative configuration of the BuildOutputs type for use +// with apply. +type BuildOutputsApplyConfiguration struct { + CurrentImagePullSecret *ImageSecretObjectReferenceApplyConfiguration `json:"currentImagePullSecret,omitempty"` +} + +// BuildOutputsApplyConfiguration constructs an declarative configuration of the BuildOutputs type for use with +// apply. +func BuildOutputs() *BuildOutputsApplyConfiguration { + return &BuildOutputsApplyConfiguration{} +} + +// WithCurrentImagePullSecret sets the CurrentImagePullSecret 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 CurrentImagePullSecret field is set to the value of the last call. +func (b *BuildOutputsApplyConfiguration) WithCurrentImagePullSecret(value *ImageSecretObjectReferenceApplyConfiguration) *BuildOutputsApplyConfiguration { + b.CurrentImagePullSecret = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/imagesecretobjectreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/imagesecretobjectreference.go new file mode 100644 index 0000000000..b154075b58 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/imagesecretobjectreference.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ImageSecretObjectReferenceApplyConfiguration represents an declarative configuration of the ImageSecretObjectReference type for use +// with apply. +type ImageSecretObjectReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// ImageSecretObjectReferenceApplyConfiguration constructs an declarative configuration of the ImageSecretObjectReference type for use with +// apply. +func ImageSecretObjectReference() *ImageSecretObjectReferenceApplyConfiguration { + return &ImageSecretObjectReferenceApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *ImageSecretObjectReferenceApplyConfiguration) WithName(value string) *ImageSecretObjectReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignode.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignode.go new file mode 100644 index 0000000000..2f3cee6923 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignode.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigNodeApplyConfiguration represents an declarative configuration of the MachineConfigNode type for use +// with apply. +type MachineConfigNodeApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigNodeSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineConfigNodeStatusApplyConfiguration `json:"status,omitempty"` +} + +// MachineConfigNode constructs an declarative configuration of the MachineConfigNode type for use with +// apply. +func MachineConfigNode(name string) *MachineConfigNodeApplyConfiguration { + b := &MachineConfigNodeApplyConfiguration{} + b.WithName(name) + b.WithKind("MachineConfigNode") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b +} + +// ExtractMachineConfigNode extracts the applied configuration owned by fieldManager from +// machineConfigNode. If no managedFields are found in machineConfigNode for fieldManager, a +// MachineConfigNodeApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// machineConfigNode must be a unmodified MachineConfigNode API object that was retrieved from the Kubernetes API. +// ExtractMachineConfigNode provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractMachineConfigNode(machineConfigNode *machineconfigurationv1alpha1.MachineConfigNode, fieldManager string) (*MachineConfigNodeApplyConfiguration, error) { + return extractMachineConfigNode(machineConfigNode, fieldManager, "") +} + +// ExtractMachineConfigNodeStatus is the same as ExtractMachineConfigNode except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractMachineConfigNodeStatus(machineConfigNode *machineconfigurationv1alpha1.MachineConfigNode, fieldManager string) (*MachineConfigNodeApplyConfiguration, error) { + return extractMachineConfigNode(machineConfigNode, fieldManager, "status") +} + +func extractMachineConfigNode(machineConfigNode *machineconfigurationv1alpha1.MachineConfigNode, fieldManager string, subresource string) (*MachineConfigNodeApplyConfiguration, error) { + b := &MachineConfigNodeApplyConfiguration{} + err := managedfields.ExtractInto(machineConfigNode, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNode"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(machineConfigNode.Name) + + b.WithKind("MachineConfigNode") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithKind(value string) *MachineConfigNodeApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithAPIVersion(value string) *MachineConfigNodeApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithName(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithGenerateName(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *MachineConfigNodeApplyConfiguration) WithNamespace(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithUID(value types.UID) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithResourceVersion(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithGeneration(value int64) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *MachineConfigNodeApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *MachineConfigNodeApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *MachineConfigNodeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *MachineConfigNodeApplyConfiguration) WithFinalizers(values ...string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *MachineConfigNodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithSpec(value *MachineConfigNodeSpecApplyConfiguration) *MachineConfigNodeApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithStatus(value *MachineConfigNodeStatusApplyConfiguration) *MachineConfigNodeApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespec.go new file mode 100644 index 0000000000..bca0bf4018 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespec.go @@ -0,0 +1,55 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineConfigNodeSpecApplyConfiguration represents an declarative configuration of the MachineConfigNodeSpec type for use +// with apply. +type MachineConfigNodeSpecApplyConfiguration struct { + Node *MCOObjectReferenceApplyConfiguration `json:"node,omitempty"` + Pool *MCOObjectReferenceApplyConfiguration `json:"pool,omitempty"` + ConfigVersion *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration `json:"configVersion,omitempty"` + PinnedImageSets []MachineConfigNodeSpecPinnedImageSetApplyConfiguration `json:"pinnedImageSets,omitempty"` +} + +// MachineConfigNodeSpecApplyConfiguration constructs an declarative configuration of the MachineConfigNodeSpec type for use with +// apply. +func MachineConfigNodeSpec() *MachineConfigNodeSpecApplyConfiguration { + return &MachineConfigNodeSpecApplyConfiguration{} +} + +// WithNode sets the Node 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 Node field is set to the value of the last call. +func (b *MachineConfigNodeSpecApplyConfiguration) WithNode(value *MCOObjectReferenceApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { + b.Node = value + return b +} + +// WithPool sets the Pool 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 Pool field is set to the value of the last call. +func (b *MachineConfigNodeSpecApplyConfiguration) WithPool(value *MCOObjectReferenceApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { + b.Pool = value + return b +} + +// WithConfigVersion sets the ConfigVersion 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 ConfigVersion field is set to the value of the last call. +func (b *MachineConfigNodeSpecApplyConfiguration) WithConfigVersion(value *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { + b.ConfigVersion = value + return b +} + +// WithPinnedImageSets adds the given value to the PinnedImageSets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PinnedImageSets field. +func (b *MachineConfigNodeSpecApplyConfiguration) WithPinnedImageSets(values ...*MachineConfigNodeSpecPinnedImageSetApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPinnedImageSets") + } + b.PinnedImageSets = append(b.PinnedImageSets, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecmachineconfigversion.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecmachineconfigversion.go new file mode 100644 index 0000000000..f3190fa89a --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecmachineconfigversion.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineConfigNodeSpecMachineConfigVersionApplyConfiguration represents an declarative configuration of the MachineConfigNodeSpecMachineConfigVersion type for use +// with apply. +type MachineConfigNodeSpecMachineConfigVersionApplyConfiguration struct { + Desired *string `json:"desired,omitempty"` +} + +// MachineConfigNodeSpecMachineConfigVersionApplyConfiguration constructs an declarative configuration of the MachineConfigNodeSpecMachineConfigVersion type for use with +// apply. +func MachineConfigNodeSpecMachineConfigVersion() *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration { + return &MachineConfigNodeSpecMachineConfigVersionApplyConfiguration{} +} + +// WithDesired sets the Desired 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 Desired field is set to the value of the last call. +func (b *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration) WithDesired(value string) *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration { + b.Desired = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecpinnedimageset.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecpinnedimageset.go new file mode 100644 index 0000000000..8d32f6b499 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecpinnedimageset.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineConfigNodeSpecPinnedImageSetApplyConfiguration represents an declarative configuration of the MachineConfigNodeSpecPinnedImageSet type for use +// with apply. +type MachineConfigNodeSpecPinnedImageSetApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// MachineConfigNodeSpecPinnedImageSetApplyConfiguration constructs an declarative configuration of the MachineConfigNodeSpecPinnedImageSet type for use with +// apply. +func MachineConfigNodeSpecPinnedImageSet() *MachineConfigNodeSpecPinnedImageSetApplyConfiguration { + return &MachineConfigNodeSpecPinnedImageSetApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineConfigNodeSpecPinnedImageSetApplyConfiguration) WithName(value string) *MachineConfigNodeSpecPinnedImageSetApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatus.go new file mode 100644 index 0000000000..c733cb875f --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatus.go @@ -0,0 +1,64 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigNodeStatusApplyConfiguration represents an declarative configuration of the MachineConfigNodeStatus type for use +// with apply. +type MachineConfigNodeStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + ConfigVersion *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration `json:"configVersion,omitempty"` + PinnedImageSets []MachineConfigNodeStatusPinnedImageSetApplyConfiguration `json:"pinnedImageSets,omitempty"` +} + +// MachineConfigNodeStatusApplyConfiguration constructs an declarative configuration of the MachineConfigNodeStatus type for use with +// apply. +func MachineConfigNodeStatus() *MachineConfigNodeStatusApplyConfiguration { + return &MachineConfigNodeStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *MachineConfigNodeStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *MachineConfigNodeStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusApplyConfiguration) WithObservedGeneration(value int64) *MachineConfigNodeStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConfigVersion sets the ConfigVersion 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 ConfigVersion field is set to the value of the last call. +func (b *MachineConfigNodeStatusApplyConfiguration) WithConfigVersion(value *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration) *MachineConfigNodeStatusApplyConfiguration { + b.ConfigVersion = value + return b +} + +// WithPinnedImageSets adds the given value to the PinnedImageSets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PinnedImageSets field. +func (b *MachineConfigNodeStatusApplyConfiguration) WithPinnedImageSets(values ...*MachineConfigNodeStatusPinnedImageSetApplyConfiguration) *MachineConfigNodeStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPinnedImageSets") + } + b.PinnedImageSets = append(b.PinnedImageSets, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatusmachineconfigversion.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatusmachineconfigversion.go new file mode 100644 index 0000000000..05b8110ed6 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatusmachineconfigversion.go @@ -0,0 +1,32 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineConfigNodeStatusMachineConfigVersionApplyConfiguration represents an declarative configuration of the MachineConfigNodeStatusMachineConfigVersion type for use +// with apply. +type MachineConfigNodeStatusMachineConfigVersionApplyConfiguration struct { + Current *string `json:"current,omitempty"` + Desired *string `json:"desired,omitempty"` +} + +// MachineConfigNodeStatusMachineConfigVersionApplyConfiguration constructs an declarative configuration of the MachineConfigNodeStatusMachineConfigVersion type for use with +// apply. +func MachineConfigNodeStatusMachineConfigVersion() *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration { + return &MachineConfigNodeStatusMachineConfigVersionApplyConfiguration{} +} + +// WithCurrent sets the Current 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 Current field is set to the value of the last call. +func (b *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration) WithCurrent(value string) *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration { + b.Current = &value + return b +} + +// WithDesired sets the Desired 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 Desired field is set to the value of the last call. +func (b *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration) WithDesired(value string) *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration { + b.Desired = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatuspinnedimageset.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatuspinnedimageset.go new file mode 100644 index 0000000000..8a0ca011bc --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatuspinnedimageset.go @@ -0,0 +1,61 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineConfigNodeStatusPinnedImageSetApplyConfiguration represents an declarative configuration of the MachineConfigNodeStatusPinnedImageSet type for use +// with apply. +type MachineConfigNodeStatusPinnedImageSetApplyConfiguration struct { + Name *string `json:"name,omitempty"` + CurrentGeneration *int32 `json:"currentGeneration,omitempty"` + DesiredGeneration *int32 `json:"desiredGeneration,omitempty"` + LastFailedGeneration *int32 `json:"lastFailedGeneration,omitempty"` + LastFailedGenerationErrors []string `json:"lastFailedGenerationErrors,omitempty"` +} + +// MachineConfigNodeStatusPinnedImageSetApplyConfiguration constructs an declarative configuration of the MachineConfigNodeStatusPinnedImageSet type for use with +// apply. +func MachineConfigNodeStatusPinnedImageSet() *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + return &MachineConfigNodeStatusPinnedImageSetApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithName(value string) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.Name = &value + return b +} + +// WithCurrentGeneration sets the CurrentGeneration 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 CurrentGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithCurrentGeneration(value int32) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.CurrentGeneration = &value + return b +} + +// WithDesiredGeneration sets the DesiredGeneration 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 DesiredGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithDesiredGeneration(value int32) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.DesiredGeneration = &value + return b +} + +// WithLastFailedGeneration sets the LastFailedGeneration 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 LastFailedGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithLastFailedGeneration(value int32) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.LastFailedGeneration = &value + return b +} + +// WithLastFailedGenerationErrors adds the given value to the LastFailedGenerationErrors field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the LastFailedGenerationErrors field. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithLastFailedGenerationErrors(values ...string) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + for i := range values { + b.LastFailedGenerationErrors = append(b.LastFailedGenerationErrors, values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfigpoolreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfigpoolreference.go new file mode 100644 index 0000000000..e99c5e53e9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfigpoolreference.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineConfigPoolReferenceApplyConfiguration represents an declarative configuration of the MachineConfigPoolReference type for use +// with apply. +type MachineConfigPoolReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// MachineConfigPoolReferenceApplyConfiguration constructs an declarative configuration of the MachineConfigPoolReference type for use with +// apply. +func MachineConfigPoolReference() *MachineConfigPoolReferenceApplyConfiguration { + return &MachineConfigPoolReferenceApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineConfigPoolReferenceApplyConfiguration) WithName(value string) *MachineConfigPoolReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuild.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuild.go new file mode 100644 index 0000000000..66f9fe478e --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuild.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineOSBuildApplyConfiguration represents an declarative configuration of the MachineOSBuild type for use +// with apply. +type MachineOSBuildApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineOSBuildSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineOSBuildStatusApplyConfiguration `json:"status,omitempty"` +} + +// MachineOSBuild constructs an declarative configuration of the MachineOSBuild type for use with +// apply. +func MachineOSBuild(name string) *MachineOSBuildApplyConfiguration { + b := &MachineOSBuildApplyConfiguration{} + b.WithName(name) + b.WithKind("MachineOSBuild") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b +} + +// ExtractMachineOSBuild extracts the applied configuration owned by fieldManager from +// machineOSBuild. If no managedFields are found in machineOSBuild for fieldManager, a +// MachineOSBuildApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// machineOSBuild must be a unmodified MachineOSBuild API object that was retrieved from the Kubernetes API. +// ExtractMachineOSBuild provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractMachineOSBuild(machineOSBuild *machineconfigurationv1alpha1.MachineOSBuild, fieldManager string) (*MachineOSBuildApplyConfiguration, error) { + return extractMachineOSBuild(machineOSBuild, fieldManager, "") +} + +// ExtractMachineOSBuildStatus is the same as ExtractMachineOSBuild except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractMachineOSBuildStatus(machineOSBuild *machineconfigurationv1alpha1.MachineOSBuild, fieldManager string) (*MachineOSBuildApplyConfiguration, error) { + return extractMachineOSBuild(machineOSBuild, fieldManager, "status") +} + +func extractMachineOSBuild(machineOSBuild *machineconfigurationv1alpha1.MachineOSBuild, fieldManager string, subresource string) (*MachineOSBuildApplyConfiguration, error) { + b := &MachineOSBuildApplyConfiguration{} + err := managedfields.ExtractInto(machineOSBuild, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSBuild"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(machineOSBuild.Name) + + b.WithKind("MachineOSBuild") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithKind(value string) *MachineOSBuildApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithAPIVersion(value string) *MachineOSBuildApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithName(value string) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithGenerateName(value string) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *MachineOSBuildApplyConfiguration) WithNamespace(value string) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithUID(value types.UID) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithResourceVersion(value string) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithGeneration(value int64) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *MachineOSBuildApplyConfiguration) WithLabels(entries map[string]string) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *MachineOSBuildApplyConfiguration) WithAnnotations(entries map[string]string) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *MachineOSBuildApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *MachineOSBuildApplyConfiguration) WithFinalizers(values ...string) *MachineOSBuildApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *MachineOSBuildApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithSpec(value *MachineOSBuildSpecApplyConfiguration) *MachineOSBuildApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *MachineOSBuildApplyConfiguration) WithStatus(value *MachineOSBuildStatusApplyConfiguration) *MachineOSBuildApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuilderreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuilderreference.go new file mode 100644 index 0000000000..c90bf8eb95 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuilderreference.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" +) + +// MachineOSBuilderReferenceApplyConfiguration represents an declarative configuration of the MachineOSBuilderReference type for use +// with apply. +type MachineOSBuilderReferenceApplyConfiguration struct { + ImageBuilderType *v1alpha1.MachineOSImageBuilderType `json:"imageBuilderType,omitempty"` + PodImageBuilder *ObjectReferenceApplyConfiguration `json:"buildPod,omitempty"` +} + +// MachineOSBuilderReferenceApplyConfiguration constructs an declarative configuration of the MachineOSBuilderReference type for use with +// apply. +func MachineOSBuilderReference() *MachineOSBuilderReferenceApplyConfiguration { + return &MachineOSBuilderReferenceApplyConfiguration{} +} + +// WithImageBuilderType sets the ImageBuilderType 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 ImageBuilderType field is set to the value of the last call. +func (b *MachineOSBuilderReferenceApplyConfiguration) WithImageBuilderType(value v1alpha1.MachineOSImageBuilderType) *MachineOSBuilderReferenceApplyConfiguration { + b.ImageBuilderType = &value + return b +} + +// WithPodImageBuilder sets the PodImageBuilder 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 PodImageBuilder field is set to the value of the last call. +func (b *MachineOSBuilderReferenceApplyConfiguration) WithPodImageBuilder(value *ObjectReferenceApplyConfiguration) *MachineOSBuilderReferenceApplyConfiguration { + b.PodImageBuilder = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuildspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuildspec.go new file mode 100644 index 0000000000..bb1658b666 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuildspec.go @@ -0,0 +1,59 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineOSBuildSpecApplyConfiguration represents an declarative configuration of the MachineOSBuildSpec type for use +// with apply. +type MachineOSBuildSpecApplyConfiguration struct { + ConfigGeneration *int64 `json:"configGeneration,omitempty"` + DesiredConfig *RenderedMachineConfigReferenceApplyConfiguration `json:"desiredConfig,omitempty"` + MachineOSConfig *MachineOSConfigReferenceApplyConfiguration `json:"machineOSConfig,omitempty"` + Version *int64 `json:"version,omitempty"` + RenderedImagePushspec *string `json:"renderedImagePushspec,omitempty"` +} + +// MachineOSBuildSpecApplyConfiguration constructs an declarative configuration of the MachineOSBuildSpec type for use with +// apply. +func MachineOSBuildSpec() *MachineOSBuildSpecApplyConfiguration { + return &MachineOSBuildSpecApplyConfiguration{} +} + +// WithConfigGeneration sets the ConfigGeneration 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 ConfigGeneration field is set to the value of the last call. +func (b *MachineOSBuildSpecApplyConfiguration) WithConfigGeneration(value int64) *MachineOSBuildSpecApplyConfiguration { + b.ConfigGeneration = &value + return b +} + +// WithDesiredConfig sets the DesiredConfig 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 DesiredConfig field is set to the value of the last call. +func (b *MachineOSBuildSpecApplyConfiguration) WithDesiredConfig(value *RenderedMachineConfigReferenceApplyConfiguration) *MachineOSBuildSpecApplyConfiguration { + b.DesiredConfig = value + return b +} + +// WithMachineOSConfig sets the MachineOSConfig 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 MachineOSConfig field is set to the value of the last call. +func (b *MachineOSBuildSpecApplyConfiguration) WithMachineOSConfig(value *MachineOSConfigReferenceApplyConfiguration) *MachineOSBuildSpecApplyConfiguration { + b.MachineOSConfig = value + return b +} + +// WithVersion sets the Version 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 Version field is set to the value of the last call. +func (b *MachineOSBuildSpecApplyConfiguration) WithVersion(value int64) *MachineOSBuildSpecApplyConfiguration { + b.Version = &value + return b +} + +// WithRenderedImagePushspec sets the RenderedImagePushspec 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 RenderedImagePushspec field is set to the value of the last call. +func (b *MachineOSBuildSpecApplyConfiguration) WithRenderedImagePushspec(value string) *MachineOSBuildSpecApplyConfiguration { + b.RenderedImagePushspec = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuildstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuildstatus.go new file mode 100644 index 0000000000..d55bf50a92 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuildstatus.go @@ -0,0 +1,83 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineOSBuildStatusApplyConfiguration represents an declarative configuration of the MachineOSBuildStatus type for use +// with apply. +type MachineOSBuildStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + BuilderReference *MachineOSBuilderReferenceApplyConfiguration `json:"builderReference,omitempty"` + RelatedObjects []ObjectReferenceApplyConfiguration `json:"relatedObjects,omitempty"` + BuildStart *metav1.Time `json:"buildStart,omitempty"` + BuildEnd *metav1.Time `json:"buildEnd,omitempty"` + FinalImagePushspec *string `json:"finalImagePullspec,omitempty"` +} + +// MachineOSBuildStatusApplyConfiguration constructs an declarative configuration of the MachineOSBuildStatus type for use with +// apply. +func MachineOSBuildStatus() *MachineOSBuildStatusApplyConfiguration { + return &MachineOSBuildStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *MachineOSBuildStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *MachineOSBuildStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithBuilderReference sets the BuilderReference 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 BuilderReference field is set to the value of the last call. +func (b *MachineOSBuildStatusApplyConfiguration) WithBuilderReference(value *MachineOSBuilderReferenceApplyConfiguration) *MachineOSBuildStatusApplyConfiguration { + b.BuilderReference = value + return b +} + +// WithRelatedObjects adds the given value to the RelatedObjects field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the RelatedObjects field. +func (b *MachineOSBuildStatusApplyConfiguration) WithRelatedObjects(values ...*ObjectReferenceApplyConfiguration) *MachineOSBuildStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRelatedObjects") + } + b.RelatedObjects = append(b.RelatedObjects, *values[i]) + } + return b +} + +// WithBuildStart sets the BuildStart 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 BuildStart field is set to the value of the last call. +func (b *MachineOSBuildStatusApplyConfiguration) WithBuildStart(value metav1.Time) *MachineOSBuildStatusApplyConfiguration { + b.BuildStart = &value + return b +} + +// WithBuildEnd sets the BuildEnd 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 BuildEnd field is set to the value of the last call. +func (b *MachineOSBuildStatusApplyConfiguration) WithBuildEnd(value metav1.Time) *MachineOSBuildStatusApplyConfiguration { + b.BuildEnd = &value + return b +} + +// WithFinalImagePushspec sets the FinalImagePushspec 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 FinalImagePushspec field is set to the value of the last call. +func (b *MachineOSBuildStatusApplyConfiguration) WithFinalImagePushspec(value string) *MachineOSBuildStatusApplyConfiguration { + b.FinalImagePushspec = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfig.go new file mode 100644 index 0000000000..3b42e6e885 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfig.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineOSConfigApplyConfiguration represents an declarative configuration of the MachineOSConfig type for use +// with apply. +type MachineOSConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineOSConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineOSConfigStatusApplyConfiguration `json:"status,omitempty"` +} + +// MachineOSConfig constructs an declarative configuration of the MachineOSConfig type for use with +// apply. +func MachineOSConfig(name string) *MachineOSConfigApplyConfiguration { + b := &MachineOSConfigApplyConfiguration{} + b.WithName(name) + b.WithKind("MachineOSConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b +} + +// ExtractMachineOSConfig extracts the applied configuration owned by fieldManager from +// machineOSConfig. If no managedFields are found in machineOSConfig for fieldManager, a +// MachineOSConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// machineOSConfig must be a unmodified MachineOSConfig API object that was retrieved from the Kubernetes API. +// ExtractMachineOSConfig provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractMachineOSConfig(machineOSConfig *machineconfigurationv1alpha1.MachineOSConfig, fieldManager string) (*MachineOSConfigApplyConfiguration, error) { + return extractMachineOSConfig(machineOSConfig, fieldManager, "") +} + +// ExtractMachineOSConfigStatus is the same as ExtractMachineOSConfig except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractMachineOSConfigStatus(machineOSConfig *machineconfigurationv1alpha1.MachineOSConfig, fieldManager string) (*MachineOSConfigApplyConfiguration, error) { + return extractMachineOSConfig(machineOSConfig, fieldManager, "status") +} + +func extractMachineOSConfig(machineOSConfig *machineconfigurationv1alpha1.MachineOSConfig, fieldManager string, subresource string) (*MachineOSConfigApplyConfiguration, error) { + b := &MachineOSConfigApplyConfiguration{} + err := managedfields.ExtractInto(machineOSConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1alpha1.MachineOSConfig"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(machineOSConfig.Name) + + b.WithKind("MachineOSConfig") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithKind(value string) *MachineOSConfigApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithAPIVersion(value string) *MachineOSConfigApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithName(value string) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithGenerateName(value string) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *MachineOSConfigApplyConfiguration) WithNamespace(value string) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithUID(value types.UID) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithResourceVersion(value string) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithGeneration(value int64) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *MachineOSConfigApplyConfiguration) WithLabels(entries map[string]string) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *MachineOSConfigApplyConfiguration) WithAnnotations(entries map[string]string) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *MachineOSConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *MachineOSConfigApplyConfiguration) WithFinalizers(values ...string) *MachineOSConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *MachineOSConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithSpec(value *MachineOSConfigSpecApplyConfiguration) *MachineOSConfigApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *MachineOSConfigApplyConfiguration) WithStatus(value *MachineOSConfigStatusApplyConfiguration) *MachineOSConfigApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigreference.go new file mode 100644 index 0000000000..13faab9c7c --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigreference.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineOSConfigReferenceApplyConfiguration represents an declarative configuration of the MachineOSConfigReference type for use +// with apply. +type MachineOSConfigReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// MachineOSConfigReferenceApplyConfiguration constructs an declarative configuration of the MachineOSConfigReference type for use with +// apply. +func MachineOSConfigReference() *MachineOSConfigReferenceApplyConfiguration { + return &MachineOSConfigReferenceApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MachineOSConfigReferenceApplyConfiguration) WithName(value string) *MachineOSConfigReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigspec.go new file mode 100644 index 0000000000..625e30b1de --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigspec.go @@ -0,0 +1,41 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MachineOSConfigSpecApplyConfiguration represents an declarative configuration of the MachineOSConfigSpec type for use +// with apply. +type MachineOSConfigSpecApplyConfiguration struct { + MachineConfigPool *MachineConfigPoolReferenceApplyConfiguration `json:"machineConfigPool,omitempty"` + BuildInputs *BuildInputsApplyConfiguration `json:"buildInputs,omitempty"` + BuildOutputs *BuildOutputsApplyConfiguration `json:"buildOutputs,omitempty"` +} + +// MachineOSConfigSpecApplyConfiguration constructs an declarative configuration of the MachineOSConfigSpec type for use with +// apply. +func MachineOSConfigSpec() *MachineOSConfigSpecApplyConfiguration { + return &MachineOSConfigSpecApplyConfiguration{} +} + +// WithMachineConfigPool sets the MachineConfigPool 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 MachineConfigPool field is set to the value of the last call. +func (b *MachineOSConfigSpecApplyConfiguration) WithMachineConfigPool(value *MachineConfigPoolReferenceApplyConfiguration) *MachineOSConfigSpecApplyConfiguration { + b.MachineConfigPool = value + return b +} + +// WithBuildInputs sets the BuildInputs 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 BuildInputs field is set to the value of the last call. +func (b *MachineOSConfigSpecApplyConfiguration) WithBuildInputs(value *BuildInputsApplyConfiguration) *MachineOSConfigSpecApplyConfiguration { + b.BuildInputs = value + return b +} + +// WithBuildOutputs sets the BuildOutputs 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 BuildOutputs field is set to the value of the last call. +func (b *MachineOSConfigSpecApplyConfiguration) WithBuildOutputs(value *BuildOutputsApplyConfiguration) *MachineOSConfigSpecApplyConfiguration { + b.BuildOutputs = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigstatus.go new file mode 100644 index 0000000000..390b2c8ee1 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfigstatus.go @@ -0,0 +1,50 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineOSConfigStatusApplyConfiguration represents an declarative configuration of the MachineOSConfigStatus type for use +// with apply. +type MachineOSConfigStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + CurrentImagePullspec *string `json:"currentImagePullspec,omitempty"` +} + +// MachineOSConfigStatusApplyConfiguration constructs an declarative configuration of the MachineOSConfigStatus type for use with +// apply. +func MachineOSConfigStatus() *MachineOSConfigStatusApplyConfiguration { + return &MachineOSConfigStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *MachineOSConfigStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *MachineOSConfigStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. +func (b *MachineOSConfigStatusApplyConfiguration) WithObservedGeneration(value int64) *MachineOSConfigStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithCurrentImagePullspec sets the CurrentImagePullspec 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 CurrentImagePullspec field is set to the value of the last call. +func (b *MachineOSConfigStatusApplyConfiguration) WithCurrentImagePullspec(value string) *MachineOSConfigStatusApplyConfiguration { + b.CurrentImagePullspec = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineoscontainerfile.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineoscontainerfile.go new file mode 100644 index 0000000000..efe0feeddf --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineoscontainerfile.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" +) + +// MachineOSContainerfileApplyConfiguration represents an declarative configuration of the MachineOSContainerfile type for use +// with apply. +type MachineOSContainerfileApplyConfiguration struct { + ContainerfileArch *v1alpha1.ContainerfileArch `json:"containerfileArch,omitempty"` + Content *string `json:"content,omitempty"` +} + +// MachineOSContainerfileApplyConfiguration constructs an declarative configuration of the MachineOSContainerfile type for use with +// apply. +func MachineOSContainerfile() *MachineOSContainerfileApplyConfiguration { + return &MachineOSContainerfileApplyConfiguration{} +} + +// WithContainerfileArch sets the ContainerfileArch 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 ContainerfileArch field is set to the value of the last call. +func (b *MachineOSContainerfileApplyConfiguration) WithContainerfileArch(value v1alpha1.ContainerfileArch) *MachineOSContainerfileApplyConfiguration { + b.ContainerfileArch = &value + return b +} + +// WithContent sets the Content 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 Content field is set to the value of the last call. +func (b *MachineOSContainerfileApplyConfiguration) WithContent(value string) *MachineOSContainerfileApplyConfiguration { + b.Content = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosimagebuilder.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosimagebuilder.go new file mode 100644 index 0000000000..932adf4623 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosimagebuilder.go @@ -0,0 +1,27 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" +) + +// MachineOSImageBuilderApplyConfiguration represents an declarative configuration of the MachineOSImageBuilder type for use +// with apply. +type MachineOSImageBuilderApplyConfiguration struct { + ImageBuilderType *v1alpha1.MachineOSImageBuilderType `json:"imageBuilderType,omitempty"` +} + +// MachineOSImageBuilderApplyConfiguration constructs an declarative configuration of the MachineOSImageBuilder type for use with +// apply. +func MachineOSImageBuilder() *MachineOSImageBuilderApplyConfiguration { + return &MachineOSImageBuilderApplyConfiguration{} +} + +// WithImageBuilderType sets the ImageBuilderType 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 ImageBuilderType field is set to the value of the last call. +func (b *MachineOSImageBuilderApplyConfiguration) WithImageBuilderType(value v1alpha1.MachineOSImageBuilderType) *MachineOSImageBuilderApplyConfiguration { + b.ImageBuilderType = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/mcoobjectreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/mcoobjectreference.go new file mode 100644 index 0000000000..7b45ffdf73 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/mcoobjectreference.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// MCOObjectReferenceApplyConfiguration represents an declarative configuration of the MCOObjectReference type for use +// with apply. +type MCOObjectReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// MCOObjectReferenceApplyConfiguration constructs an declarative configuration of the MCOObjectReference type for use with +// apply. +func MCOObjectReference() *MCOObjectReferenceApplyConfiguration { + return &MCOObjectReferenceApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *MCOObjectReferenceApplyConfiguration) WithName(value string) *MCOObjectReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/objectreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/objectreference.go new file mode 100644 index 0000000000..c11e8c5008 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/objectreference.go @@ -0,0 +1,50 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ObjectReferenceApplyConfiguration represents an declarative configuration of the ObjectReference type for use +// with apply. +type ObjectReferenceApplyConfiguration struct { + Group *string `json:"group,omitempty"` + Resource *string `json:"resource,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Name *string `json:"name,omitempty"` +} + +// ObjectReferenceApplyConfiguration constructs an declarative configuration of the ObjectReference type for use with +// apply. +func ObjectReference() *ObjectReferenceApplyConfiguration { + return &ObjectReferenceApplyConfiguration{} +} + +// WithGroup sets the Group 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 Group field is set to the value of the last call. +func (b *ObjectReferenceApplyConfiguration) WithGroup(value string) *ObjectReferenceApplyConfiguration { + b.Group = &value + return b +} + +// WithResource sets the Resource 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 Resource field is set to the value of the last call. +func (b *ObjectReferenceApplyConfiguration) WithResource(value string) *ObjectReferenceApplyConfiguration { + b.Resource = &value + return b +} + +// 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 *ObjectReferenceApplyConfiguration) WithNamespace(value string) *ObjectReferenceApplyConfiguration { + b.Namespace = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *ObjectReferenceApplyConfiguration) WithName(value string) *ObjectReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageref.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageref.go new file mode 100644 index 0000000000..b4e91da005 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageref.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// PinnedImageRefApplyConfiguration represents an declarative configuration of the PinnedImageRef type for use +// with apply. +type PinnedImageRefApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// PinnedImageRefApplyConfiguration constructs an declarative configuration of the PinnedImageRef type for use with +// apply. +func PinnedImageRef() *PinnedImageRefApplyConfiguration { + return &PinnedImageRefApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *PinnedImageRefApplyConfiguration) WithName(value string) *PinnedImageRefApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageset.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageset.go new file mode 100644 index 0000000000..c0cd1f0121 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageset.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// PinnedImageSetApplyConfiguration represents an declarative configuration of the PinnedImageSet type for use +// with apply. +type PinnedImageSetApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *PinnedImageSetSpecApplyConfiguration `json:"spec,omitempty"` + Status *PinnedImageSetStatusApplyConfiguration `json:"status,omitempty"` +} + +// PinnedImageSet constructs an declarative configuration of the PinnedImageSet type for use with +// apply. +func PinnedImageSet(name string) *PinnedImageSetApplyConfiguration { + b := &PinnedImageSetApplyConfiguration{} + b.WithName(name) + b.WithKind("PinnedImageSet") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b +} + +// ExtractPinnedImageSet extracts the applied configuration owned by fieldManager from +// pinnedImageSet. If no managedFields are found in pinnedImageSet for fieldManager, a +// PinnedImageSetApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// pinnedImageSet must be a unmodified PinnedImageSet API object that was retrieved from the Kubernetes API. +// ExtractPinnedImageSet provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractPinnedImageSet(pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSet, fieldManager string) (*PinnedImageSetApplyConfiguration, error) { + return extractPinnedImageSet(pinnedImageSet, fieldManager, "") +} + +// ExtractPinnedImageSetStatus is the same as ExtractPinnedImageSet except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractPinnedImageSetStatus(pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSet, fieldManager string) (*PinnedImageSetApplyConfiguration, error) { + return extractPinnedImageSet(pinnedImageSet, fieldManager, "status") +} + +func extractPinnedImageSet(pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSet, fieldManager string, subresource string) (*PinnedImageSetApplyConfiguration, error) { + b := &PinnedImageSetApplyConfiguration{} + err := managedfields.ExtractInto(pinnedImageSet, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1alpha1.PinnedImageSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(pinnedImageSet.Name) + + b.WithKind("PinnedImageSet") + b.WithAPIVersion("machineconfiguration.openshift.io/v1alpha1") + return b, nil +} + +// WithKind sets the Kind 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 Kind field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithKind(value string) *PinnedImageSetApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithAPIVersion(value string) *PinnedImageSetApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithName(value string) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithGenerateName(value string) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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 *PinnedImageSetApplyConfiguration) WithNamespace(value string) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithUID(value types.UID) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithResourceVersion(value string) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithGeneration(value int64) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *PinnedImageSetApplyConfiguration) WithLabels(entries map[string]string) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *PinnedImageSetApplyConfiguration) WithAnnotations(entries map[string]string) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *PinnedImageSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *PinnedImageSetApplyConfiguration) WithFinalizers(values ...string) *PinnedImageSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *PinnedImageSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithSpec(value *PinnedImageSetSpecApplyConfiguration) *PinnedImageSetApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *PinnedImageSetApplyConfiguration) WithStatus(value *PinnedImageSetStatusApplyConfiguration) *PinnedImageSetApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimagesetspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimagesetspec.go new file mode 100644 index 0000000000..4ef6775c65 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimagesetspec.go @@ -0,0 +1,28 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// PinnedImageSetSpecApplyConfiguration represents an declarative configuration of the PinnedImageSetSpec type for use +// with apply. +type PinnedImageSetSpecApplyConfiguration struct { + PinnedImages []PinnedImageRefApplyConfiguration `json:"pinnedImages,omitempty"` +} + +// PinnedImageSetSpecApplyConfiguration constructs an declarative configuration of the PinnedImageSetSpec type for use with +// apply. +func PinnedImageSetSpec() *PinnedImageSetSpecApplyConfiguration { + return &PinnedImageSetSpecApplyConfiguration{} +} + +// WithPinnedImages adds the given value to the PinnedImages field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PinnedImages field. +func (b *PinnedImageSetSpecApplyConfiguration) WithPinnedImages(values ...*PinnedImageRefApplyConfiguration) *PinnedImageSetSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPinnedImages") + } + b.PinnedImages = append(b.PinnedImages, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimagesetstatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimagesetstatus.go new file mode 100644 index 0000000000..fd2e97299a --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimagesetstatus.go @@ -0,0 +1,32 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// PinnedImageSetStatusApplyConfiguration represents an declarative configuration of the PinnedImageSetStatus type for use +// with apply. +type PinnedImageSetStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// PinnedImageSetStatusApplyConfiguration constructs an declarative configuration of the PinnedImageSetStatus type for use with +// apply. +func PinnedImageSetStatus() *PinnedImageSetStatusApplyConfiguration { + return &PinnedImageSetStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *PinnedImageSetStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *PinnedImageSetStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/renderedmachineconfigreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/renderedmachineconfigreference.go new file mode 100644 index 0000000000..c83eb2f1e4 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/renderedmachineconfigreference.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// RenderedMachineConfigReferenceApplyConfiguration represents an declarative configuration of the RenderedMachineConfigReference type for use +// with apply. +type RenderedMachineConfigReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// RenderedMachineConfigReferenceApplyConfiguration constructs an declarative configuration of the RenderedMachineConfigReference type for use with +// apply. +func RenderedMachineConfigReference() *RenderedMachineConfigReferenceApplyConfiguration { + return &RenderedMachineConfigReferenceApplyConfiguration{} +} + +// WithName sets the Name 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 Name field is set to the value of the last call. +func (b *RenderedMachineConfigReferenceApplyConfiguration) WithName(value string) *RenderedMachineConfigReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/clientset.go new file mode 100644 index 0000000000..f58c537850 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/clientset.go @@ -0,0 +1,117 @@ +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + "net/http" + + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + MachineconfigurationV1() machineconfigurationv1.MachineconfigurationV1Interface + MachineconfigurationV1alpha1() machineconfigurationv1alpha1.MachineconfigurationV1alpha1Interface +} + +// Clientset contains the clients for groups. +type Clientset struct { + *discovery.DiscoveryClient + machineconfigurationV1 *machineconfigurationv1.MachineconfigurationV1Client + machineconfigurationV1alpha1 *machineconfigurationv1alpha1.MachineconfigurationV1alpha1Client +} + +// MachineconfigurationV1 retrieves the MachineconfigurationV1Client +func (c *Clientset) MachineconfigurationV1() machineconfigurationv1.MachineconfigurationV1Interface { + return c.machineconfigurationV1 +} + +// MachineconfigurationV1alpha1 retrieves the MachineconfigurationV1alpha1Client +func (c *Clientset) MachineconfigurationV1alpha1() machineconfigurationv1alpha1.MachineconfigurationV1alpha1Interface { + return c.machineconfigurationV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.machineconfigurationV1, err = machineconfigurationv1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + cs.machineconfigurationV1alpha1, err = machineconfigurationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.machineconfigurationV1 = machineconfigurationv1.New(c) + cs.machineconfigurationV1alpha1 = machineconfigurationv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme/doc.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme/doc.go new file mode 100644 index 0000000000..14db57a58f --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme/register.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme/register.go new file mode 100644 index 0000000000..9bda95eacb --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme/register.go @@ -0,0 +1,42 @@ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + machineconfigurationv1.AddToScheme, + machineconfigurationv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/containerruntimeconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/containerruntimeconfig.go new file mode 100644 index 0000000000..3e1204ca4e --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/containerruntimeconfig.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ContainerRuntimeConfigsGetter has a method to return a ContainerRuntimeConfigInterface. +// A group's client should implement this interface. +type ContainerRuntimeConfigsGetter interface { + ContainerRuntimeConfigs() ContainerRuntimeConfigInterface +} + +// ContainerRuntimeConfigInterface has methods to work with ContainerRuntimeConfig resources. +type ContainerRuntimeConfigInterface interface { + Create(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.CreateOptions) (*v1.ContainerRuntimeConfig, error) + Update(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (*v1.ContainerRuntimeConfig, error) + UpdateStatus(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (*v1.ContainerRuntimeConfig, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ContainerRuntimeConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ContainerRuntimeConfigList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ContainerRuntimeConfig, err error) + Apply(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) + ApplyStatus(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) + ContainerRuntimeConfigExpansion +} + +// containerRuntimeConfigs implements ContainerRuntimeConfigInterface +type containerRuntimeConfigs struct { + client rest.Interface +} + +// newContainerRuntimeConfigs returns a ContainerRuntimeConfigs +func newContainerRuntimeConfigs(c *MachineconfigurationV1Client) *containerRuntimeConfigs { + return &containerRuntimeConfigs{ + client: c.RESTClient(), + } +} + +// Get takes name of the containerRuntimeConfig, and returns the corresponding containerRuntimeConfig object, and an error if there is any. +func (c *containerRuntimeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ContainerRuntimeConfig, err error) { + result = &v1.ContainerRuntimeConfig{} + err = c.client.Get(). + Resource("containerruntimeconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ContainerRuntimeConfigs that match those selectors. +func (c *containerRuntimeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ContainerRuntimeConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ContainerRuntimeConfigList{} + err = c.client.Get(). + Resource("containerruntimeconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested containerRuntimeConfigs. +func (c *containerRuntimeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("containerruntimeconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a containerRuntimeConfig and creates it. Returns the server's representation of the containerRuntimeConfig, and an error, if there is any. +func (c *containerRuntimeConfigs) Create(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.CreateOptions) (result *v1.ContainerRuntimeConfig, err error) { + result = &v1.ContainerRuntimeConfig{} + err = c.client.Post(). + Resource("containerruntimeconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(containerRuntimeConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a containerRuntimeConfig and updates it. Returns the server's representation of the containerRuntimeConfig, and an error, if there is any. +func (c *containerRuntimeConfigs) Update(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (result *v1.ContainerRuntimeConfig, err error) { + result = &v1.ContainerRuntimeConfig{} + err = c.client.Put(). + Resource("containerruntimeconfigs"). + Name(containerRuntimeConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(containerRuntimeConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *containerRuntimeConfigs) UpdateStatus(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (result *v1.ContainerRuntimeConfig, err error) { + result = &v1.ContainerRuntimeConfig{} + err = c.client.Put(). + Resource("containerruntimeconfigs"). + Name(containerRuntimeConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(containerRuntimeConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the containerRuntimeConfig and deletes it. Returns an error if one occurs. +func (c *containerRuntimeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("containerruntimeconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *containerRuntimeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("containerruntimeconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched containerRuntimeConfig. +func (c *containerRuntimeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ContainerRuntimeConfig, err error) { + result = &v1.ContainerRuntimeConfig{} + err = c.client.Patch(pt). + Resource("containerruntimeconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied containerRuntimeConfig. +func (c *containerRuntimeConfigs) Apply(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) { + if containerRuntimeConfig == nil { + return nil, fmt.Errorf("containerRuntimeConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(containerRuntimeConfig) + if err != nil { + return nil, err + } + name := containerRuntimeConfig.Name + if name == nil { + return nil, fmt.Errorf("containerRuntimeConfig.Name must be provided to Apply") + } + result = &v1.ContainerRuntimeConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("containerruntimeconfigs"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *containerRuntimeConfigs) ApplyStatus(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) { + if containerRuntimeConfig == nil { + return nil, fmt.Errorf("containerRuntimeConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(containerRuntimeConfig) + if err != nil { + return nil, err + } + + name := containerRuntimeConfig.Name + if name == nil { + return nil, fmt.Errorf("containerRuntimeConfig.Name must be provided to Apply") + } + + result = &v1.ContainerRuntimeConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("containerruntimeconfigs"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/controllerconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/controllerconfig.go new file mode 100644 index 0000000000..33afaaea16 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/controllerconfig.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ControllerConfigsGetter has a method to return a ControllerConfigInterface. +// A group's client should implement this interface. +type ControllerConfigsGetter interface { + ControllerConfigs() ControllerConfigInterface +} + +// ControllerConfigInterface has methods to work with ControllerConfig resources. +type ControllerConfigInterface interface { + Create(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.CreateOptions) (*v1.ControllerConfig, error) + Update(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (*v1.ControllerConfig, error) + UpdateStatus(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (*v1.ControllerConfig, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ControllerConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerConfigList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerConfig, err error) + Apply(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) + ApplyStatus(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) + ControllerConfigExpansion +} + +// controllerConfigs implements ControllerConfigInterface +type controllerConfigs struct { + client rest.Interface +} + +// newControllerConfigs returns a ControllerConfigs +func newControllerConfigs(c *MachineconfigurationV1Client) *controllerConfigs { + return &controllerConfigs{ + client: c.RESTClient(), + } +} + +// Get takes name of the controllerConfig, and returns the corresponding controllerConfig object, and an error if there is any. +func (c *controllerConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ControllerConfig, err error) { + result = &v1.ControllerConfig{} + err = c.client.Get(). + Resource("controllerconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ControllerConfigs that match those selectors. +func (c *controllerConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ControllerConfigList{} + err = c.client.Get(). + Resource("controllerconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested controllerConfigs. +func (c *controllerConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("controllerconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a controllerConfig and creates it. Returns the server's representation of the controllerConfig, and an error, if there is any. +func (c *controllerConfigs) Create(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.CreateOptions) (result *v1.ControllerConfig, err error) { + result = &v1.ControllerConfig{} + err = c.client.Post(). + Resource("controllerconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(controllerConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a controllerConfig and updates it. Returns the server's representation of the controllerConfig, and an error, if there is any. +func (c *controllerConfigs) Update(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (result *v1.ControllerConfig, err error) { + result = &v1.ControllerConfig{} + err = c.client.Put(). + Resource("controllerconfigs"). + Name(controllerConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(controllerConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *controllerConfigs) UpdateStatus(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (result *v1.ControllerConfig, err error) { + result = &v1.ControllerConfig{} + err = c.client.Put(). + Resource("controllerconfigs"). + Name(controllerConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(controllerConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the controllerConfig and deletes it. Returns an error if one occurs. +func (c *controllerConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("controllerconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *controllerConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("controllerconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched controllerConfig. +func (c *controllerConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerConfig, err error) { + result = &v1.ControllerConfig{} + err = c.client.Patch(pt). + Resource("controllerconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied controllerConfig. +func (c *controllerConfigs) Apply(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) { + if controllerConfig == nil { + return nil, fmt.Errorf("controllerConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(controllerConfig) + if err != nil { + return nil, err + } + name := controllerConfig.Name + if name == nil { + return nil, fmt.Errorf("controllerConfig.Name must be provided to Apply") + } + result = &v1.ControllerConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("controllerconfigs"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *controllerConfigs) ApplyStatus(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) { + if controllerConfig == nil { + return nil, fmt.Errorf("controllerConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(controllerConfig) + if err != nil { + return nil, err + } + + name := controllerConfig.Name + if name == nil { + return nil, fmt.Errorf("controllerConfig.Name must be provided to Apply") + } + + result = &v1.ControllerConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("controllerconfigs"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/doc.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/doc.go new file mode 100644 index 0000000000..225e6b2be3 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go new file mode 100644 index 0000000000..cce54d166a --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go @@ -0,0 +1,13 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type ContainerRuntimeConfigExpansion interface{} + +type ControllerConfigExpansion interface{} + +type KubeletConfigExpansion interface{} + +type MachineConfigExpansion interface{} + +type MachineConfigPoolExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/kubeletconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/kubeletconfig.go new file mode 100644 index 0000000000..51ad742ff8 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/kubeletconfig.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// KubeletConfigsGetter has a method to return a KubeletConfigInterface. +// A group's client should implement this interface. +type KubeletConfigsGetter interface { + KubeletConfigs() KubeletConfigInterface +} + +// KubeletConfigInterface has methods to work with KubeletConfig resources. +type KubeletConfigInterface interface { + Create(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.CreateOptions) (*v1.KubeletConfig, error) + Update(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (*v1.KubeletConfig, error) + UpdateStatus(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (*v1.KubeletConfig, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubeletConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeletConfigList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeletConfig, err error) + Apply(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) + ApplyStatus(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) + KubeletConfigExpansion +} + +// kubeletConfigs implements KubeletConfigInterface +type kubeletConfigs struct { + client rest.Interface +} + +// newKubeletConfigs returns a KubeletConfigs +func newKubeletConfigs(c *MachineconfigurationV1Client) *kubeletConfigs { + return &kubeletConfigs{ + client: c.RESTClient(), + } +} + +// Get takes name of the kubeletConfig, and returns the corresponding kubeletConfig object, and an error if there is any. +func (c *kubeletConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeletConfig, err error) { + result = &v1.KubeletConfig{} + err = c.client.Get(). + Resource("kubeletconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of KubeletConfigs that match those selectors. +func (c *kubeletConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeletConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.KubeletConfigList{} + err = c.client.Get(). + Resource("kubeletconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested kubeletConfigs. +func (c *kubeletConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("kubeletconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a kubeletConfig and creates it. Returns the server's representation of the kubeletConfig, and an error, if there is any. +func (c *kubeletConfigs) Create(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.CreateOptions) (result *v1.KubeletConfig, err error) { + result = &v1.KubeletConfig{} + err = c.client.Post(). + Resource("kubeletconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(kubeletConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a kubeletConfig and updates it. Returns the server's representation of the kubeletConfig, and an error, if there is any. +func (c *kubeletConfigs) Update(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (result *v1.KubeletConfig, err error) { + result = &v1.KubeletConfig{} + err = c.client.Put(). + Resource("kubeletconfigs"). + Name(kubeletConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(kubeletConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *kubeletConfigs) UpdateStatus(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (result *v1.KubeletConfig, err error) { + result = &v1.KubeletConfig{} + err = c.client.Put(). + Resource("kubeletconfigs"). + Name(kubeletConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(kubeletConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the kubeletConfig and deletes it. Returns an error if one occurs. +func (c *kubeletConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("kubeletconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *kubeletConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("kubeletconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched kubeletConfig. +func (c *kubeletConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeletConfig, err error) { + result = &v1.KubeletConfig{} + err = c.client.Patch(pt). + Resource("kubeletconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied kubeletConfig. +func (c *kubeletConfigs) Apply(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) { + if kubeletConfig == nil { + return nil, fmt.Errorf("kubeletConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(kubeletConfig) + if err != nil { + return nil, err + } + name := kubeletConfig.Name + if name == nil { + return nil, fmt.Errorf("kubeletConfig.Name must be provided to Apply") + } + result = &v1.KubeletConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("kubeletconfigs"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *kubeletConfigs) ApplyStatus(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) { + if kubeletConfig == nil { + return nil, fmt.Errorf("kubeletConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(kubeletConfig) + if err != nil { + return nil, err + } + + name := kubeletConfig.Name + if name == nil { + return nil, fmt.Errorf("kubeletConfig.Name must be provided to Apply") + } + + result = &v1.KubeletConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("kubeletconfigs"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfig.go new file mode 100644 index 0000000000..46c390c792 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfig.go @@ -0,0 +1,181 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MachineConfigsGetter has a method to return a MachineConfigInterface. +// A group's client should implement this interface. +type MachineConfigsGetter interface { + MachineConfigs() MachineConfigInterface +} + +// MachineConfigInterface has methods to work with MachineConfig resources. +type MachineConfigInterface interface { + Create(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.CreateOptions) (*v1.MachineConfig, error) + Update(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.UpdateOptions) (*v1.MachineConfig, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MachineConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.MachineConfigList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfig, err error) + Apply(ctx context.Context, machineConfig *machineconfigurationv1.MachineConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfig, err error) + MachineConfigExpansion +} + +// machineConfigs implements MachineConfigInterface +type machineConfigs struct { + client rest.Interface +} + +// newMachineConfigs returns a MachineConfigs +func newMachineConfigs(c *MachineconfigurationV1Client) *machineConfigs { + return &machineConfigs{ + client: c.RESTClient(), + } +} + +// Get takes name of the machineConfig, and returns the corresponding machineConfig object, and an error if there is any. +func (c *machineConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MachineConfig, err error) { + result = &v1.MachineConfig{} + err = c.client.Get(). + Resource("machineconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MachineConfigs that match those selectors. +func (c *machineConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MachineConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.MachineConfigList{} + err = c.client.Get(). + Resource("machineconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested machineConfigs. +func (c *machineConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("machineconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a machineConfig and creates it. Returns the server's representation of the machineConfig, and an error, if there is any. +func (c *machineConfigs) Create(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.CreateOptions) (result *v1.MachineConfig, err error) { + result = &v1.MachineConfig{} + err = c.client.Post(). + Resource("machineconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a machineConfig and updates it. Returns the server's representation of the machineConfig, and an error, if there is any. +func (c *machineConfigs) Update(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.UpdateOptions) (result *v1.MachineConfig, err error) { + result = &v1.MachineConfig{} + err = c.client.Put(). + Resource("machineconfigs"). + Name(machineConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the machineConfig and deletes it. Returns an error if one occurs. +func (c *machineConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("machineconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *machineConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("machineconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched machineConfig. +func (c *machineConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfig, err error) { + result = &v1.MachineConfig{} + err = c.client.Patch(pt). + Resource("machineconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied machineConfig. +func (c *machineConfigs) Apply(ctx context.Context, machineConfig *machineconfigurationv1.MachineConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfig, err error) { + if machineConfig == nil { + return nil, fmt.Errorf("machineConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineConfig) + if err != nil { + return nil, err + } + name := machineConfig.Name + if name == nil { + return nil, fmt.Errorf("machineConfig.Name must be provided to Apply") + } + result = &v1.MachineConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineconfigs"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfigpool.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfigpool.go new file mode 100644 index 0000000000..359ec94908 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfigpool.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MachineConfigPoolsGetter has a method to return a MachineConfigPoolInterface. +// A group's client should implement this interface. +type MachineConfigPoolsGetter interface { + MachineConfigPools() MachineConfigPoolInterface +} + +// MachineConfigPoolInterface has methods to work with MachineConfigPool resources. +type MachineConfigPoolInterface interface { + Create(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.CreateOptions) (*v1.MachineConfigPool, error) + Update(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (*v1.MachineConfigPool, error) + UpdateStatus(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (*v1.MachineConfigPool, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MachineConfigPool, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.MachineConfigPoolList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfigPool, err error) + Apply(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) + ApplyStatus(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) + MachineConfigPoolExpansion +} + +// machineConfigPools implements MachineConfigPoolInterface +type machineConfigPools struct { + client rest.Interface +} + +// newMachineConfigPools returns a MachineConfigPools +func newMachineConfigPools(c *MachineconfigurationV1Client) *machineConfigPools { + return &machineConfigPools{ + client: c.RESTClient(), + } +} + +// Get takes name of the machineConfigPool, and returns the corresponding machineConfigPool object, and an error if there is any. +func (c *machineConfigPools) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MachineConfigPool, err error) { + result = &v1.MachineConfigPool{} + err = c.client.Get(). + Resource("machineconfigpools"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MachineConfigPools that match those selectors. +func (c *machineConfigPools) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MachineConfigPoolList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.MachineConfigPoolList{} + err = c.client.Get(). + Resource("machineconfigpools"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested machineConfigPools. +func (c *machineConfigPools) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("machineconfigpools"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a machineConfigPool and creates it. Returns the server's representation of the machineConfigPool, and an error, if there is any. +func (c *machineConfigPools) Create(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.CreateOptions) (result *v1.MachineConfigPool, err error) { + result = &v1.MachineConfigPool{} + err = c.client.Post(). + Resource("machineconfigpools"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfigPool). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a machineConfigPool and updates it. Returns the server's representation of the machineConfigPool, and an error, if there is any. +func (c *machineConfigPools) Update(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (result *v1.MachineConfigPool, err error) { + result = &v1.MachineConfigPool{} + err = c.client.Put(). + Resource("machineconfigpools"). + Name(machineConfigPool.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfigPool). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *machineConfigPools) UpdateStatus(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (result *v1.MachineConfigPool, err error) { + result = &v1.MachineConfigPool{} + err = c.client.Put(). + Resource("machineconfigpools"). + Name(machineConfigPool.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfigPool). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the machineConfigPool and deletes it. Returns an error if one occurs. +func (c *machineConfigPools) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("machineconfigpools"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *machineConfigPools) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("machineconfigpools"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched machineConfigPool. +func (c *machineConfigPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfigPool, err error) { + result = &v1.MachineConfigPool{} + err = c.client.Patch(pt). + Resource("machineconfigpools"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied machineConfigPool. +func (c *machineConfigPools) Apply(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) { + if machineConfigPool == nil { + return nil, fmt.Errorf("machineConfigPool provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineConfigPool) + if err != nil { + return nil, err + } + name := machineConfigPool.Name + if name == nil { + return nil, fmt.Errorf("machineConfigPool.Name must be provided to Apply") + } + result = &v1.MachineConfigPool{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineconfigpools"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *machineConfigPools) ApplyStatus(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) { + if machineConfigPool == nil { + return nil, fmt.Errorf("machineConfigPool provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineConfigPool) + if err != nil { + return nil, err + } + + name := machineConfigPool.Name + if name == nil { + return nil, fmt.Errorf("machineConfigPool.Name must be provided to Apply") + } + + result = &v1.MachineConfigPool{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineconfigpools"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go new file mode 100644 index 0000000000..6bc99dd14a --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go @@ -0,0 +1,111 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "net/http" + + v1 "github.com/openshift/api/machineconfiguration/v1" + "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type MachineconfigurationV1Interface interface { + RESTClient() rest.Interface + ContainerRuntimeConfigsGetter + ControllerConfigsGetter + KubeletConfigsGetter + MachineConfigsGetter + MachineConfigPoolsGetter +} + +// MachineconfigurationV1Client is used to interact with features provided by the machineconfiguration.openshift.io group. +type MachineconfigurationV1Client struct { + restClient rest.Interface +} + +func (c *MachineconfigurationV1Client) ContainerRuntimeConfigs() ContainerRuntimeConfigInterface { + return newContainerRuntimeConfigs(c) +} + +func (c *MachineconfigurationV1Client) ControllerConfigs() ControllerConfigInterface { + return newControllerConfigs(c) +} + +func (c *MachineconfigurationV1Client) KubeletConfigs() KubeletConfigInterface { + return newKubeletConfigs(c) +} + +func (c *MachineconfigurationV1Client) MachineConfigs() MachineConfigInterface { + return newMachineConfigs(c) +} + +func (c *MachineconfigurationV1Client) MachineConfigPools() MachineConfigPoolInterface { + return newMachineConfigPools(c) +} + +// NewForConfig creates a new MachineconfigurationV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*MachineconfigurationV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new MachineconfigurationV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*MachineconfigurationV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &MachineconfigurationV1Client{client}, nil +} + +// NewForConfigOrDie creates a new MachineconfigurationV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *MachineconfigurationV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new MachineconfigurationV1Client for the given RESTClient. +func New(c rest.Interface) *MachineconfigurationV1Client { + return &MachineconfigurationV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *MachineconfigurationV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/doc.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/doc.go new file mode 100644 index 0000000000..93a7ca4e0e --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/generated_expansion.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/generated_expansion.go new file mode 100644 index 0000000000..7fa949aeee --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/generated_expansion.go @@ -0,0 +1,11 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type MachineConfigNodeExpansion interface{} + +type MachineOSBuildExpansion interface{} + +type MachineOSConfigExpansion interface{} + +type PinnedImageSetExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfignode.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfignode.go new file mode 100644 index 0000000000..cd4117043a --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfignode.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MachineConfigNodesGetter has a method to return a MachineConfigNodeInterface. +// A group's client should implement this interface. +type MachineConfigNodesGetter interface { + MachineConfigNodes() MachineConfigNodeInterface +} + +// MachineConfigNodeInterface has methods to work with MachineConfigNode resources. +type MachineConfigNodeInterface interface { + Create(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.CreateOptions) (*v1alpha1.MachineConfigNode, error) + Update(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (*v1alpha1.MachineConfigNode, error) + UpdateStatus(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (*v1alpha1.MachineConfigNode, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MachineConfigNode, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MachineConfigNodeList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineConfigNode, err error) + Apply(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) + ApplyStatus(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) + MachineConfigNodeExpansion +} + +// machineConfigNodes implements MachineConfigNodeInterface +type machineConfigNodes struct { + client rest.Interface +} + +// newMachineConfigNodes returns a MachineConfigNodes +func newMachineConfigNodes(c *MachineconfigurationV1alpha1Client) *machineConfigNodes { + return &machineConfigNodes{ + client: c.RESTClient(), + } +} + +// Get takes name of the machineConfigNode, and returns the corresponding machineConfigNode object, and an error if there is any. +func (c *machineConfigNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MachineConfigNode, err error) { + result = &v1alpha1.MachineConfigNode{} + err = c.client.Get(). + Resource("machineconfignodes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MachineConfigNodes that match those selectors. +func (c *machineConfigNodes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MachineConfigNodeList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.MachineConfigNodeList{} + err = c.client.Get(). + Resource("machineconfignodes"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested machineConfigNodes. +func (c *machineConfigNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("machineconfignodes"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a machineConfigNode and creates it. Returns the server's representation of the machineConfigNode, and an error, if there is any. +func (c *machineConfigNodes) Create(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.CreateOptions) (result *v1alpha1.MachineConfigNode, err error) { + result = &v1alpha1.MachineConfigNode{} + err = c.client.Post(). + Resource("machineconfignodes"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfigNode). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a machineConfigNode and updates it. Returns the server's representation of the machineConfigNode, and an error, if there is any. +func (c *machineConfigNodes) Update(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (result *v1alpha1.MachineConfigNode, err error) { + result = &v1alpha1.MachineConfigNode{} + err = c.client.Put(). + Resource("machineconfignodes"). + Name(machineConfigNode.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfigNode). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *machineConfigNodes) UpdateStatus(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (result *v1alpha1.MachineConfigNode, err error) { + result = &v1alpha1.MachineConfigNode{} + err = c.client.Put(). + Resource("machineconfignodes"). + Name(machineConfigNode.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfigNode). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the machineConfigNode and deletes it. Returns an error if one occurs. +func (c *machineConfigNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("machineconfignodes"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *machineConfigNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("machineconfignodes"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched machineConfigNode. +func (c *machineConfigNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineConfigNode, err error) { + result = &v1alpha1.MachineConfigNode{} + err = c.client.Patch(pt). + Resource("machineconfignodes"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied machineConfigNode. +func (c *machineConfigNodes) Apply(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) { + if machineConfigNode == nil { + return nil, fmt.Errorf("machineConfigNode provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineConfigNode) + if err != nil { + return nil, err + } + name := machineConfigNode.Name + if name == nil { + return nil, fmt.Errorf("machineConfigNode.Name must be provided to Apply") + } + result = &v1alpha1.MachineConfigNode{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineconfignodes"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *machineConfigNodes) ApplyStatus(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) { + if machineConfigNode == nil { + return nil, fmt.Errorf("machineConfigNode provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineConfigNode) + if err != nil { + return nil, err + } + + name := machineConfigNode.Name + if name == nil { + return nil, fmt.Errorf("machineConfigNode.Name must be provided to Apply") + } + + result = &v1alpha1.MachineConfigNode{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineconfignodes"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfiguration_client.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfiguration_client.go new file mode 100644 index 0000000000..2266053dcb --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfiguration_client.go @@ -0,0 +1,106 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type MachineconfigurationV1alpha1Interface interface { + RESTClient() rest.Interface + MachineConfigNodesGetter + MachineOSBuildsGetter + MachineOSConfigsGetter + PinnedImageSetsGetter +} + +// MachineconfigurationV1alpha1Client is used to interact with features provided by the machineconfiguration.openshift.io group. +type MachineconfigurationV1alpha1Client struct { + restClient rest.Interface +} + +func (c *MachineconfigurationV1alpha1Client) MachineConfigNodes() MachineConfigNodeInterface { + return newMachineConfigNodes(c) +} + +func (c *MachineconfigurationV1alpha1Client) MachineOSBuilds() MachineOSBuildInterface { + return newMachineOSBuilds(c) +} + +func (c *MachineconfigurationV1alpha1Client) MachineOSConfigs() MachineOSConfigInterface { + return newMachineOSConfigs(c) +} + +func (c *MachineconfigurationV1alpha1Client) PinnedImageSets() PinnedImageSetInterface { + return newPinnedImageSets(c) +} + +// NewForConfig creates a new MachineconfigurationV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*MachineconfigurationV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new MachineconfigurationV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*MachineconfigurationV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &MachineconfigurationV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new MachineconfigurationV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *MachineconfigurationV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new MachineconfigurationV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *MachineconfigurationV1alpha1Client { + return &MachineconfigurationV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *MachineconfigurationV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosbuild.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosbuild.go new file mode 100644 index 0000000000..34c6cfdaee --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosbuild.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MachineOSBuildsGetter has a method to return a MachineOSBuildInterface. +// A group's client should implement this interface. +type MachineOSBuildsGetter interface { + MachineOSBuilds() MachineOSBuildInterface +} + +// MachineOSBuildInterface has methods to work with MachineOSBuild resources. +type MachineOSBuildInterface interface { + Create(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.CreateOptions) (*v1alpha1.MachineOSBuild, error) + Update(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (*v1alpha1.MachineOSBuild, error) + UpdateStatus(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (*v1alpha1.MachineOSBuild, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MachineOSBuild, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MachineOSBuildList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSBuild, err error) + Apply(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) + ApplyStatus(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) + MachineOSBuildExpansion +} + +// machineOSBuilds implements MachineOSBuildInterface +type machineOSBuilds struct { + client rest.Interface +} + +// newMachineOSBuilds returns a MachineOSBuilds +func newMachineOSBuilds(c *MachineconfigurationV1alpha1Client) *machineOSBuilds { + return &machineOSBuilds{ + client: c.RESTClient(), + } +} + +// Get takes name of the machineOSBuild, and returns the corresponding machineOSBuild object, and an error if there is any. +func (c *machineOSBuilds) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MachineOSBuild, err error) { + result = &v1alpha1.MachineOSBuild{} + err = c.client.Get(). + Resource("machineosbuilds"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MachineOSBuilds that match those selectors. +func (c *machineOSBuilds) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MachineOSBuildList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.MachineOSBuildList{} + err = c.client.Get(). + Resource("machineosbuilds"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested machineOSBuilds. +func (c *machineOSBuilds) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("machineosbuilds"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a machineOSBuild and creates it. Returns the server's representation of the machineOSBuild, and an error, if there is any. +func (c *machineOSBuilds) Create(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.CreateOptions) (result *v1alpha1.MachineOSBuild, err error) { + result = &v1alpha1.MachineOSBuild{} + err = c.client.Post(). + Resource("machineosbuilds"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineOSBuild). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a machineOSBuild and updates it. Returns the server's representation of the machineOSBuild, and an error, if there is any. +func (c *machineOSBuilds) Update(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (result *v1alpha1.MachineOSBuild, err error) { + result = &v1alpha1.MachineOSBuild{} + err = c.client.Put(). + Resource("machineosbuilds"). + Name(machineOSBuild.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineOSBuild). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *machineOSBuilds) UpdateStatus(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (result *v1alpha1.MachineOSBuild, err error) { + result = &v1alpha1.MachineOSBuild{} + err = c.client.Put(). + Resource("machineosbuilds"). + Name(machineOSBuild.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineOSBuild). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the machineOSBuild and deletes it. Returns an error if one occurs. +func (c *machineOSBuilds) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("machineosbuilds"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *machineOSBuilds) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("machineosbuilds"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched machineOSBuild. +func (c *machineOSBuilds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSBuild, err error) { + result = &v1alpha1.MachineOSBuild{} + err = c.client.Patch(pt). + Resource("machineosbuilds"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied machineOSBuild. +func (c *machineOSBuilds) Apply(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) { + if machineOSBuild == nil { + return nil, fmt.Errorf("machineOSBuild provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineOSBuild) + if err != nil { + return nil, err + } + name := machineOSBuild.Name + if name == nil { + return nil, fmt.Errorf("machineOSBuild.Name must be provided to Apply") + } + result = &v1alpha1.MachineOSBuild{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineosbuilds"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *machineOSBuilds) ApplyStatus(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) { + if machineOSBuild == nil { + return nil, fmt.Errorf("machineOSBuild provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineOSBuild) + if err != nil { + return nil, err + } + + name := machineOSBuild.Name + if name == nil { + return nil, fmt.Errorf("machineOSBuild.Name must be provided to Apply") + } + + result = &v1alpha1.MachineOSBuild{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineosbuilds"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosconfig.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosconfig.go new file mode 100644 index 0000000000..caef8fbb8a --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosconfig.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MachineOSConfigsGetter has a method to return a MachineOSConfigInterface. +// A group's client should implement this interface. +type MachineOSConfigsGetter interface { + MachineOSConfigs() MachineOSConfigInterface +} + +// MachineOSConfigInterface has methods to work with MachineOSConfig resources. +type MachineOSConfigInterface interface { + Create(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.CreateOptions) (*v1alpha1.MachineOSConfig, error) + Update(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (*v1alpha1.MachineOSConfig, error) + UpdateStatus(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (*v1alpha1.MachineOSConfig, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MachineOSConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MachineOSConfigList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSConfig, err error) + Apply(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) + ApplyStatus(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) + MachineOSConfigExpansion +} + +// machineOSConfigs implements MachineOSConfigInterface +type machineOSConfigs struct { + client rest.Interface +} + +// newMachineOSConfigs returns a MachineOSConfigs +func newMachineOSConfigs(c *MachineconfigurationV1alpha1Client) *machineOSConfigs { + return &machineOSConfigs{ + client: c.RESTClient(), + } +} + +// Get takes name of the machineOSConfig, and returns the corresponding machineOSConfig object, and an error if there is any. +func (c *machineOSConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MachineOSConfig, err error) { + result = &v1alpha1.MachineOSConfig{} + err = c.client.Get(). + Resource("machineosconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MachineOSConfigs that match those selectors. +func (c *machineOSConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MachineOSConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.MachineOSConfigList{} + err = c.client.Get(). + Resource("machineosconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested machineOSConfigs. +func (c *machineOSConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("machineosconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a machineOSConfig and creates it. Returns the server's representation of the machineOSConfig, and an error, if there is any. +func (c *machineOSConfigs) Create(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.CreateOptions) (result *v1alpha1.MachineOSConfig, err error) { + result = &v1alpha1.MachineOSConfig{} + err = c.client.Post(). + Resource("machineosconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineOSConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a machineOSConfig and updates it. Returns the server's representation of the machineOSConfig, and an error, if there is any. +func (c *machineOSConfigs) Update(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (result *v1alpha1.MachineOSConfig, err error) { + result = &v1alpha1.MachineOSConfig{} + err = c.client.Put(). + Resource("machineosconfigs"). + Name(machineOSConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineOSConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *machineOSConfigs) UpdateStatus(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (result *v1alpha1.MachineOSConfig, err error) { + result = &v1alpha1.MachineOSConfig{} + err = c.client.Put(). + Resource("machineosconfigs"). + Name(machineOSConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineOSConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the machineOSConfig and deletes it. Returns an error if one occurs. +func (c *machineOSConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("machineosconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *machineOSConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("machineosconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched machineOSConfig. +func (c *machineOSConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSConfig, err error) { + result = &v1alpha1.MachineOSConfig{} + err = c.client.Patch(pt). + Resource("machineosconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied machineOSConfig. +func (c *machineOSConfigs) Apply(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) { + if machineOSConfig == nil { + return nil, fmt.Errorf("machineOSConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineOSConfig) + if err != nil { + return nil, err + } + name := machineOSConfig.Name + if name == nil { + return nil, fmt.Errorf("machineOSConfig.Name must be provided to Apply") + } + result = &v1alpha1.MachineOSConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineosconfigs"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *machineOSConfigs) ApplyStatus(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) { + if machineOSConfig == nil { + return nil, fmt.Errorf("machineOSConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineOSConfig) + if err != nil { + return nil, err + } + + name := machineOSConfig.Name + if name == nil { + return nil, fmt.Errorf("machineOSConfig.Name must be provided to Apply") + } + + result = &v1alpha1.MachineOSConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineosconfigs"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/pinnedimageset.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/pinnedimageset.go new file mode 100644 index 0000000000..108e42b005 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/pinnedimageset.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// PinnedImageSetsGetter has a method to return a PinnedImageSetInterface. +// A group's client should implement this interface. +type PinnedImageSetsGetter interface { + PinnedImageSets() PinnedImageSetInterface +} + +// PinnedImageSetInterface has methods to work with PinnedImageSet resources. +type PinnedImageSetInterface interface { + Create(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.CreateOptions) (*v1alpha1.PinnedImageSet, error) + Update(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (*v1alpha1.PinnedImageSet, error) + UpdateStatus(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (*v1alpha1.PinnedImageSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PinnedImageSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PinnedImageSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PinnedImageSet, err error) + Apply(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) + ApplyStatus(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) + PinnedImageSetExpansion +} + +// pinnedImageSets implements PinnedImageSetInterface +type pinnedImageSets struct { + client rest.Interface +} + +// newPinnedImageSets returns a PinnedImageSets +func newPinnedImageSets(c *MachineconfigurationV1alpha1Client) *pinnedImageSets { + return &pinnedImageSets{ + client: c.RESTClient(), + } +} + +// Get takes name of the pinnedImageSet, and returns the corresponding pinnedImageSet object, and an error if there is any. +func (c *pinnedImageSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PinnedImageSet, err error) { + result = &v1alpha1.PinnedImageSet{} + err = c.client.Get(). + Resource("pinnedimagesets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PinnedImageSets that match those selectors. +func (c *pinnedImageSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PinnedImageSetList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.PinnedImageSetList{} + err = c.client.Get(). + Resource("pinnedimagesets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested pinnedImageSets. +func (c *pinnedImageSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("pinnedimagesets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a pinnedImageSet and creates it. Returns the server's representation of the pinnedImageSet, and an error, if there is any. +func (c *pinnedImageSets) Create(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.CreateOptions) (result *v1alpha1.PinnedImageSet, err error) { + result = &v1alpha1.PinnedImageSet{} + err = c.client.Post(). + Resource("pinnedimagesets"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pinnedImageSet). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a pinnedImageSet and updates it. Returns the server's representation of the pinnedImageSet, and an error, if there is any. +func (c *pinnedImageSets) Update(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (result *v1alpha1.PinnedImageSet, err error) { + result = &v1alpha1.PinnedImageSet{} + err = c.client.Put(). + Resource("pinnedimagesets"). + Name(pinnedImageSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pinnedImageSet). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *pinnedImageSets) UpdateStatus(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (result *v1alpha1.PinnedImageSet, err error) { + result = &v1alpha1.PinnedImageSet{} + err = c.client.Put(). + Resource("pinnedimagesets"). + Name(pinnedImageSet.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pinnedImageSet). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the pinnedImageSet and deletes it. Returns an error if one occurs. +func (c *pinnedImageSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("pinnedimagesets"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *pinnedImageSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("pinnedimagesets"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched pinnedImageSet. +func (c *pinnedImageSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PinnedImageSet, err error) { + result = &v1alpha1.PinnedImageSet{} + err = c.client.Patch(pt). + Resource("pinnedimagesets"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied pinnedImageSet. +func (c *pinnedImageSets) Apply(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) { + if pinnedImageSet == nil { + return nil, fmt.Errorf("pinnedImageSet provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(pinnedImageSet) + if err != nil { + return nil, err + } + name := pinnedImageSet.Name + if name == nil { + return nil, fmt.Errorf("pinnedImageSet.Name must be provided to Apply") + } + result = &v1alpha1.PinnedImageSet{} + err = c.client.Patch(types.ApplyPatchType). + Resource("pinnedimagesets"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *pinnedImageSets) ApplyStatus(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) { + if pinnedImageSet == nil { + return nil, fmt.Errorf("pinnedImageSet provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(pinnedImageSet) + if err != nil { + return nil, err + } + + name := pinnedImageSet.Name + if name == nil { + return nil, fmt.Errorf("pinnedImageSet.Name must be provided to Apply") + } + + result = &v1alpha1.PinnedImageSet{} + err = c.client.Patch(types.ApplyPatchType). + Resource("pinnedimagesets"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 6692aca407..914dffdee7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -290,6 +290,8 @@ github.com/openshift/api/machine github.com/openshift/api/machine/v1 github.com/openshift/api/machine/v1alpha1 github.com/openshift/api/machine/v1beta1 +github.com/openshift/api/machineconfiguration/v1 +github.com/openshift/api/machineconfiguration/v1alpha1 github.com/openshift/api/monitoring github.com/openshift/api/monitoring/v1 github.com/openshift/api/network @@ -339,7 +341,7 @@ github.com/openshift/build-machinery-go/make/targets/golang github.com/openshift/build-machinery-go/make/targets/openshift github.com/openshift/build-machinery-go/make/targets/openshift/operator github.com/openshift/build-machinery-go/scripts -# github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 +# github.com/openshift/client-go v0.0.0-20240821135114-75c118605d5f ## explicit; go 1.22.0 github.com/openshift/client-go/apps/applyconfigurations/apps/v1 github.com/openshift/client-go/apps/applyconfigurations/internal @@ -362,6 +364,13 @@ github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1 github.com/openshift/client-go/config/informers/externalversions/internalinterfaces github.com/openshift/client-go/config/listers/config/v1 github.com/openshift/client-go/config/listers/config/v1alpha1 +github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal +github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1 +github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1 +github.com/openshift/client-go/machineconfiguration/clientset/versioned +github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme +github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1 +github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1 github.com/openshift/client-go/operator/applyconfigurations/internal github.com/openshift/client-go/operator/applyconfigurations/operator/v1 github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1