v1alpha1

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +k8s:defaulter-gen=TypeMeta +groupName=ops.kubevault.com

Index

Constants

View Source
const (
	AccessApproved               = "Approved"
	AccessDenied                 = "Denied"
	Failed                       = "Failed"
	NodeCreated                  = "NodeCreated"
	NodeDeleted                  = "NodeDeleted"
	NodeRestarted                = "NodeRestarted"
	PauseVaultServer             = "PauseVaultServer"
	Progressing                  = "Progressing"
	ResumeVaultServer            = "ResumeVaultServer"
	Successful                   = "Successful"
	Updating                     = "Updating"
	UpdateStatefulSets           = "UpdateStatefulSets"
	RestartNodes                 = "RestartNodes"
	TLSRemoved                   = "TLSRemoved"
	TLSAdded                     = "TLSAdded"
	TLSChanged                   = "TLSChanged"
	IssuingConditionUpdated      = "IssuingConditionUpdated"
	CertificateIssuingSuccessful = "CertificateIssuingSuccessful"
	TLSEnabling                  = "TLSEnabling"
	Restart                      = "Restart"
	RestartStatefulSet           = "RestartStatefulSet"
	CertificateSynced            = "CertificateSynced"
	Reconciled                   = "Reconciled"
	RestartStatefulSetPods       = "RestartStatefulSetPods"
)

List of possible condition types for a ops request

View Source
const (
	ResourceCodeVaultOpsRequest     = "vsops"
	ResourceKindVaultOpsRequest     = "VaultOpsRequest"
	ResourceSingularVaultOpsRequest = "vaultopsrequest"
	ResourcePluralVaultOpsRequest   = "vaultopsrequests"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: ops.GroupName, Version: "v1alpha1"}

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type OpsRequestPhase

type OpsRequestPhase string

+kubebuilder:validation:Enum=Pending;Progressing;Successful;WaitingForApproval;Failed;Approved;Denied

const (
	// used for ops requests that are currently in queue
	OpsRequestPhasePending OpsRequestPhase = "Pending"
	// used for ops requests that are currently Progressing
	OpsRequestPhaseProgressing OpsRequestPhase = "Progressing"
	// used for ops requests that are executed successfully
	OpsRequestPhaseSuccessful OpsRequestPhase = "Successful"
	// used for ops requests that are waiting for approval
	OpsRequestPhaseWaitingForApproval OpsRequestPhase = "WaitingForApproval"
	// used for ops requests that are failed
	OpsRequestPhaseFailed OpsRequestPhase = "Failed"
	// used for ops requests that are approved
	OpsRequestApproved OpsRequestPhase = "Approved"
	// used for ops requests that are denied
	OpsRequestDenied OpsRequestPhase = "Denied"
)

type OpsRequestType

type OpsRequestType string

+kubebuilder:validation:Enum=ReconfigureTLS;Restart

const (
	// used for Restart operation
	OpsRequestTypeRestart OpsRequestType = "Restart"

	// used for ReconfigureTLS operation
	OpsRequestTypeReconfigureTLSs OpsRequestType = "ReconfigureTLS"
)

type RestartSpec

type RestartSpec struct{}

func (*RestartSpec) DeepCopy

func (in *RestartSpec) DeepCopy() *RestartSpec

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

func (*RestartSpec) DeepCopyInto

func (in *RestartSpec) DeepCopyInto(out *RestartSpec)

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

type TLSSpec

type TLSSpec struct {
	// TLSConfig contains updated tls configurations for client and server.
	// +optional
	kmapi.TLSConfig `json:",inline,omitempty"`

	// RotateCertificates tells operator to initiate certificate rotation
	// +optional
	RotateCertificates bool `json:"rotateCertificates,omitempty"`

	// Remove tells operator to remove TLS configuration
	// +optional
	Remove bool `json:"remove,omitempty"`
}

func (*TLSSpec) DeepCopy

func (in *TLSSpec) DeepCopy() *TLSSpec

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

func (*TLSSpec) DeepCopyInto

func (in *TLSSpec) DeepCopyInto(out *TLSSpec)

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

type VaultOpsRequest

type VaultOpsRequest struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              VaultOpsRequestSpec   `json:"spec,omitempty"`
	Status            VaultOpsRequestStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=vaultopsrequests,singular=vaultopsrequest,shortName=vsops,categories={security,kubevault,appscode} +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (VaultOpsRequest) CustomResourceDefinition

func (_ VaultOpsRequest) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*VaultOpsRequest) DeepCopy

func (in *VaultOpsRequest) DeepCopy() *VaultOpsRequest

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

func (*VaultOpsRequest) DeepCopyInto

func (in *VaultOpsRequest) DeepCopyInto(out *VaultOpsRequest)

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

func (*VaultOpsRequest) DeepCopyObject

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

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

func (VaultOpsRequest) ResourceFQN

func (e VaultOpsRequest) ResourceFQN() string

func (VaultOpsRequest) ResourceKind

func (e VaultOpsRequest) ResourceKind() string

func (VaultOpsRequest) ResourcePlural

func (e VaultOpsRequest) ResourcePlural() string

func (VaultOpsRequest) ResourceShortCode

func (e VaultOpsRequest) ResourceShortCode() string

func (VaultOpsRequest) ResourceSingular

func (e VaultOpsRequest) ResourceSingular() string

func (VaultOpsRequest) ValidateSpecs

func (e VaultOpsRequest) ValidateSpecs() error

type VaultOpsRequestList

type VaultOpsRequestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of VaultOpsRequest CRD objects
	Items []VaultOpsRequest `json:"items,omitempty"`
}

VaultOpsRequestList is a list of VaultOpsRequests

func (*VaultOpsRequestList) DeepCopy

func (in *VaultOpsRequestList) DeepCopy() *VaultOpsRequestList

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

func (*VaultOpsRequestList) DeepCopyInto

func (in *VaultOpsRequestList) DeepCopyInto(out *VaultOpsRequestList)

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

func (*VaultOpsRequestList) DeepCopyObject

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

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

type VaultOpsRequestSpec

type VaultOpsRequestSpec struct {
	// Specifies the Vault reference
	VaultRef core.LocalObjectReference `json:"vaultRef"`

	// Specifies the ops request type: ReconfigureTLS, Upgrade, etc.
	Type OpsRequestType `json:"type"`

	// Specifies information necessary for configuring TLS
	TLS *TLSSpec `json:"tls,omitempty"`

	// Specifies information necessary for restarting VaultServer
	Restart *RestartSpec `json:"restart,omitempty"`

	// Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.
	Timeout *metav1.Duration `json:"timeout,omitempty"`
}

VaultOpsRequestSpec is the spec for VaultOpsRequest

func (*VaultOpsRequestSpec) DeepCopy

func (in *VaultOpsRequestSpec) DeepCopy() *VaultOpsRequestSpec

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

func (*VaultOpsRequestSpec) DeepCopyInto

func (in *VaultOpsRequestSpec) DeepCopyInto(out *VaultOpsRequestSpec)

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

type VaultOpsRequestStatus

type VaultOpsRequestStatus struct {
	// Specifies the current phase of the ops request
	// +optional
	Phase OpsRequestPhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the request, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

VaultOpsRequestStatus is the status for VaultOpsRequest

func (*VaultOpsRequestStatus) DeepCopy

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

func (*VaultOpsRequestStatus) DeepCopyInto

func (in *VaultOpsRequestStatus) DeepCopyInto(out *VaultOpsRequestStatus)

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