Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infrastructure stack CRD a bit #982

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,940 changes: 49 additions & 7,891 deletions charts/controller/crds/deployments.plural.sh_infrastructurestacks.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spec:
gate types.
properties:
job:
description: GateJob is a spec for a job gate.
description: JobSpec is a spec for a job gate.
properties:
annotations:
additionalProperties:
Expand Down
12 changes: 9 additions & 3 deletions controller/api/v1alpha1/infrastructurestack_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package v1alpha1

import (
console "github.com/pluralsh/console-client-go"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -38,15 +37,22 @@ type InfrastructureStackSpec struct {
RepositoryRef corev1.ObjectReference `json:"repositoryRef"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Cluster is immutable"
ClusterRef corev1.ObjectReference `json:"clusterRef"`

// Git reference w/in the repository where the IaC lives
Git GitRef `json:"git"`

// Whether you want Plural to manage the state of this stack
// +kubebuilder:validation:Optional
ManageState *bool `json:"manageState,omitempty"`

// The working directory within the git spec you want to run commands in (useful for projects with external modules)
// +kubebuilder:validation:Optional
Workdir *string `json:"workdir,omitempty"`

// JobSpec optional k8s job configuration for the job that will apply this stack
// +kubebuilder:validation:Optional
JobSpec *batchv1.JobSpec `json:"jobSpec,omitempty"`
JobSpec *JobSpec `json:"jobSpec,omitempty"`

// Configuration version/image config for the tool you're using
Configuration StackConfiguration `json:"configuration"`
Expand Down
6 changes: 3 additions & 3 deletions controller/api/v1alpha1/pipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ type PipelineGate struct {
// GateSpec is a more refined spec for parameters needed for complex gates.
type GateSpec struct {
// +kubebuilder:validation:Optional
Job *GateJob `json:"job,omitempty"`
Job *JobSpec `json:"job,omitempty"`
}

// GateJob is a spec for a job gate.
type GateJob struct {
// JobSpec is a spec for a job gate.
type JobSpec struct {
// +kubebuilder:validation:Required
// +kubebuilder:validation:Type:=string
Namespace string `json:"namespace"`
Expand Down
115 changes: 62 additions & 53 deletions controller/api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading