mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 23:15:48 +02:00
Use ConfigMap to store operator's config
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"k8s.io/client-go/pkg/api/v1"
|
||||
|
||||
"github.bus.zalan.do/acid/postgres-operator/pkg/spec"
|
||||
"github.bus.zalan.do/acid/postgres-operator/pkg/util/constants"
|
||||
)
|
||||
|
||||
var passwordChars = []byte("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
|
||||
@@ -37,21 +36,6 @@ func NameFromMeta(meta v1.ObjectMeta) spec.NamespacedName {
|
||||
}
|
||||
}
|
||||
|
||||
func PodClusterName(pod *v1.Pod) spec.NamespacedName {
|
||||
if name, ok := pod.Labels[constants.ClusterNameLabel]; ok {
|
||||
return spec.NamespacedName{
|
||||
Namespace: pod.Namespace,
|
||||
Name: name,
|
||||
}
|
||||
}
|
||||
|
||||
return spec.NamespacedName{}
|
||||
}
|
||||
|
||||
func PodSpiloRole(pod *v1.Pod) string {
|
||||
return pod.Labels[constants.SpiloRoleLabel]
|
||||
}
|
||||
|
||||
func PGUserPassword(user spec.PgUser) string {
|
||||
s := md5.Sum([]byte(user.Password + user.Name))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user