Skip to content

Commit

Permalink
fix apps
Browse files Browse the repository at this point in the history
Signed-off-by: Huamin Chen <hchen@redhat.com>
  • Loading branch information
rootfs committed Feb 13, 2019
1 parent 591bfe0 commit 8c30ba4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/operator/k8sutil/apps.go
Expand Up @@ -49,10 +49,10 @@ func makeHeadlessSvc(name, namespace string, label map[string]string, clientset

// create a apps.daemonset
func CreateDaemonSet(name, namespace string, clientset kubernetes.Interface, ds *apps.DaemonSet) error {
_, err := clientset.AppsV1beta2().DaemonSets(namespace).Create(ds)
_, err := clientset.Apps().DaemonSets(namespace).Create(ds)
if err != nil {
if k8serrors.IsAlreadyExists(err) {
_, err = clientset.AppsV1beta2().DaemonSets(namespace).Update(ds)
_, err = clientset.Apps().DaemonSets(namespace).Update(ds)
}
if err != nil {
return fmt.Errorf("failed to start %s daemonset: %v\n%v", name, err, ds)
Expand All @@ -69,10 +69,10 @@ func CreateStatefulSet(name, namespace, appName string, clientset kubernetes.Int
return nil, fmt.Errorf("failed to start %s service: %v\n%v", name, err, ss)
}

_, err = clientset.AppsV1beta2().StatefulSets(namespace).Create(ss)
_, err = clientset.Apps().StatefulSets(namespace).Create(ss)
if err != nil {
if k8serrors.IsAlreadyExists(err) {
_, err = clientset.AppsV1beta2().StatefulSets(namespace).Update(ss)
_, err = clientset.Apps().StatefulSets(namespace).Update(ss)
}
if err != nil {
return nil, fmt.Errorf("failed to start %s statefulset: %v\n%v", name, err, ss)
Expand Down

0 comments on commit 8c30ba4

Please sign in to comment.