v1alpha1

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the numaplane.numaproj.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=numaplane.numaproj.io

Index

Constants

View Source
const (
	GitSyncPhasePending GitSyncPhase = "Pending"
	GitSyncPhaseRunning GitSyncPhase = "Running"
	GitSyncPhaseFailed  GitSyncPhase = "Failed"
	GitSyncPhaseNA      GitSyncPhase = "NotApplicable" // use this for the case in which this cluster isn't listed as a Destination

	// GitSyncConditionConfigured has the status True when the GitSync
	// has valid configuration.
	GitSyncConditionConfigured ConditionType = "Configured"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "numaplane.numaproj.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	GitSyncGroupVersionKind     = SchemeGroupVersion.WithKind("GitSync")
	GitSyncGroupVersionResource = SchemeGroupVersion.WithResource("gitsyncs")
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CommitStatus

type CommitStatus struct {
	// Hash of the git commit
	Hash string `json:"hash"`

	// Synced indicates if the sync went through
	Synced bool `json:"synced"`

	// SyncTime represents the last time that we attempted to sync this commit (regardless of whether it succeeded)
	SyncTime metav1.Time `json:"syncTime"`

	// Error indicates an error that occurred upon attempting sync, if any
	Error string `json:"error,omitempty"`
}

CommitStatus maintains the status of syncing an individual Git commit

func (*CommitStatus) DeepCopy

func (in *CommitStatus) DeepCopy() *CommitStatus

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

func (*CommitStatus) DeepCopyInto

func (in *CommitStatus) DeepCopyInto(out *CommitStatus)

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

type ConditionType

type ConditionType string

type CredentialedGitLocation

type CredentialedGitLocation struct {
	GitLocation    `json:",inline" mapstructure:",squash"`
	RepoCredential *RepoCredential `json:"repoCredential,omitempty" mapstructure:"repoCredential,omitempty"`
}

CredentialedGitLocation points to a location in git that may or may not require credentials

func (*CredentialedGitLocation) DeepCopy

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

func (*CredentialedGitLocation) DeepCopyInto

func (in *CredentialedGitLocation) DeepCopyInto(out *CredentialedGitLocation)

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

type CredentialedGitSource

type CredentialedGitSource struct {
	GitSource `json:",inline" mapstructure:",squash"`

	RepoCredential *RepoCredential `json:"repoCredential,omitempty" mapstructure:"repoCredential,omitempty"`
}

func (*CredentialedGitSource) DeepCopy

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

func (*CredentialedGitSource) DeepCopyInto

func (in *CredentialedGitSource) DeepCopyInto(out *CredentialedGitSource)

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

type Destination

type Destination struct {
	Cluster string `json:"cluster"`

	// Namespace is optional, as the Resources may be on the cluster level
	// (Note that some Resources describe their namespace within their spec: for those that don't it's useful to have it here)
	Namespace string `json:"namespace,omitempty"`
}

Destination indicates a Cluster to sync to

func (*Destination) DeepCopy

func (in *Destination) DeepCopy() *Destination

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

func (*Destination) DeepCopyInto

func (in *Destination) DeepCopyInto(out *Destination)

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

type FileKeySelector added in v0.1.2

type FileKeySelector struct {
	JSONFilePath *string `json:"jsonFilePath,omitempty" mapstructure:"jsonFilePath"` // should either by json or yaml
	YAMLFilePath *string `json:"yamlFilePath,omitempty" mapstructure:"yamlFilePath"`
	Key          string  `json:"key" mapstructure:"key"`
}

FileKeySelector reads a key from a JSON or YAML file formatted as a map

func (*FileKeySelector) DeepCopy added in v0.1.2

func (in *FileKeySelector) DeepCopy() *FileKeySelector

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

func (*FileKeySelector) DeepCopyInto added in v0.1.2

func (in *FileKeySelector) DeepCopyInto(out *FileKeySelector)

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

func (*FileKeySelector) GetSecretValue added in v0.1.2

func (fks *FileKeySelector) GetSecretValue() (string, error)

type GitLocation

type GitLocation struct {
	// RepoUrl is the URL to the repository itself
	RepoUrl string `json:"repoUrl" mapstructure:"repoUrl"`

	// Path is the full path from the root of the repository to where the resources are held
	//  If the Path is empty, then the root directory will be used.
	// Can be a file or a directory
	// Note that all resources within this path (described by .yaml files) will be synced
	Path string `json:"path" mapstructure:"path"`

	// TargetRevision specifies the target revision to sync to, it can be a branch, a tag,
	// or a commit hash.
	TargetRevision string `json:"targetRevision" mapstructure:"targetRevision"`
}

func (*GitLocation) DeepCopy

func (in *GitLocation) DeepCopy() *GitLocation

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

func (*GitLocation) DeepCopyInto

func (in *GitLocation) DeepCopyInto(out *GitLocation)

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

type GitSource

type GitSource struct {
	GitLocation `json:",inline" mapstructure:",squash"`

	// Kustomize holds kustomize specific options
	Kustomize *KustomizeSource `json:"kustomize,omitempty" mapstructure:"kustomize,omitempty"`

	// Helm holds helm specific options
	Helm *HelmSource `json:"helm,omitempty" mapstructure:"helm,omitempty"`

	// Raw holds path or directory-specific options
	Raw *RawSource `json:"raw,omitempty" mapstructure:"raw,omitempty"`
}

func (*GitSource) DeepCopy

func (in *GitSource) DeepCopy() *GitSource

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

func (*GitSource) DeepCopyInto

func (in *GitSource) DeepCopyInto(out *GitSource)

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

func (*GitSource) ExplicitType

func (gitSource *GitSource) ExplicitType() (SourceType, error)

ExplicitType returns the type (e.g., Helm, Kustomize, etc.) of the application. If either none or multiple types are defined, returns an error.

type GitSync

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

	Spec   GitSyncSpec   `json:"spec"`
	Status GitSyncStatus `json:"status,omitempty"`
}

