move StatefulSet to apps/v1 (#675)

This commit is contained in:
Felix Kunde
2019-09-30 16:42:04 +02:00
committed by GitHub
parent e00b37fc17
commit f0e29060b1
8 changed files with 47 additions and 47 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ import (
"time"
"github.com/sirupsen/logrus"
"k8s.io/api/apps/v1beta1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
policybeta1 "k8s.io/api/policy/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -52,7 +52,7 @@ type kubeResources struct {
Services map[PostgresRole]*v1.Service
Endpoints map[PostgresRole]*v1.Endpoints
Secrets map[types.UID]*v1.Secret
Statefulset *v1beta1.StatefulSet
Statefulset *appsv1.StatefulSet
PodDisruptionBudget *policybeta1.PodDisruptionBudget
//Pods are treated separately
//PVCs are treated separately
@@ -214,7 +214,7 @@ func (c *Cluster) Create() error {
service *v1.Service
ep *v1.Endpoints
ss *v1beta1.StatefulSet
ss *appsv1.StatefulSet
)
defer func() {
@@ -315,7 +315,7 @@ func (c *Cluster) Create() error {
return nil
}
func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *compareStatefulsetResult {
func (c *Cluster) compareStatefulSetWith(statefulSet *appsv1.StatefulSet) *compareStatefulsetResult {
reasons := make([]string, 0)
var match, needsRollUpdate, needsReplace bool