Skip to content

Commit

Permalink
feat: add remediation strategy in api
Browse files Browse the repository at this point in the history
  • Loading branch information
spoukke committed Feb 9, 2023
1 parent a206236 commit e4ec67d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/terraformlayer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type TerraformLayerSpec struct {
type TerraformLayerRemediationStrategy struct {
PlanOnDrift bool `json:"planOnDrift,omitempty"`
ApplyOnDrift bool `json:"applyOnDrift,omitempty"`
PlanOnPush bool `json:"planOnPush,omitempty"`
ApplyOnPush bool `json:"applyOnPush,omitempty"`
}

Expand Down
12 changes: 10 additions & 2 deletions api/v1alpha1/terraformrepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ type TerraformRepositorySpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

Repository TerraformRepositoryRepository `json:"repository,omitempty"`
OverrideRunnerSpec OverrideRunnerSpec `json:"overrideRunnerSpec,omitempty"`
Repository TerraformRepositoryRepository `json:"repository,omitempty"`
RemediationStrategy TerraformRepositoryRemediationStrategy `json:"remediationStrategy,omitempty"`
OverrideRunnerSpec OverrideRunnerSpec `json:"overrideRunnerSpec,omitempty"`
}

type TerraformRepositoryRepository struct {
Expand All @@ -42,6 +43,13 @@ type TerraformRepositoryStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

type TerraformRepositoryRemediationStrategy struct {
PlanOnDrift bool `json:"planOnDrift,omitempty"`
ApplyOnDrift bool `json:"applyOnDrift,omitempty"`
PlanOnPush bool `json:"planOnPush,omitempty"`
ApplyOnPush bool `json:"applyOnPush,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

Expand Down

0 comments on commit e4ec67d

Please sign in to comment.