Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Updated secret scope type.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheDeveloper committed Nov 27, 2019
1 parent a705c60 commit c0a5ccf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 13 additions & 1 deletion api/v1alpha1/secretscope_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ type SecretScopeSpec struct {
type SecretScopeStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
SecretScope *dbmodels.SecretScope `json:"secretscope,omitempty"`
SecretScope *dbmodels.SecretScope `json:"secretscope,omitempty"`
SecretScopeCreated bool `json:"secretscopecreated,omitempty"`
SecretInClusterAvailable bool `json:"secretinclusteravailable,omitempty"`
}

// +kubebuilder:object:root=true
Expand All @@ -51,6 +53,16 @@ type SecretScope struct {
Status SecretScopeStatus `json:"status,omitempty"`
}

// IsSecretAvailable returns true if secret in cluster is available
func (ss *SecretScope) IsSecretAvailable() bool {
return ss.Status.SecretInClusterAvailable
}

// IsCreated returns SecretScopeCreated's value
func (ss *SecretScope) IsCreated() bool {
return ss.Status.SecretScopeCreated
}

// IsSubmitted returns true if the item has been submitted to DataBricks
func (ss *SecretScope) IsSubmitted() bool {
return ss.Status.SecretScope != nil
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/databricks.microsoft.com_secretscopes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ spec:
status:
description: SecretScopeStatus defines the observed state of SecretScope
properties:
secretinclusteravailable:
type: boolean
secretscope:
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
of cluster Important: Run "make" to regenerate code after modifying
Expand All @@ -82,6 +84,8 @@ spec:
name:
type: string
type: object
secretscopecreated:
type: boolean
type: object
type: object
versions:
Expand Down

0 comments on commit c0a5ccf

Please sign in to comment.