v1alpha1

package
v0.0.0-...-dd65ee0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the gitops v1alpha1 API group +kubebuilder:object:generate=true +groupName=gitops.hybrid-cloud-patterns.io

Index

Constants

View Source
const (
	// NodeMaintenanceFinalizer is a finalizer for a NodeMaintenance CR deletion
	PatternFinalizer string = "foregroundDeletePattern"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "gitops.hybrid-cloud-patterns.io", Version: "v1alpha1"}

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

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

Functions

This section is empty.

Types

type GitConfig

type GitConfig struct {

	// Git repo containing the pattern to deploy. Must use https/http or, for ssh, git@server:foo/bar.git
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1
	TargetRepo string `json:"targetRepo"`

	// Branch, tag, or commit to deploy.  Does not support short-sha's. Default: HEAD
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=2
	TargetRevision string `json:"targetRevision,omitempty"`

	// Upstream git repo containing the pattern to deploy. Used when in-cluster fork to point to the upstream pattern repository
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=3
	OriginRepo string `json:"originRepo,omitempty"`

	// Branch, tag or commit in the upstream git repository. Does not support short-sha's. Default to HEAD
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=4
	OriginRevision string `json:"originRevision,omitempty"`

	// Interval in seconds to poll for drifts between origin and target repositories. Default: 180 seconds
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=5,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	// +kubebuilder:default:=180
	PollInterval int `json:"pollInterval,omitempty"`

	// Optional. FQDN of the git server if automatic parsing from TargetRepo is broken
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=6
	Hostname string `json:"hostname,omitempty"`

	// Optional. K8s secret name where the info for connecting to git can be found. The supported secrets are modeled after the
	// private repositories in argo (https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#repositories)
	// currently ssh and username+password are supported
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=7
	TokenSecret string `json:"tokenSecret,omitempty"`

	// Optional. K8s secret namespace where the token for connecting to git can be found
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=8
	TokenSecretNamespace string `json:"tokenSecretNamespace,omitempty"`
}

func (*GitConfig) DeepCopy

func (in *GitConfig) DeepCopy() *GitConfig

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

func (*GitConfig) DeepCopyInto

func (in *GitConfig) DeepCopyInto(out *GitConfig)

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

type GitOpsConfig

type GitOpsConfig struct {
	// Require manual intervention before Argo will sync new content. Default: False
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ManualSync bool `json:"manualSync,omitempty"`
}

func (*GitOpsConfig) DeepCopy

func (in *GitOpsConfig) DeepCopy() *GitOpsConfig

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

func (*GitOpsConfig) DeepCopyInto

func (in *GitOpsConfig) DeepCopyInto(out *GitOpsConfig)

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

type MultiSourceConfig

type MultiSourceConfig struct {
	// (EXPERIMENTAL) Enable multi-source support when deploying the clustergroup argo application
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=9,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	// +kubebuilder:default:=true
	Enabled *bool `json:"enabled,omitempty"`

	// The helm chart url to fetch the helm charts from in order to deploy the pattern. Defaults to https://charts.validatedpatterns.io/
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=8,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldDependency:multiSourceConfig.enabled:true"}
	HelmRepoUrl string `json:"helmRepoUrl,omitempty"`

	// Which chart version for the clustergroup helm chart. Defaults to "0.8.*"
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=9,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldDependency:multiSourceConfig.enabled:true"}
	ClusterGroupChartVersion string `json:"clusterGroupChartVersion,omitempty"`

	// The url when deploying the clustergroup helm chart directly from a git repo
	// Defaults to ” which means not used (Only used when developing the clustergroup helm chart)
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=12,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldDependency:multiSourceConfig.enabled:true"}
	ClusterGroupGitRepoUrl string `json:"clusterGroupGitRepoUrl,omitempty"`

	// The git reference when deploying the clustergroup helm chart directly from a git repo
	// Defaults to 'main'. (Only used when developing the clustergroup helm chart)
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=13,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldDependency:multiSourceConfig.enabled:true"}
	// +kubebuilder:default:="main"
	ClusterGroupChartGitRevision string `json:"clusterGroupChartGitRevision,omitempty"`
}

func (*MultiSourceConfig) DeepCopy

func (in *MultiSourceConfig) DeepCopy() *MultiSourceConfig

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

func (*MultiSourceConfig) DeepCopyInto

func (in *MultiSourceConfig) DeepCopyInto(out *MultiSourceConfig)

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

type Pattern

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

	Spec   PatternSpec   `json:"spec,omitempty"`
	Status PatternStatus `json:"status,omitempty"`
}

Pattern is the Schema for the patterns API

func (*Pattern) DeepCopy

func (in *Pattern) DeepCopy() *Pattern

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

func (*Pattern) DeepCopyInto

func (in *Pattern) DeepCopyInto(out *Pattern)

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

func (*Pattern) DeepCopyObject

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

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

type PatternApplicationInfo

type PatternApplicationInfo struct {
	Name             string `json:"name,omitempty"`
	Namespace        string `json:"namespace,omitempty"`
	AppSyncStatus    string `json:"syncStatus,omitempty"`
	AppHealthStatus  string `json:"healthStatus,omitempty"`
	AppHealthMessage string `json:"healthMessage,omitempty"`
}

PatternApplicationInfo defines the Applications Status for the Pattern. This structure is part of the PatternStatus as an array The Application Status will be included as part of the Observed state of Pattern

func (*PatternApplicationInfo) DeepCopy

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

func (*PatternApplicationInfo) DeepCopyInto

func (in *PatternApplicationInfo) DeepCopyInto(out *PatternApplicationInfo)

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

type PatternCondition

type PatternCondition struct {
	// Type of deployment condition.
	Type PatternConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

func (*PatternCondition) DeepCopy

func (in *PatternCondition) DeepCopy() *PatternCondition

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

func (*PatternCondition) DeepCopyInto

func (in *PatternCondition) DeepCopyInto(out *PatternCondition)

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

type PatternConditionType

type PatternConditionType string
const (
	GitOutOfSync PatternConditionType = "GitOutOfSync"
	GitInSync    PatternConditionType = "GitInSync"
	Synced       PatternConditionType = "Synced"
	OutOfSync    PatternConditionType = "OutOfSync"
	Unknown      PatternConditionType = "Unknown"
	Degraded     PatternConditionType = "Degraded"
	Progressing  PatternConditionType = "Progressing"
	Missing      PatternConditionType = "Missing"
	Suspended    PatternConditionType = "Suspended"
)

type PatternList

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

PatternList contains a list of Pattern

func (*PatternList) DeepCopy

func (in *PatternList) DeepCopy() *PatternList

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

func (*PatternList) DeepCopyInto

func (in *PatternList) DeepCopyInto(out *PatternList)

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

func (*PatternList) DeepCopyObject

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

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

type PatternParameter

type PatternParameter struct {

	//+operator-sdk:csv:customresourcedefinitions:type=spec,order=1
	Name string `json:"name"`

	//+operator-sdk:csv:customresourcedefinitions:type=spec,order=2
	Value string `json:"value"`
}

func (*PatternParameter) DeepCopy

func (in *PatternParameter) DeepCopy() *PatternParameter

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

func (*PatternParameter) DeepCopyInto

func (in *PatternParameter) DeepCopyInto(out *PatternParameter)

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

type PatternSpec

type PatternSpec struct {

	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=3
	ClusterGroupName string `json:"clusterGroupName"`

	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=4
	GitConfig GitConfig `json:"gitSpec"`
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=5
	MultiSourceConfig MultiSourceConfig `json:"multiSourceConfig,omitempty"`

	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=8
	GitOpsConfig *GitOpsConfig `json:"gitOpsSpec,omitempty"`

	// .Name is dot separated per the helm --set syntax, such as:
	//   global.something.field
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=6
	ExtraParameters []PatternParameter `json:"extraParameters,omitempty"`

	// URLs to additional Helm parameter files
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=7
	ExtraValueFiles []string `json:"extraValueFiles,omitempty"`

	// Analytics UUID. Leave empty to autogenerate a random one. Not PII information
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=9
	AnalyticsUUID string `json:"analyticsUUID,omitempty"`
}

PatternSpec defines the desired state of Pattern

func (*PatternSpec) DeepCopy

func (in *PatternSpec) DeepCopy() *PatternSpec

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

func (*PatternSpec) DeepCopyInto

func (in *PatternSpec) DeepCopyInto(out *PatternSpec)

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

type PatternStatus

type PatternStatus struct {

	// Last action related to the pattern
	// +operator-sdk:csv:customresourcedefinitions:type=status
	LastStep string `json:"lastStep,omitempty"`

	// Last error encountered by the pattern
	// +operator-sdk:csv:customresourcedefinitions:type=status
	LastError string `json:"lastError,omitempty"`

	// Number of updates to the pattern
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Version int `json:"version,omitempty"`

	// +operator-sdk:csv:customresourcedefinitions:type=status
	ClusterName string `json:"clusterName,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	AppClusterDomain string `json:"appClusterDomain,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ClusterDomain string `json:"clusterDomain,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ClusterID string `json:"clusterID,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ClusterPlatform string `json:"clusterPlatform,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ClusterVersion string `json:"clusterVersion,omitempty"`
	// +operator-sdk:csv:customerresourcedefinitions:type=conditions
	Conditions []PatternCondition `json:"conditions,omitempty"`
	//+operator-sdk:csv:customerresourcedefinitions:type=status
	Applications []PatternApplicationInfo `json:"applications,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	// +kubebuilder:default:=0
	AnalyticsSent int `json:"analyticsSent,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	AnalyticsUUID string `json:"analyticsUUID,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status
	LocalCheckoutPath string `json:"path,omitempty"`
}

PatternStatus defines the observed state of Pattern

func (*PatternStatus) DeepCopy

func (in *PatternStatus) DeepCopy() *PatternStatus

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

func (*PatternStatus) DeepCopyInto

func (in *PatternStatus) DeepCopyInto(out *PatternStatus)

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