v1alpha1

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=nfs.rook.io

Copyright 2018 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	CustomResourceGroup = "nfs.rook.io"
	Version             = "v1alpha1"
)
View Source
const (
	EventCreated = "Created"
	EventUpdated = "Updated"
	EventFailed  = "Failed"
)
View Source
const (
	Finalizer = "nfsserver.nfs.rook.io"
)

Variables

View Source
var (
	// SchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AllowedClientsSpec

type AllowedClientsSpec struct {

	// Name of the clients group
	Name string `json:"name,omitempty"`

	// The clients that can access the share
	// Values can be hostname, ip address, netgroup, CIDR network address, or all
	Clients []string `json:"clients,omitempty"`

	// Reading and Writing permissions for the client to access the NFS export
	// Valid values are "ReadOnly", "ReadWrite" and "none"
	// Gets overridden when ServerSpec.accessMode is specified
	// +kubebuilder:validation:Enum=ReadOnly;ReadWrite;none
	AccessMode string `json:"accessMode,omitempty"`

	// Squash options for clients
	// Valid values are "none", "rootid", "root", and "all"
	// Gets overridden when ServerSpec.squash is specified
	// +kubebuilder:validation:Enum=none;rootid;root;all
	Squash string `json:"squash,omitempty"`
}

AllowedClientsSpec represents the client specs for accessing the NFS export

func (*AllowedClientsSpec) DeepCopy

func (in *AllowedClientsSpec) DeepCopy() *AllowedClientsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedClientsSpec.

func (*AllowedClientsSpec) DeepCopyInto

func (in *AllowedClientsSpec) DeepCopyInto(out *AllowedClientsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExportsSpec

type ExportsSpec struct {
	// Name of the export
	Name string `json:"name,omitempty"`

	// The NFS server configuration
	Server ServerSpec `json:"server,omitempty"`

	// PVC from which the NFS daemon gets storage for sharing
	PersistentVolumeClaim v1.PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
}

ExportsSpec represents the spec of NFS exports

func (*ExportsSpec) DeepCopy

func (in *ExportsSpec) DeepCopy() *ExportsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportsSpec.

func (*ExportsSpec) DeepCopyInto

func (in *ExportsSpec) DeepCopyInto(out *ExportsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NFSServer

type NFSServer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NFSServerSpec   `json:"spec,omitempty"`
	Status NFSServerStatus `json:"status,omitempty"`
}

NFSServer is the Schema for the nfsservers API

func (*NFSServer) DeepCopy

func (in *NFSServer) DeepCopy() *NFSServer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFSServer.

func (*NFSServer) DeepCopyInto

func (in *NFSServer) DeepCopyInto(out *NFSServer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NFSServer) DeepCopyObject

func (in *NFSServer) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NFSServer) Default added in v1.7.3

func (r *NFSServer) Default()

Default implements webhook.Defaulter contains mutating webhook admission logic.

func (*NFSServer) ValidateCreate added in v1.7.3

func (r *NFSServer) ValidateCreate() error

ValidateCreate implements webhook.Validator contains validating webhook admission logic for CREATE operation

func (*NFSServer) ValidateDelete added in v1.7.3

func (r *NFSServer) ValidateDelete() error

ValidateDelete implements webhook.Validator contains validating webhook admission logic for DELETE operation

func (*NFSServer) ValidateSpec added in v1.7.3

func (r *NFSServer) ValidateSpec() error

ValidateSpec validate NFSServer spec.

func (*NFSServer) ValidateUpdate added in v1.7.3

func (r *NFSServer) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator contains validating webhook admission logic for UPDATE operation

type NFSServerList

type NFSServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []NFSServer `json:"items"`
}

NFSServerList contains a list of NFSServer

func (*NFSServerList) DeepCopy

func (in *NFSServerList) DeepCopy() *NFSServerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFSServerList.

func (*NFSServerList) DeepCopyInto

func (in *NFSServerList) DeepCopyInto(out *NFSServerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NFSServerList) DeepCopyObject

func (in *NFSServerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NFSServerSpec

type NFSServerSpec struct {
	// The annotations-related configuration to add/set on each Pod related object.
	Annotations map[string]string `json:"annotations,omitempty"`

	// Replicas of the NFS daemon
	Replicas int `json:"replicas,omitempty"`

	// The parameters to configure the NFS export
	Exports []ExportsSpec `json:"exports,omitempty"`
}

NFSServerSpec represents the spec of NFS daemon

func (*NFSServerSpec) DeepCopy

func (in *NFSServerSpec) DeepCopy() *NFSServerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFSServerSpec.

func (*NFSServerSpec) DeepCopyInto

func (in *NFSServerSpec) DeepCopyInto(out *NFSServerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NFSServerState added in v1.7.3

type NFSServerState string
const (
	StateInitializing NFSServerState = "Initializing"
	StatePending      NFSServerState = "Pending"
	StateRunning      NFSServerState = "Running"
	StateError        NFSServerState = "Error"
)

type NFSServerStatus added in v1.7.3

type NFSServerStatus struct {
	State   NFSServerState `json:"state,omitempty"`
	Message string         `json:"message,omitempty"`
	Reason  string         `json:"reason,omitempty"`
}

NFSServerStatus defines the observed state of NFSServer

func (*NFSServerStatus) DeepCopy added in v1.7.3

func (in *NFSServerStatus) DeepCopy() *NFSServerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFSServerStatus.

func (*NFSServerStatus) DeepCopyInto added in v1.7.3

func (in *NFSServerStatus) DeepCopyInto(out *NFSServerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServerSpec

type ServerSpec struct {
	// Reading and Writing permissions on the export
	// Valid values are "ReadOnly", "ReadWrite" and "none"
	// +kubebuilder:validation:Enum=ReadOnly;ReadWrite;none
	AccessMode string `json:"accessMode,omitempty"`

	// This prevents the root users connected remotely from having root privileges
	// Valid values are "none", "rootid", "root", and "all"
	// +kubebuilder:validation:Enum=none;rootid;root;all
	Squash string `json:"squash,omitempty"`

	// The clients allowed to access the NFS export
	// +optional
	AllowedClients []AllowedClientsSpec `json:"allowedClients,omitempty"`
}

ServerSpec represents the spec for configuring the NFS server

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSpec.

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL