Skip to content

Commit

Permalink
Merge pull request #25 from maxsmythe/ha_compatible_status
Browse files Browse the repository at this point in the history
Allow per-pod status reporting for HA setups
  • Loading branch information
maxsmythe committed Jun 28, 2019
2 parents 347984d + e4e38e1 commit 38085a7
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,18 @@ type CreateCRDError struct {
Location string `json:"location,omitempty"`
}

// ByPodStatus defines the observed state of ConstraintTemplate as seen by
// an individual controller
type ByPodStatus struct {
// a unique identifier for the pod that wrote the status
ID string `json:"id,omitempty"`
Errors []*CreateCRDError `json:"errors,omitempty"`
}

// ConstraintTemplateStatus defines the observed state of ConstraintTemplate
type ConstraintTemplateStatus struct {
Created bool `json:"created,omitempty"`
Errors []*CreateCRDError `json:"errors,omitempty"`
ByPod []*ByPodStatus `json:"byPod,omitempty"`
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}
Expand Down
56 changes: 55 additions & 1 deletion constraint/pkg/apis/templates/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 38085a7

Please sign in to comment.