v1alpha1

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 15 Imported by: 2

Documentation

Overview

+groupName=skiperator.kartverket.no +versionName=v1alpha1

Index

Constants

This section is empty.

Variables

View Source
var (
	GroupVersion = schema.GroupVersion{Group: "skiperator.kartverket.no", Version: "v1alpha1"}

	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var (
	DefaultTTLSecondsAfterFinished = int32(60 * 60 * 24 * 7) // One week
	DefaultBackoffLimit            = int32(6)

	DefaultSuspend = false
)
View Source
var JobCreatedCondition = "SKIPJobCreated"

Functions

func GetStaticReplicas added in v1.0.0

func GetStaticReplicas(jsonReplicas *apiextensionsv1.JSON) (uint, error)

func IsHPAEnabled added in v1.0.0

func IsHPAEnabled(jsonReplicas *apiextensionsv1.JSON) bool

func MarshalledReplicas added in v1.0.0

func MarshalledReplicas(replicas interface{}) *apiextensionsv1.JSON

Types

type Application

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

	Spec ApplicationSpec `json:"spec,omitempty"`

	Status ApplicationStatus `json:"status,omitempty"`
}

Application

Root object for Application resource. An application resource is a resource for easily managing a Dockerized container within the context of a Kartverket cluster. This allows product teams to avoid the need to set up networking on the cluster, as well as a lot of out of the box security features.

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName="app" +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.application.status`

func (*Application) CalculateApplicationStatus added in v0.1.5

func (a *Application) CalculateApplicationStatus() Status

func (*Application) DeepCopy

func (in *Application) DeepCopy() *Application

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

func (*Application) DeepCopyInto

func (in *Application) DeepCopyInto(out *Application)

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

func (*Application) DeepCopyObject

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

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

func (*Application) FillDefaultsSpec added in v0.1.5

func (a *Application) FillDefaultsSpec()

func (*Application) FillDefaultsStatus added in v0.1.5

func (a *Application) FillDefaultsStatus()

func (*Application) ShouldUpdateApplicationStatus added in v0.1.5

func (a *Application) ShouldUpdateApplicationStatus(newStatus Status) bool

func (*Application) UpdateApplicationStatus added in v0.1.5

func (a *Application) UpdateApplicationStatus()

func (*Application) UpdateControllerStatus added in v0.1.5

func (a *Application) UpdateControllerStatus(controllerName string, message string, status StatusNames)

type ApplicationList

type ApplicationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Application `json:"items"`
}

+kubebuilder:object:root=true

func (*ApplicationList) DeepCopy

func (in *ApplicationList) DeepCopy() *ApplicationList

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

func (*ApplicationList) DeepCopyInto

func (in *ApplicationList) DeepCopyInto(out *ApplicationList)

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

func (*ApplicationList) DeepCopyObject

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

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

type ApplicationSpec

type ApplicationSpec struct {
	// The image the application will run. This image will be added to a Deployment resource
	//
	//+kubebuilder:validation:Required
	Image string `json:"image"`

	// The port the deployment exposes
	//
	//+kubebuilder:validation:Required
	Port int `json:"port"`

	// Any external hostnames that route to this application. Using a skip.statkart.no-address
	// will make the application reachable for kartverket-clients (internal), other addresses
	// make the app reachable on the internet. Note that other addresses than skip.statkart.no
	// (also known as pretty hostnames) requires additional DNS setup.
	// The below hostnames will also have TLS certificates issued and be reachable on both
	// HTTP and HTTPS.
	//
	// Ingresses must be lowercase, contain no spaces, be a non-empty string, and have a hostname/domain separated by a period
	//
	//+kubebuilder:validation:Optional
	Ingresses []string `json:"ingresses,omitempty"`

	// An optional priority. Supported values are 'low', 'medium' and 'high'.
	// The default value is 'medium'.
	//
	// Most workloads should not have to specify this field. If you think you
	// do, please consult with SKIP beforehand.
	//
	//+kubebuilder:validation:Enum=low;medium;high
	//+kubebuilder:default=medium
	Priority string `json:"priority,omitempty"`

	// Override the command set in the Dockerfile. Usually only used when debugging
	// or running third-party containers where you don't have control over the Dockerfile
	//
	//+kubebuilder:validation:Optional
	Command []string `json:"command,omitempty"`

	// ResourceRequirements to apply to the deployment. It's common to set some of these to
	// prevent the app from swelling in resource usage and consuming all the
	// resources of other apps on the cluster.
	//
	//+kubebuilder:validation:Optional
	Resources *podtypes.ResourceRequirements `json:"resources,omitempty"`

	// The number of replicas can either be specified as a static number as follows:
	//
	// 	replicas: 2
	//
	// Or by specifying a range between min and max to enable HorizontalPodAutoscaling.
	// The default value for replicas is:
	// 	replicas:
	// 		min: 2
	// 		max: 5
	// 		targetCpuUtilization: 80
	// Using autoscaling is the recommended configuration for replicas.
	//+kubebuilder:validation:Optional
	Replicas *apiextensionsv1.JSON `json:"replicas,omitempty"`

	// Defines an alternative strategy for the Kubernetes deployment. This is useful when
	// the default strategy, RollingUpdate, is not usable. Setting type to
	// Recreate will take down all the pods before starting new pods, whereas the
	// default of RollingUpdate will try to start the new pods before taking down the
	// old ones.
	//
	// Valid values are: RollingUpdate, Recreate. Default is RollingUpdate
	//
	//+kubebuilder:validation:Optional
	Strategy Strategy `json:"strategy,omitempty"`

	// Environment variables that will be set inside the Deployment's Pod. See https://pkg.go.dev/k8s.io/api/core/v1#EnvVar for examples.
	//
	//+kubebuilder:validation:Optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Environment variables mounted from files. When specified all the keys of the
	// resource will be assigned as environment variables. Supports both configmaps
	// and secrets.
	//
	// For mounting as files see FilesFrom.
	//
	//+kubebuilder:validation:Optional
	EnvFrom []podtypes.EnvFrom `json:"envFrom,omitempty"`

	// Mounting volumes into the Deployment are done using the FilesFrom argument
	//
	// FilesFrom supports ConfigMaps, Secrets and PVCs. The Application resource
	// assumes these have already been created by you, and will fail if this is not the case.
	//
	// For mounting environment variables see EnvFrom.
	//
	//+kubebuilder:validation:Optional
	FilesFrom []podtypes.FilesFrom `json:"filesFrom,omitempty"`

	// An optional list of extra port to expose on a pod level basis,
	// for example so Instana or other APM tools can reach it
	//
	//+kubebuilder:validation:Optional
	AdditionalPorts []podtypes.InternalPort `json:"additionalPorts,omitempty"`
	// Liveness probes define a resource that returns 200 OK when the app is running
	// as intended. Returning a non-200 code will make kubernetes restart the app.
	// Liveness is optional, but when provided, path and port are required
	//
	// See Probe for structure definition.
	//
	//+kubebuilder:validation:Optional
	Liveness *podtypes.Probe `json:"liveness,omitempty"`

	// Readiness probes define a resource that returns 200 OK when the app is running
	// as intended. Kubernetes will wait until the resource returns 200 OK before
	// marking the pod as Running and progressing with the deployment strategy.
	// Readiness is optional, but when provided, path and port are required
	//
	//+kubebuilder:validation:Optional
	Readiness *podtypes.Probe `json:"readiness,omitempty"`

	// Kubernetes uses startup probes to know when a container application has started.
	// If such a probe is configured, it disables liveness and readiness checks until it
	// succeeds, making sure those probes don't interfere with the application startup.
	// This can be used to adopt liveness checks on slow starting containers, avoiding them
	// getting killed by Kubernetes before they are up and running.
	// Startup is optional, but when provided, path and port are required
	//
	//+kubebuilder:validation:Optional
	Startup *podtypes.Probe `json:"startup,omitempty"`

	// Optional settings for how Prometheus compatible metrics should be scraped.
	//
	//+kubebuilder:validation:Optional
	Prometheus *PrometheusConfig `json:"prometheus,omitempty"`

	// Controls whether the application will automatically redirect all HTTP calls to HTTPS via the istio VirtualService.
	// This redirect does not happen on the route /.well-known/acme-challenge/, as the ACME challenge can only be done on port 80.
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:default:=true
	RedirectToHTTPS *bool `json:"redirectToHTTPS,omitempty"`

	// Whether to enable automatic Pod Disruption Budget creation for this application.
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:default=true
	EnablePDB *bool `json:"enablePDB,omitempty"`

	// The root AccessPolicy for managing zero trust access to your Application. See AccessPolicy for more information.
	//
	//+kubebuilder:validation:Optional
	AccessPolicy *podtypes.AccessPolicy `json:"accessPolicy,omitempty"`

	// For authentication with GCP, to use services like Secret Manager and/or Pub/Sub we need
	// to set the GCP Service Account Pods should identify as. To allow this, we need the IAM role iam.workloadIdentityUser set on a GCP
	// service account and bind this to the Pod's Kubernetes SA.
	//
	// Documentation on how this is done can be found here (Closed Wiki):
	// https://kartverket.atlassian.net/wiki/spaces/SKIPDOK/pages/422346824/Autentisering+mot+GCP+som+Kubernetes+SA
	//
	//+kubebuilder:validation:Optional
	GCP *podtypes.GCP `json:"gcp,omitempty"`

	// Labels can be used if you want every resource created by your application to
	// have the same labels, including your application. This could for example be useful for
	// metrics, where a certain label and the corresponding resources liveliness can be combined.
	// Any amount of labels can be added as wanted, and they will all cascade down to all resources.
	//
	//+kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`

	// ResourceLabels can be used if you want to add a label to a specific resources created by
	// the application. One such label could for example be set on a Deployment, such that
	// the deployment avoids certain rules from Gatekeeper, or similar. Any amount of labels may be added per ResourceLabels item.
	//
	//+kubebuilder:validation:Optional
	ResourceLabels map[string]map[string]string `json:"resourceLabels,omitempty"`

	// Used for allow listing certain default blocked endpoints, such as /actuator/ end points
	//
	//+kubebuilder:validation:Optional
	AuthorizationSettings *AuthorizationSettings `json:"authorizationSettings,omitempty"`

	// PodSettings are used to apply specific settings to the Pod Template used by Skiperator to create Deployments. This allows you to set
	// things like annotations on the Pod to change the behaviour of sidecars, and set relevant Pod options such as TerminationGracePeriodSeconds.
	//
	//+kubebuilder:validation:Optional
	PodSettings *podtypes.PodSettings `json:"podSettings,omitempty"`
}

+kubebuilder:object:generate=true

func (*ApplicationSpec) DeepCopy

func (in *ApplicationSpec) DeepCopy() *ApplicationSpec

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

func (*ApplicationSpec) DeepCopyInto

func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)

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

type ApplicationStatus added in v0.1.5

type ApplicationStatus struct {
	ApplicationStatus Status            `json:"application"`
	ControllersStatus map[string]Status `json:"controllers"`
}

ApplicationStatus

A status field shown on the Application resource which contains information regarding all controllers present on the Application. Will for example show errors on the Deployment field when something went wrong when attempting to create a Deployment.

+kubebuilder:object:generate=true

func (*ApplicationStatus) DeepCopy added in v0.1.5

func (in *ApplicationStatus) DeepCopy() *ApplicationStatus

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

func (*ApplicationStatus) DeepCopyInto added in v0.1.5

func (in *ApplicationStatus) DeepCopyInto(out *ApplicationStatus)

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

type AuthorizationSettings added in v1.0.0

type AuthorizationSettings struct {
	// Allows all endpoints by not creating an AuthorizationPolicy, and ignores the content of AllowList.
	// If field is false, the contents of AllowList will be used instead if AllowList is set.
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:default:=false
	AllowAll bool `json:"allowAll,omitempty"`

	// Allows specific endpoints. Common endpoints one might want to allow include /actuator/health, /actuator/startup, /actuator/info.
	//
	// Note that endpoints are matched specifically on the input, so if you allow /actuator/health, you will *not* allow /actuator/health/
	//
	//+kubebuilder:validation:Optional
	AllowList []string `json:"allowList,omitempty"`
}

AuthorizationSettings Settings for overriding the default deny of all actuator endpoints. AllowAll will allow any endpoint to be exposed. Use AllowList to only allow specific endpoints.

Please be aware that HTTP endpoints, such as actuator, may expose information about your application which you do not want to expose. Before allow listing HTTP endpoints, make note of what these endpoints will expose, especially if your application is served via an external ingress.

+kubebuilder:object:generate=true

func (*AuthorizationSettings) DeepCopy added in v1.0.0

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

func (*AuthorizationSettings) DeepCopyInto added in v1.0.0

func (in *AuthorizationSettings) DeepCopyInto(out *AuthorizationSettings)

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

type ContainerSettings added in v1.0.0

type ContainerSettings struct {
	//+kubebuilder:validation:Required
	Image string `json:"image"`

	//+kubebuilder:validation:Enum=low;medium;high
	//+kubebuilder:default=medium
	Priority string `json:"priority,omitempty"`

	//+kubebuilder:validation:Optional
	Command []string `json:"command,omitempty"`

	//+kubebuilder:validation:Optional
	Resources *podtypes.ResourceRequirements `json:"resources,omitempty"`

	//+kubebuilder:validation:Optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	//+kubebuilder:validation:Optional
	EnvFrom []podtypes.EnvFrom `json:"envFrom,omitempty"`
	//+kubebuilder:validation:Optional
	FilesFrom []podtypes.FilesFrom `json:"filesFrom,omitempty"`

	//+kubebuilder:validation:Optional
	AdditionalPorts []podtypes.InternalPort `json:"additionalPorts,omitempty"`
	//+kubebuilder:validation:Optional
	Liveness *podtypes.Probe `json:"liveness,omitempty"`
	//+kubebuilder:validation:Optional
	Readiness *podtypes.Probe `json:"readiness,omitempty"`
	//+kubebuilder:validation:Optional
	Startup *podtypes.Probe `json:"startup,omitempty"`

	//+kubebuilder:validation:Optional
	AccessPolicy *podtypes.AccessPolicy `json:"accessPolicy,omitempty"`

	//+kubebuilder:validation:Optional
	GCP *podtypes.GCP `json:"gcp,omitempty"`

	// +kubebuilder:validation:Enum=OnFailure;Never
	// +kubebuilder:default="Never"
	// +kubebuilder:validation:Optional
	RestartPolicy *corev1.RestartPolicy `json:"restartPolicy"`

	//+kubebuilder:validation:Optional
	PodSettings *podtypes.PodSettings `json:"podSettings,omitempty"`
}

+kubebuilder:object:generate=true

func (*ContainerSettings) DeepCopy added in v1.0.0

func (in *ContainerSettings) DeepCopy() *ContainerSettings

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

func (*ContainerSettings) DeepCopyInto added in v1.0.0

func (in *ContainerSettings) DeepCopyInto(out *ContainerSettings)

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

type CronSettings added in v1.0.0

type CronSettings struct {
	// Denotes how Kubernetes should react to multiple instances of the Job being started at the same time.
	// Allow will allow concurrent jobs. Forbid will not allow this, and instead skip the newer schedule Job.
	// Replace will replace the current active Job with the newer scheduled Job.
	//
	// +kubebuilder:validation:Enum=Allow;Forbid;Replace
	// +kubebuilder:default="Allow"
	// +kubebuilder:validation:Optional
	ConcurrencyPolicy batchv1.ConcurrencyPolicy `json:"allowConcurrency,omitempty"`

	// A CronJob string for denoting the schedule of this job. See https://crontab.guru/ for help creating CronJob strings.
	// Kubernetes CronJobs also include the extended "Vixie cron" step values: https://man.freebsd.org/cgi/man.cgi?crontab%285%29.
	//
	//+kubebuilder:validation:Required
	Schedule string `json:"schedule"`

	// Denotes the deadline in seconds for starting a job on its schedule, if for some reason the Job's controller was not ready upon the scheduled time.
	// If unset, Jobs missing their deadline will be considered failed jobs and will not start.
	//
	//+kubebuilder:validation:Optional
	StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`

	// If set to true, this tells Kubernetes to suspend this Job till the field is set to false. If the Job is active while this field is set to true,
	// all running Pods will be terminated.
	//
	//+kubebuilder:validation:Optional
	Suspend *bool `json:"suspend,omitempty"`
}

+kubebuilder:object:generate=true

func (*CronSettings) DeepCopy added in v1.0.0

func (in *CronSettings) DeepCopy() *CronSettings

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

func (*CronSettings) DeepCopyInto added in v1.0.0

func (in *CronSettings) DeepCopyInto(out *CronSettings)

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

type JobSettings added in v1.0.0

type JobSettings struct {
	// ActiveDeadlineSeconds denotes a duration in seconds started from when the job is first active. If the deadline is reached during the job's workload
	// the job and its Pods are terminated. If the job is suspended using the Suspend field, this timer is stopped and reset when unsuspended.
	//
	//+kubebuilder:validation:Optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`

	// Specifies the number of retry attempts before determining the job as failed. Defaults to 6.
	//
	//+kubebuilder:validation:Optional
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`

	// If set to true, this tells Kubernetes to suspend this Job till the field is set to false. If the Job is active while this field is set to false,
	// all running Pods will be terminated.
	//
	//+kubebuilder:validation:Optional
	Suspend *bool `json:"suspend,omitempty"`

	// The number of seconds to wait before removing the Job after it has finished. If unset, Job will not be cleaned up.
	// It is recommended to set this to avoid clutter in your resource tree.
	//
	//+kubebuilder:validation:Optional
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}

+kubebuilder:object:generate=true

func (*JobSettings) DeepCopy added in v1.0.0

func (in *JobSettings) DeepCopy() *JobSettings

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

func (*JobSettings) DeepCopyInto added in v1.0.0

func (in *JobSettings) DeepCopyInto(out *JobSettings)

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

type PrometheusConfig added in v1.0.0

type PrometheusConfig struct {
	// The port number or name where metrics are exposed (at the Pod level).
	//
	//+kubebuilder:validation:Required
	Port intstr.IntOrString `json:"port"`
	// The HTTP path where Prometheus compatible metrics exists
	//
	//+kubebuilder:default:=/metrics
	//+kubebuilder:validation:Optional
	Path string `json:"path,omitempty"`
}

PrometheusConfig contains configuration settings instructing how the app should be scraped.

+kubebuilder:object:generate=true

func (*PrometheusConfig) DeepCopy added in v1.0.0

func (in *PrometheusConfig) DeepCopy() *PrometheusConfig

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

func (*PrometheusConfig) DeepCopyInto added in v1.0.0

func (in *PrometheusConfig) DeepCopyInto(out *PrometheusConfig)

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

type Replicas

type Replicas struct {
	// Min represents the minimum number of replicas when load is low.
	// Note that the SKIP team recommends that you set this to at least two, but this is only required for production.
	//
	//+kubebuilder:validation:Required
	Min uint `json:"min"`

	// Max represents the maximum number of replicas the deployment is allowed to scale to
	//
	//+kubebuilder:validation:Optional
	Max uint `json:"max,omitempty"`

	// When the average CPU utilization across all pods crosses this threshold another replica is started, up to a maximum of Max
	//
	// TargetCpuUtilization is an integer representing a percentage.
	//
	//+kubebuilder:default:=80
	//+kubebuilder:validation:Optional
	TargetCpuUtilization uint `json:"targetCpuUtilization,omitempty"`
}

+kubebuilder:object:generate=true

func GetScalingReplicas added in v1.0.0

func GetScalingReplicas(jsonReplicas *apiextensionsv1.JSON) (Replicas, error)

func NewDefaultReplicas added in v1.0.0

func NewDefaultReplicas() Replicas

func (*Replicas) DeepCopy

func (in *Replicas) DeepCopy() *Replicas

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

func (*Replicas) DeepCopyInto

func (in *Replicas) DeepCopyInto(out *Replicas)

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

type SKIPJob added in v1.0.0

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

	//+kubebuilder:validation:Required
	Spec SKIPJobSpec `json:"spec"`

	//+kubebuilder:validation:Optional
	Status SKIPJobStatus `json:"status"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:object:generate=true SKIPJob is the Schema for the skipjobs API

func (*SKIPJob) ApplyDefaults added in v1.0.0

func (skipJob *SKIPJob) ApplyDefaults() error

func (*SKIPJob) DeepCopy added in v1.0.0

func (in *SKIPJob) DeepCopy() *SKIPJob

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

func (*SKIPJob) DeepCopyInto added in v1.0.0

func (in *SKIPJob) DeepCopyInto(out *SKIPJob)

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

func (*SKIPJob) DeepCopyObject added in v1.0.0

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

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

func (*SKIPJob) KindPostFixedName added in v1.0.0

func (skipJob *SKIPJob) KindPostFixedName() string

type SKIPJobList added in v1.0.0

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

SKIPJobList contains a list of SKIPJob

func (*SKIPJobList) DeepCopy added in v1.0.0

func (in *SKIPJobList) DeepCopy() *SKIPJobList

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

func (*SKIPJobList) DeepCopyInto added in v1.0.0

func (in *SKIPJobList) DeepCopyInto(out *SKIPJobList)

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

func (*SKIPJobList) DeepCopyObject added in v1.0.0

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

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

type SKIPJobSpec added in v1.0.0

type SKIPJobSpec struct {
	// Settings for the actual Job. If you use a scheduled job, the settings in here will also specify the template of the job.
	//
	//+kubebuilder:validation:Optional
	Job *JobSettings `json:"job,omitempty"`

	// Settings for the Job if you are running a scheduled job. Optional as Jobs may be one-off.
	//
	//+kubebuilder:validation:Optional
	Cron *CronSettings `json:"cron,omitempty"`

	// Settings for the Pods running in the job. Fields are mostly the same as an Application, and are (probably) better documented there. Some fields are omitted, but none added.
	// Once set, you may not change Container without deleting your current SKIPJob
	//
	// +kubebuilder:validation:Required
	Container ContainerSettings `json:"container"`
}

SKIPJobSpec defines the desired state of SKIPJob

A SKIPJob is either defined as a one-off or a scheduled job. If the Cron field is set for SKIPJob, it may not be removed. If the Cron field is unset, it may not be added. The Container field of a SKIPJob is only mutable if the Cron field is set. If unset, you must delete your SKIPJob to change container settings.

+kubebuilder:validation:XValidation:rule="(has(oldSelf.cron) && has(self.cron)) || (!has(oldSelf.cron) && !has(self.cron))", message="After creation of a SKIPJob you may not remove the Cron field if it was previously present, or add it if it was previously omitted. Please delete the SKIPJob to change its nature from a one-off/scheduled job." +kubebuilder:validation:XValidation:rule="((!has(self.cron) && (oldSelf.container == self.container)) || has(self.cron))", message="The field Container is immutable for one-off jobs. Please delete your SKIPJob to change the containers settings." +kubebuilder:object:generate=true

func (*SKIPJobSpec) DeepCopy added in v1.0.0

func (in *SKIPJobSpec) DeepCopy() *SKIPJobSpec

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

func (*SKIPJobSpec) DeepCopyInto added in v1.0.0

func (in *SKIPJobSpec) DeepCopyInto(out *SKIPJobSpec)

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

type SKIPJobStatus added in v1.0.0

type SKIPJobStatus struct {
	//+kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions"`
}

SKIPJobStatus defines the observed state of SKIPJob +kubebuilder:object:generate=true

func (*SKIPJobStatus) DeepCopy added in v1.0.0

func (in *SKIPJobStatus) DeepCopy() *SKIPJobStatus

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

func (*SKIPJobStatus) DeepCopyInto added in v1.0.0

func (in *SKIPJobStatus) DeepCopyInto(out *SKIPJobStatus)

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

type Status added in v0.1.5

type Status struct {
	// +kubebuilder:default="Synced"
	Status StatusNames `json:"status"`
	// +kubebuilder:default="hello"
	Message string `json:"message"`
	// +kubebuilder:default="hello"
	TimeStamp string `json:"timestamp"`
}

Status

+kubebuilder:object:generate=true

func (*Status) DeepCopy added in v0.1.5

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto added in v0.1.5

func (in *Status) DeepCopyInto(out *Status)

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

type StatusNames added in v0.1.5

type StatusNames string
const (
	SYNCED      StatusNames = "Synced"
	PROGRESSING StatusNames = "Progressing"
	ERROR       StatusNames = "Error"
	PENDING     StatusNames = "Pending"
)

type Strategy added in v0.1.2

type Strategy struct {
	// Valid values are: RollingUpdate, Recreate. Default is RollingUpdate
	//
	//+kubebuilder:validation:Optional
	// +kubebuilder:validation:Enum=RollingUpdate;Recreate
	// +kubebuilder:default=RollingUpdate
	Type string `json:"type,omitempty"`
}

Strategy

Object representing a Kubernetes deployment strategy. Currently only contains a Type object, could probably be omitted in favour of directly using the Type.

+kubebuilder:object:generate=true

func (*Strategy) DeepCopy added in v1.0.0

func (in *Strategy) DeepCopy() *Strategy

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

func (*Strategy) DeepCopyInto added in v1.0.0

func (in *Strategy) DeepCopyInto(out *Strategy)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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