Fixed the client version used in sparkctl (#681)

This commit is contained in:
Yinan Li 2019-11-03 18:50:21 -08:00 committed by GitHub
parent 35e24b1126
commit baafaafeea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ var deleteCmd = &cobra.Command{
}
func doDelete(name string, crdClientset crdclientset.Interface) error {
err := crdClientset.SparkoperatorV1beta1().SparkApplications(Namespace).Delete(name, &metav1.DeleteOptions{})
err := crdClientset.SparkoperatorV1beta2().SparkApplications(Namespace).Delete(name, &metav1.DeleteOptions{})
if err != nil {
return err
}

View File

@ -46,7 +46,7 @@ var listCmd = &cobra.Command{
}
func doList(crdClientset crdclientset.Interface) error {
apps, err := crdClientset.SparkoperatorV1beta1().SparkApplications(Namespace).List(metav1.ListOptions{})
apps, err := crdClientset.SparkoperatorV1beta2().SparkApplications(Namespace).List(metav1.ListOptions{})
if err != nil {
return err
}

View File

@ -69,7 +69,7 @@ func init() {
}
func doLog(name string, kubeClientset clientset.Interface, crdClientset crdclientset.Interface) error {
app, err := crdClientset.SparkoperatorV1beta1().SparkApplications(Namespace).Get(name, metav1.GetOptions{})
app, err := crdClientset.SparkoperatorV1beta2().SparkApplications(Namespace).Get(name, metav1.GetOptions{})
if err != nil {
return fmt.Errorf("failed to get SparkApplication %s: %v", name, err)
}