Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
change group API version from beta1 to alpha1 (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azadehkhojandi authored Oct 13, 2019
1 parent b20fd52 commit e204391
Show file tree
Hide file tree
Showing 60 changed files with 214 additions and 214 deletions.
12 changes: 6 additions & 6 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ domain: microsoft.com
repo: github.com/microsoft/azure-databricks-operator
resources:
- group: databricks
version: v1beta1
version: v1alpha1
kind: SecretScope
- group: databricks
version: v1beta1
version: v1alpha1
kind: Djob
- group: databricks
version: v1beta1
version: v1alpha1
kind: Run
- group: databricks
version: v1beta1
version: v1alpha1
kind: Dcluster
- group: databricks
version: v1beta1
version: v1alpha1
kind: DbfsBlock
- group: databricks
version: v1beta1
version: v1alpha1
kind: WorkspaceItem
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"crypto/sha1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"time"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
dbmodels "github.com/xinsnake/databricks-sdk-golang/azure/models"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"time"
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/djob_types.go → api/v1alpha1/djob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
dbmodels "github.com/xinsnake/databricks-sdk-golang/azure/models"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"time"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// package v1beta1 contains API Schema definitions for the databricks v1 API group
// package v1alpha1 contains API Schema definitions for the databricks v1 API group
// +kubebuilder:object:generate=true
// +groupName=databricks.microsoft.com
package v1beta1
package v1alpha1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "databricks.microsoft.com", Version: "v1beta1"}
GroupVersion = schema.GroupVersion{Group: "databricks.microsoft.com", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/helpers.go → api/v1alpha1/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"math/rand"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"time"
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/run_types.go → api/v1alpha1/run_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
dbazure "github.com/xinsnake/databricks-sdk-golang/azure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"time"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
dbmodels "github.com/xinsnake/databricks-sdk-golang/azure/models"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

type SecretScopeSecret struct {
Key string `json:"key,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"time"
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/suite_test.go → api/v1alpha1/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"os"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"crypto/sha1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
package v1alpha1

import (
"time"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.

// autogenerated by controller-gen object, do not modify manually

package v1beta1
package v1alpha1

import (
"github.com/xinsnake/databricks-sdk-golang/azure"
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/databricks.microsoft.com_dbfsblocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
type: object
type: object
versions:
- name: v1beta1
- name: v1alpha1
served: true
storage: true
status:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/databricks.microsoft.com_dclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ spec:
type: object
type: object
versions:
- name: v1beta1
- name: v1alpha1
served: true
storage: true
status:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/databricks.microsoft.com_djobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ spec:
type: object
type: object
versions:
- name: v1beta1
- name: v1alpha1
served: true
storage: true
status:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/databricks.microsoft.com_runs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ spec:
type: object
type: object
versions:
- name: v1beta1
- name: v1alpha1
served: true
storage: true
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
type: object
type: object
versions:
- name: v1beta1
- name: v1alpha1
served: true
storage: true
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
type: object
type: object
versions:
- name: v1beta1
- name: v1alpha1
served: true
storage: true
status:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: databricks.microsoft.com/v1beta1
apiVersion: databricks.microsoft.com/v1alpha1
kind: DbfsBlock
metadata:
name: dbfsblock-sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: databricks.microsoft.com/v1beta1
apiVersion: databricks.microsoft.com/v1alpha1
kind: Dcluster
metadata:
name: dcluster-sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: databricks.microsoft.com/v1beta1
apiVersion: databricks.microsoft.com/v1alpha1
kind: Djob
metadata:
name: djob-sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: databricks.microsoft.com/v1beta1
apiVersion: databricks.microsoft.com/v1alpha1
kind: Run
metadata:
name: run-sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: databricks.microsoft.com/v1beta1
apiVersion: databricks.microsoft.com/v1alpha1
kind: Run
metadata:
name: run-sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: databricks.microsoft.com/v1beta1
apiVersion: databricks.microsoft.com/v1alpha1
kind: SecretScope
metadata:
name: secretscope-sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: databricks.microsoft.com/v1beta1
apiVersion: databricks.microsoft.com/v1alpha1
kind: WorkspaceItem
metadata:
name: workspaceitem-sample
Expand Down
8 changes: 4 additions & 4 deletions controllers/dbfsblock_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

databricksv1beta1 "github.com/microsoft/azure-databricks-operator/api/v1beta1"
databricksv1alpha1 "github.com/microsoft/azure-databricks-operator/api/v1alpha1"
)

// DbfsBlockReconciler reconciles a DbfsBlock object
Expand All @@ -46,7 +46,7 @@ func (r *DbfsBlockReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
_ = context.Background()
_ = r.Log.WithValues("dbfsblock", req.NamespacedName)

instance := &databricksv1beta1.DbfsBlock{}
instance := &databricksv1alpha1.DbfsBlock{}

r.Log.Info(fmt.Sprintf("Starting reconcile loop for %v", req.NamespacedName))
defer r.Log.Info(fmt.Sprintf("Finish reconcile loop for %v", req.NamespacedName))
Expand All @@ -67,7 +67,7 @@ func (r *DbfsBlockReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
return ctrl.Result{}, nil
}

if !instance.HasFinalizer(databricksv1beta1.DbfsBlockFinalizerName) {
if !instance.HasFinalizer(databricksv1alpha1.DbfsBlockFinalizerName) {
r.Log.Info(fmt.Sprintf("AddFinalizer for %v", req.NamespacedName))
if err := r.addFinalizer(instance); err != nil {
return ctrl.Result{}, fmt.Errorf("error when adding finalizer: %v", err)
Expand All @@ -90,6 +90,6 @@ func (r *DbfsBlockReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {

func (r *DbfsBlockReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&databricksv1beta1.DbfsBlock{}).
For(&databricksv1alpha1.DbfsBlock{}).
Complete(r)
}
8 changes: 4 additions & 4 deletions controllers/dbfsblock_controller_databricks.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"fmt"
"time"

databricksv1beta1 "github.com/microsoft/azure-databricks-operator/api/v1beta1"
databricksv1alpha1 "github.com/microsoft/azure-databricks-operator/api/v1alpha1"
)

func (r *DbfsBlockReconciler) submit(instance *databricksv1beta1.DbfsBlock) error {
func (r *DbfsBlockReconciler) submit(instance *databricksv1alpha1.DbfsBlock) error {
r.Log.Info(fmt.Sprintf("Create block %s", instance.GetName()))

data, err := base64.StdEncoding.DecodeString(instance.Spec.Data)
Expand Down Expand Up @@ -66,15 +66,15 @@ func (r *DbfsBlockReconciler) submit(instance *databricksv1beta1.DbfsBlock) erro
return err
}

instance.Status = &databricksv1beta1.DbfsBlockStatus{
instance.Status = &databricksv1alpha1.DbfsBlockStatus{
FileInfo: &fileInfo,
FileHash: instance.GetHash(),
}

return r.Update(context.Background(), instance)
}

func (r *DbfsBlockReconciler) delete(instance *databricksv1beta1.DbfsBlock) error {
func (r *DbfsBlockReconciler) delete(instance *databricksv1alpha1.DbfsBlock) error {
r.Log.Info(fmt.Sprintf("Deleting block %s", instance.GetName()))

if instance.Status == nil || instance.Status.FileInfo == nil {
Expand Down
Loading

0 comments on commit e204391

Please sign in to comment.