+genclient +kubebuilder:object:root=true +kubebuilder:subresource:status GitSync is the Schema for the gitsyncs API

func (*GitSync) DeepCopy

func (in *GitSync) DeepCopy() *GitSync

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

func (*GitSync) DeepCopyInto

func (in *GitSync) DeepCopyInto(out *GitSync)

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

func (*GitSync) DeepCopyObject

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

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

func (GitSync) String

func (gitSync GitSync) String() string

String returns the general purpose string representation

type GitSyncList

type GitSyncList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GitSync `json:"items"`
}

GitSyncList contains a list of GitSync

func (*GitSyncList) DeepCopy

func (in *GitSyncList) DeepCopy() *GitSyncList

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

func (*GitSyncList) DeepCopyInto

func (in *GitSyncList) DeepCopyInto(out *GitSyncList)

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

func (*GitSyncList) DeepCopyObject

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

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

type GitSyncPhase

type GitSyncPhase string

+kubebuilder:validation:Enum="";Pending;Running;Failed;NotApplicable

type GitSyncSpec

type GitSyncSpec struct {
	GitSource `json:",inline"`

	// Destination describes which cluster/namespace to sync it
	Destination Destination `json:"destination"`
}

GitSyncSpec defines the desired state of GitSync

func (*GitSyncSpec) ContainsClusterDestination

func (gitSyncSpec *GitSyncSpec) ContainsClusterDestination(cluster string) bool

ContainsClusterDestination determines if the cluster matches the Destination

func (*GitSyncSpec) DeepCopy

func (in *GitSyncSpec) DeepCopy() *GitSyncSpec

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

func (*GitSyncSpec) DeepCopyInto

func (in *GitSyncSpec) DeepCopyInto(out *GitSyncSpec)

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

func (*GitSyncSpec) ExplicitType

func (gitSyncSpec *GitSyncSpec) ExplicitType() (SourceType, error)

ExplicitType returns the type (e.g., Helm, Kustomize, etc.) of the application. If either none or multiple types are defined, returns an error.

func (*GitSyncSpec) GetDestinationNamespace

func (gitSyncSpec *GitSyncSpec) GetDestinationNamespace(cluster string) string

GetDestinationNamespace gets the namespace with the given cluster, if not found, then return empty.

type GitSyncStatus

type GitSyncStatus struct {
	// Important: Run "make" to regenerate code after modifying this file
	Phase GitSyncPhase `json:"phase,omitempty"`
	// Conditions are the latest available observations of a resource's current state.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// Message is added if there's a failure
	Message string `json:"message,omitempty"`

	// Last commit processed and the status
	CommitStatus *CommitStatus `json:"commitStatus,omitempty"`
}

GitSyncStatus defines the observed state of GitSync

func (*GitSyncStatus) DeepCopy

func (in *GitSyncStatus) DeepCopy() *GitSyncStatus

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

func (*GitSyncStatus) DeepCopyInto

func (in *GitSyncStatus) DeepCopyInto(out *GitSyncStatus)

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

func (*GitSyncStatus) InitConditions

func (status *GitSyncStatus) InitConditions()

InitConditions sets conditions to Unknown state.

func (*GitSyncStatus) InitializeConditions

func (status *GitSyncStatus) InitializeConditions(conditionTypes ...ConditionType)

InitializeConditions initializes the conditions to Unknown

func (*GitSyncStatus) MarkConditionFalse

func (status *GitSyncStatus) MarkConditionFalse(t ConditionType, reason, message string)

MarkConditionFalse sets the status of t to false

func (*GitSyncStatus) MarkConditionTrue

func (status *GitSyncStatus) MarkConditionTrue(t ConditionType)

MarkConditionTrue sets the status of t to true

func (*GitSyncStatus) MarkConditionUnknown

func (status *GitSyncStatus) MarkConditionUnknown(t ConditionType, reason, message string)

MarkConditionUnknown sets the status of t to unknown

func (*GitSyncStatus) MarkFailed

func (status *GitSyncStatus) MarkFailed(reason, message string)

MarkFailed sets the GitSync to Failed

func (*GitSyncStatus) MarkNotApplicable

func (status *GitSyncStatus) MarkNotApplicable(reason, message string)

MarkNotApplicable sets the GitSync to Not Applicable

func (*GitSyncStatus) MarkRunning

func (status *GitSyncStatus) MarkRunning()

MarkRunning sets the GitSync to Running

func (*GitSyncStatus) SetPhase

func (status *GitSyncStatus) SetPhase(phase GitSyncPhase, msg string)

type HTTPCredential

type HTTPCredential struct {
	Username string       `json:"username" mapstructure:"username"`
	Password SecretSource `json:"password" mapstructure:"password"`
}

func (*HTTPCredential) DeepCopy

func (in *HTTPCredential) DeepCopy() *HTTPCredential

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

func (*HTTPCredential) DeepCopyInto

func (in *HTTPCredential) DeepCopyInto(out *HTTPCredential)

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

type HelmParameter

type HelmParameter struct {
	// Name is the name of the Helm parameter
	Name string `json:"name,omitempty" mapstructure:"name,omitempty"`
	// Value is the value for the Helm parameter
	Value string `json:"value,omitempty" mapstructure:"value,omitempty"`
}

HelmParameter is a parameter passed to helm template during manifest generation

func (*HelmParameter) DeepCopy

func (in *HelmParameter) DeepCopy() *HelmParameter

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

func (*HelmParameter) DeepCopyInto

func (in *HelmParameter) DeepCopyInto(out *HelmParameter)

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

type HelmSource

type HelmSource struct {
	// ValuesFiles is a list of Helm value files to use when generating a template
	ValueFiles []string `json:"valueFiles,omitempty" mapstructure:"valueFiles,omitempty"`
	// Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation
	Parameters []HelmParameter `json:"parameters,omitempty" mapstructure:"parameters,omitempty"`
}

HelmSource holds helm-specific options

func (*HelmSource) DeepCopy

func (in *HelmSource) DeepCopy() *HelmSource

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

func (*HelmSource) DeepCopyInto

func (in *HelmSource) DeepCopyInto(out *HelmSource)

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

type KustomizeSource

type KustomizeSource struct{}

KustomizeSource holds kustomize specific options

func (*KustomizeSource) DeepCopy

func (in *KustomizeSource) DeepCopy() *KustomizeSource

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

func (*KustomizeSource) DeepCopyInto

func (in *KustomizeSource) DeepCopyInto(out *KustomizeSource)

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

type MultiClusterFileGenerator

type MultiClusterFileGenerator struct {
	Files []*CredentialedGitLocation `json:"files" mapstructure:"files"`
}

MultiClusterFileGenerator consists of multiple files containing key/value pairs: subsequent entries can override earlier entries each file will contain a map of cluster name to the key/value pairs that it uses for templating

func (*MultiClusterFileGenerator) DeepCopy

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

func (*MultiClusterFileGenerator) DeepCopyInto

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

type RawSource

type RawSource struct{}

RawSource holds raw specific options

func (*RawSource) DeepCopy

func (in *RawSource) DeepCopy() *RawSource

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

func (*RawSource) DeepCopyInto

func (in *RawSource) DeepCopyInto(out *RawSource)

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

type RepoCredential

type RepoCredential struct {
	URL            string          `json:"url" mapstructure:"url"`
	HTTPCredential *HTTPCredential `json:"httpCredential,omitempty" mapstructure:"httpCredential,omitempty"`
	SSHCredential  *SSHCredential  `json:"sshCredential,omitempty" mapstructure:"sshCredential,omitempty"`
	TLS            *TLS            `json:"tls,omitempty" mapstructure:"tls,omitempty"`
}

func (*RepoCredential) DeepCopy

func (in *RepoCredential) DeepCopy() *RepoCredential

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

func (*RepoCredential) DeepCopyInto

func (in *RepoCredential) DeepCopyInto(out *RepoCredential)

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

type SSHCredential

type SSHCredential struct {
	SSHKey SecretSource `json:"SSHKey" mapstructure:"SSHKey"`
}

func (*SSHCredential) DeepCopy

func (in *SSHCredential) DeepCopy() *SSHCredential

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

func (*SSHCredential) DeepCopyInto

func (in *SSHCredential) DeepCopyInto(out *SSHCredential)

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

type SecretKeySelector

type SecretKeySelector struct {
	corev1.ObjectReference `json:",inline" mapstructure:",squash"` // for viper to correctly parse the config
	Key                    string                                  `json:"key" mapstructure:"key"`
}

func (*SecretKeySelector) DeepCopy

func (in *SecretKeySelector) DeepCopy() *SecretKeySelector

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

func (*SecretKeySelector) DeepCopyInto

func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)

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

type SecretSource added in v0.1.2

type SecretSource struct {
	FromKubernetesSecret *SecretKeySelector `json:"fromKubernetesSecret" mapstructure:"fromKubernetesSecret"`
	FromFile             *FileKeySelector   `json:"fromFile" mapstructure:"fromFile"`
}

func (*SecretSource) DeepCopy added in v0.1.2

func (in *SecretSource) DeepCopy() *SecretSource

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

func (*SecretSource) DeepCopyInto added in v0.1.2

func (in *SecretSource) DeepCopyInto(out *SecretSource)

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

type SingleClusterGenerator

type SingleClusterGenerator struct {
	Values map[string]string `json:"values" mapstructure:"values"`
}

SingleClusterGenerator consists of a single set of key/value pairs that can be used for templating

func (*SingleClusterGenerator) DeepCopy

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

func (*SingleClusterGenerator) DeepCopyInto

func (in *SingleClusterGenerator) DeepCopyInto(out *SingleClusterGenerator)

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

type SourceType

type SourceType string

+kubebuilder:validation:Enum=Helm;Kustomize;Raw SourceType specifies the type of the application source

const (
	SourceTypeHelm      SourceType = "Helm"
	SourceTypeKustomize SourceType = "Kustomize"
	SourceTypeRaw       SourceType = "Raw"
)

type TLS

type TLS struct {
	InsecureSkipVerify bool `json:"insecureSkipVerify" mapstructure:"insecureSkipVerify"`
}

func (*TLS) DeepCopy

func (in *TLS) DeepCopy() *TLS

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

func (*TLS) DeepCopyInto

func (in *TLS) DeepCopyInto(out *TLS)

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