Skip to content

Commit

Permalink
Add redis constants and an address function (#663)
Browse files Browse the repository at this point in the history
Signed-off-by: anis028 <anis028@appscode.com>
  • Loading branch information
anis028 committed Dec 28, 2020
1 parent 2c0e631 commit 83fb66c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis/kubedb/v1alpha2/redis_helpers.go
Expand Up @@ -103,6 +103,10 @@ func (r Redis) StatefulSetNameWithShard(i int) string {
return fmt.Sprintf("%s%d", r.BaseNameForShard(), i)
}

func (r Redis) Address() string {
return fmt.Sprintf("%v.%v.svc:%d", r.Name, r.Namespace, RedisDatabasePort)
}

type redisApp struct {
*Redis
}
Expand Down
11 changes: 11 additions & 0 deletions apis/ops/v1alpha1/type.go
Expand Up @@ -102,6 +102,17 @@ const (
UpdateDataNodePVCs = "UpdateDataNodePVCs"
UpdateIngestNodePVCs = "UpdateIngestNodePVCs"
UpdateNodeResources = "UpdateNodeResources"

//Redis Constants
PatchedSecret = "patchedSecret"
ConfigKeyRedis = "redis.conf"
IssuingConditionUpdated = "IssuingConditionUpdated"
CertificateIssuingSuccessful = "CertificateIssuingSuccessful"
TLSAdded = "TLSAdded"
TLSRemoved = "TLSRemoved"
RedisTLSArg = "--tls-port 6379"
DBReady = "DBReady"
RestartedPods = "RestartedPods"
)

// +kubebuilder:validation:Enum=Progressing;Successful;WaitingForApproval;Failed;Approved;Denied
Expand Down

0 comments on commit 83fb66c

Please sign in to comment.