зеркало из https://github.com/Azure/ARO-RP.git
vendor openshift/machine-config-operator
This commit is contained in:
Родитель
abf0a438e2
Коммит
85d74ec248
|
@ -996,12 +996,12 @@
|
|||
revision = "9a3a7bbe9258f5c3117cb2aba6a560babe0d59f8"
|
||||
|
||||
[[projects]]
|
||||
branch = "release-4.3"
|
||||
branch = "release-4.4"
|
||||
digest = "1:9d86fe2d97d035702ab624b98c8bdb64436bafcba5538b26f3263f7e1a053f41"
|
||||
name = "github.com/openshift/cluster-api-provider-azure"
|
||||
packages = ["pkg/apis/azureprovider/v1beta1"]
|
||||
pruneopts = "UT"
|
||||
revision = "86ecb23daa83c78761414a7abcb169c73c18a756"
|
||||
revision = "81d7d701e070ce2759126392999ff27f5eeeb3a0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -1139,8 +1139,8 @@
|
|||
revision = "a3345f5a437a8ca82be683c7c38fe49de64c2b5f"
|
||||
|
||||
[[projects]]
|
||||
branch = "release-4.3"
|
||||
digest = "1:4e5ae751b5ab70dafe0109f5edd432b142a8256c37ac348d8758eb18059dd07c"
|
||||
branch = "release-4.4"
|
||||
digest = "1:9e7c4a0c38718e50afa2b68af42898ee83d2a8802443b065e0d08f8d3b8ef27e"
|
||||
name = "github.com/openshift/machine-config-operator"
|
||||
packages = [
|
||||
"pkg/apis/machineconfiguration.openshift.io/v1",
|
||||
|
@ -1151,7 +1151,7 @@
|
|||
"pkg/generated/clientset/versioned/typed/machineconfiguration.openshift.io/v1/fake",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "25bb6aeb58135c38a667e849edf5244871be4992"
|
||||
revision = "da87dd6d947d66eb810d74622fb7664289148423"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:c7d8ecc4e8f2843096c784e55a221446cb944b9e728fb42e9272a9ad2996c780"
|
||||
|
|
|
@ -44,7 +44,7 @@ required = [
|
|||
|
||||
[[constraint]]
|
||||
name = "github.com/openshift/cluster-api-provider-azure"
|
||||
branch = "release-4.3"
|
||||
branch = "release-4.4"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/openshift/installer"
|
||||
|
@ -53,7 +53,7 @@ required = [
|
|||
|
||||
[[override]]
|
||||
name = "github.com/openshift/machine-config-operator"
|
||||
branch = "release-4.3"
|
||||
branch = "release-4.4"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/openshift/console-operator"
|
||||
|
|
19
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/helpers.go
сгенерированный
поставляемый
19
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/helpers.go
сгенерированный
поставляемый
|
@ -21,6 +21,7 @@ func MergeMachineConfigs(configs []*MachineConfig, osImageURL string) *MachineCo
|
|||
sort.Slice(configs, func(i, j int) bool { return configs[i].Name < configs[j].Name })
|
||||
|
||||
var fips bool
|
||||
var kernelType string
|
||||
outIgn := configs[0].Spec.Config
|
||||
for idx := 1; idx < len(configs); idx++ {
|
||||
// if any of the config has FIPS enabled, it'll be set
|
||||
|
@ -29,6 +30,23 @@ func MergeMachineConfigs(configs []*MachineConfig, osImageURL string) *MachineCo
|
|||
}
|
||||
outIgn = ign.Append(outIgn, configs[idx].Spec.Config)
|
||||
}
|
||||
|
||||
// sets the KernelType if specified in any of the MachineConfig
|
||||
// Setting kerneType to realtime in any of MachineConfig takes priority
|
||||
for _, cfg := range configs {
|
||||
if cfg.Spec.KernelType == "realtime" {
|
||||
kernelType = cfg.Spec.KernelType
|
||||
break
|
||||
} else if kernelType == "default" {
|
||||
kernelType = cfg.Spec.KernelType
|
||||
}
|
||||
}
|
||||
|
||||
// If no MC sets kerneType, then set it to 'default' since that's what it is using
|
||||
if kernelType == "" {
|
||||
kernelType = "default"
|
||||
}
|
||||
|
||||
kargs := []string{}
|
||||
for _, cfg := range configs {
|
||||
kargs = append(kargs, cfg.Spec.KernelArguments...)
|
||||
|
@ -40,6 +58,7 @@ func MergeMachineConfigs(configs []*MachineConfig, osImageURL string) *MachineCo
|
|||
KernelArguments: kargs,
|
||||
Config: outIgn,
|
||||
FIPS: fips,
|
||||
KernelType: kernelType,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
1
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/register.go
сгенерированный
поставляемый
1
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/register.go
сгенерированный
поставляемый
|
@ -24,7 +24,6 @@ var (
|
|||
// addKnownTypes adds types to API group
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(GroupVersion,
|
||||
&MCOConfig{},
|
||||
&ContainerRuntimeConfig{},
|
||||
&ContainerRuntimeConfigList{},
|
||||
&ControllerConfig{},
|
||||
|
|
40
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/types.go
сгенерированный
поставляемый
40
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/types.go
сгенерированный
поставляемый
|
@ -10,32 +10,6 @@ import (
|
|||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +genclient:noStatus
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// MCOConfig describes configuration for MachineConfigOperator.
|
||||
type MCOConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec MCOConfigSpec `json:"spec"`
|
||||
}
|
||||
|
||||
// MCOConfigSpec is the spec for MCOConfig resource.
|
||||
type MCOConfigSpec struct {
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// MCOConfigList is a list of MCOConfig resources
|
||||
type MCOConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
|
||||
Items []MCOConfig `json:"items"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
@ -82,8 +56,13 @@ type ControllerConfigSpec struct {
|
|||
// rootCAData specifies the root CA data
|
||||
RootCAData []byte `json:"rootCAData"`
|
||||
|
||||
// cloudProvider specifies the cloud provider CA data
|
||||
// +nullable
|
||||
CloudProviderCAData []byte `json:"cloudProviderCAData"`
|
||||
|
||||
// additionalTrustBundle is a certificate bundle that will be added to the nodes
|
||||
// trusted certificate store.
|
||||
// +nullable
|
||||
AdditionalTrustBundle []byte `json:"additionalTrustBundle"`
|
||||
|
||||
// TODO: Investigate using a ConfigMapNameReference for the PullSecret and OSImageURL
|
||||
|
@ -100,11 +79,16 @@ type ControllerConfigSpec struct {
|
|||
OSImageURL string `json:"osImageURL"`
|
||||
|
||||
// proxy holds the current proxy configuration for the nodes
|
||||
// +nullable
|
||||
Proxy *configv1.ProxyStatus `json:"proxy"`
|
||||
|
||||
// infra holds the infrastructure details
|
||||
// TODO this makes platform redundant as everything is contained inside Infra.Status
|
||||
// +nullable
|
||||
Infra *configv1.Infrastructure `json:"infra"`
|
||||
|
||||
// kubeletIPv6 is true to force a single-stack IPv6 kubelet config
|
||||
KubeletIPv6 bool `json:"kubeletIPv6,omitempty"`
|
||||
}
|
||||
|
||||
// ControllerConfigStatus is the status for ControllerConfig
|
||||
|
@ -183,9 +167,11 @@ type MachineConfigSpec struct {
|
|||
// Config is a Ignition Config object.
|
||||
Config igntypes.Config `json:"config"`
|
||||
|
||||
// +nullable
|
||||
KernelArguments []string `json:"kernelArguments"`
|
||||
|
||||
FIPS bool `json:"fips"`
|
||||
FIPS bool `json:"fips"`
|
||||
KernelType string `json:"kernelType"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
|
81
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/zz_generated.deepcopy.go
сгенерированный
поставляемый
81
vendor/github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1/zz_generated.deepcopy.go
сгенерированный
поставляемый
|
@ -241,6 +241,11 @@ func (in *ControllerConfigSpec) DeepCopyInto(out *ControllerConfigSpec) {
|
|||
*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))
|
||||
|
@ -448,82 +453,6 @@ func (in *KubeletConfigStatus) DeepCopy() *KubeletConfigStatus {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MCOConfig) DeepCopyInto(out *MCOConfig) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MCOConfig.
|
||||
func (in *MCOConfig) DeepCopy() *MCOConfig {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MCOConfig)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *MCOConfig) 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 *MCOConfigList) DeepCopyInto(out *MCOConfigList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]MCOConfig, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MCOConfigList.
|
||||
func (in *MCOConfigList) DeepCopy() *MCOConfigList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MCOConfigList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *MCOConfigList) 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 *MCOConfigSpec) DeepCopyInto(out *MCOConfigSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MCOConfigSpec.
|
||||
func (in *MCOConfigSpec) DeepCopy() *MCOConfigSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MCOConfigSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
|
@ -24,10 +24,6 @@ func (c *FakeMachineconfigurationV1) KubeletConfigs() v1.KubeletConfigInterface
|
|||
return &FakeKubeletConfigs{c}
|
||||
}
|
||||
|
||||
func (c *FakeMachineconfigurationV1) MCOConfigs(namespace string) v1.MCOConfigInterface {
|
||||
return &FakeMCOConfigs{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeMachineconfigurationV1) MachineConfigs() v1.MachineConfigInterface {
|
||||
return &FakeMachineConfigs{c}
|
||||
}
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
machineconfigurationopenshiftiov1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeMCOConfigs implements MCOConfigInterface
|
||||
type FakeMCOConfigs struct {
|
||||
Fake *FakeMachineconfigurationV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var mcoconfigsResource = schema.GroupVersionResource{Group: "machineconfiguration.openshift.io", Version: "v1", Resource: "mcoconfigs"}
|
||||
|
||||
var mcoconfigsKind = schema.GroupVersionKind{Group: "machineconfiguration.openshift.io", Version: "v1", Kind: "MCOConfig"}
|
||||
|
||||
// Get takes name of the mCOConfig, and returns the corresponding mCOConfig object, and an error if there is any.
|
||||
func (c *FakeMCOConfigs) Get(name string, options v1.GetOptions) (result *machineconfigurationopenshiftiov1.MCOConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(mcoconfigsResource, c.ns, name), &machineconfigurationopenshiftiov1.MCOConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*machineconfigurationopenshiftiov1.MCOConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MCOConfigs that match those selectors.
|
||||
func (c *FakeMCOConfigs) List(opts v1.ListOptions) (result *machineconfigurationopenshiftiov1.MCOConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(mcoconfigsResource, mcoconfigsKind, c.ns, opts), &machineconfigurationopenshiftiov1.MCOConfigList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &machineconfigurationopenshiftiov1.MCOConfigList{ListMeta: obj.(*machineconfigurationopenshiftiov1.MCOConfigList).ListMeta}
|
||||
for _, item := range obj.(*machineconfigurationopenshiftiov1.MCOConfigList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested mCOConfigs.
|
||||
func (c *FakeMCOConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(mcoconfigsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a mCOConfig and creates it. Returns the server's representation of the mCOConfig, and an error, if there is any.
|
||||
func (c *FakeMCOConfigs) Create(mCOConfig *machineconfigurationopenshiftiov1.MCOConfig) (result *machineconfigurationopenshiftiov1.MCOConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(mcoconfigsResource, c.ns, mCOConfig), &machineconfigurationopenshiftiov1.MCOConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*machineconfigurationopenshiftiov1.MCOConfig), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a mCOConfig and updates it. Returns the server's representation of the mCOConfig, and an error, if there is any.
|
||||
func (c *FakeMCOConfigs) Update(mCOConfig *machineconfigurationopenshiftiov1.MCOConfig) (result *machineconfigurationopenshiftiov1.MCOConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(mcoconfigsResource, c.ns, mCOConfig), &machineconfigurationopenshiftiov1.MCOConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*machineconfigurationopenshiftiov1.MCOConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the mCOConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeMCOConfigs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(mcoconfigsResource, c.ns, name), &machineconfigurationopenshiftiov1.MCOConfig{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMCOConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(mcoconfigsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &machineconfigurationopenshiftiov1.MCOConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched mCOConfig.
|
||||
func (c *FakeMCOConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *machineconfigurationopenshiftiov1.MCOConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(mcoconfigsResource, c.ns, name, pt, data, subresources...), &machineconfigurationopenshiftiov1.MCOConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*machineconfigurationopenshiftiov1.MCOConfig), err
|
||||
}
|
|
@ -8,8 +8,6 @@ type ControllerConfigExpansion interface{}
|
|||
|
||||
type KubeletConfigExpansion interface{}
|
||||
|
||||
type MCOConfigExpansion interface{}
|
||||
|
||||
type MachineConfigExpansion interface{}
|
||||
|
||||
type MachineConfigPoolExpansion interface{}
|
||||
|
|
|
@ -13,7 +13,6 @@ type MachineconfigurationV1Interface interface {
|
|||
ContainerRuntimeConfigsGetter
|
||||
ControllerConfigsGetter
|
||||
KubeletConfigsGetter
|
||||
MCOConfigsGetter
|
||||
MachineConfigsGetter
|
||||
MachineConfigPoolsGetter
|
||||
}
|
||||
|
@ -35,10 +34,6 @@ func (c *MachineconfigurationV1Client) KubeletConfigs() KubeletConfigInterface {
|
|||
return newKubeletConfigs(c)
|
||||
}
|
||||
|
||||
func (c *MachineconfigurationV1Client) MCOConfigs(namespace string) MCOConfigInterface {
|
||||
return newMCOConfigs(c, namespace)
|
||||
}
|
||||
|
||||
func (c *MachineconfigurationV1Client) MachineConfigs() MachineConfigInterface {
|
||||
return newMachineConfigs(c)
|
||||
}
|
||||
|
|
|
@ -1,158 +0,0 @@
|
|||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
|
||||
scheme "github.com/openshift/machine-config-operator/pkg/generated/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"
|
||||
)
|
||||
|
||||
// MCOConfigsGetter has a method to return a MCOConfigInterface.
|
||||
// A group's client should implement this interface.
|
||||
type MCOConfigsGetter interface {
|
||||
MCOConfigs(namespace string) MCOConfigInterface
|
||||
}
|
||||
|
||||
// MCOConfigInterface has methods to work with MCOConfig resources.
|
||||
type MCOConfigInterface interface {
|
||||
Create(*v1.MCOConfig) (*v1.MCOConfig, error)
|
||||
Update(*v1.MCOConfig) (*v1.MCOConfig, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.MCOConfig, error)
|
||||
List(opts metav1.ListOptions) (*v1.MCOConfigList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MCOConfig, err error)
|
||||
MCOConfigExpansion
|
||||
}
|
||||
|
||||
// mCOConfigs implements MCOConfigInterface
|
||||
type mCOConfigs struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newMCOConfigs returns a MCOConfigs
|
||||
func newMCOConfigs(c *MachineconfigurationV1Client, namespace string) *mCOConfigs {
|
||||
return &mCOConfigs{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the mCOConfig, and returns the corresponding mCOConfig object, and an error if there is any.
|
||||
func (c *mCOConfigs) Get(name string, options metav1.GetOptions) (result *v1.MCOConfig, err error) {
|
||||
result = &v1.MCOConfig{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MCOConfigs that match those selectors.
|
||||
func (c *mCOConfigs) List(opts metav1.ListOptions) (result *v1.MCOConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.MCOConfigList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested mCOConfigs.
|
||||
func (c *mCOConfigs) Watch(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().
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a mCOConfig and creates it. Returns the server's representation of the mCOConfig, and an error, if there is any.
|
||||
func (c *mCOConfigs) Create(mCOConfig *v1.MCOConfig) (result *v1.MCOConfig, err error) {
|
||||
result = &v1.MCOConfig{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
Body(mCOConfig).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a mCOConfig and updates it. Returns the server's representation of the mCOConfig, and an error, if there is any.
|
||||
func (c *mCOConfigs) Update(mCOConfig *v1.MCOConfig) (result *v1.MCOConfig, err error) {
|
||||
result = &v1.MCOConfig{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
Name(mCOConfig.Name).
|
||||
Body(mCOConfig).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the mCOConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *mCOConfigs) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *mCOConfigs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched mCOConfig.
|
||||
func (c *mCOConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MCOConfig, err error) {
|
||||
result = &v1.MCOConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("mcoconfigs").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
Загрузка…
Ссылка в новой задаче