diff --git a/api/v1alpha1/airflowbase_types.go b/api/v1alpha1/airflowbase_types.go index 7215889..45ffe06 100644 --- a/api/v1alpha1/airflowbase_types.go +++ b/api/v1alpha1/airflowbase_types.go @@ -276,31 +276,6 @@ func validStorageProvider(provider string) bool { return false } -// AirflowUISpec defines the attributes to deploy Airflow UI component -type AirflowUISpec struct { - // Image defines the AirflowUI Docker image. - // +optional - Image string `json:"image,omitempty"` - // Version defines the AirflowUI Docker image version. - // +optional - Version string `json:"version,omitempty"` - // Replicas defines the number of running Airflow UI instances in a cluster - // +optional - Replicas int32 `json:"replicas,omitempty"` - // Resources is the resource requests and limits for the pods. - // +optional - Resources corev1.ResourceRequirements `json:"resources,omitempty"` - // enableroutes: true enables routes for the AirflowUI and CeleryUI - // +optional, enable on OpenShift clusters only - EnableRoutes bool `json:"enableroutes,omitempty"` -} - -func (s *AirflowUISpec) validate(fp *field.Path) field.ErrorList { - errs := field.ErrorList{} - //errs = append(errs, s.Resources.validate(fp.Child("resources"))...) - return errs -} - // NFSStoreSpec defines the attributes to deploy Airflow Storage component type NFSStoreSpec struct { // Image defines the NFS Docker image. diff --git a/controllers/airflowcluster_controller.go b/controllers/airflowcluster_controller.go index 8bffeb5..39bb441 100644 --- a/controllers/airflowcluster_controller.go +++ b/controllers/airflowcluster_controller.go @@ -33,6 +33,7 @@ import ( "github.com/apache/airflow-on-k8s-operator/controllers/application" "github.com/apache/airflow-on-k8s-operator/controllers/common" app "github.com/kubernetes-sigs/application/pkg/apis/app/v1beta1" + oauthv1 "github.com/openshift/api/oauth/v1" routev1 "github.com/openshift/api/route/v1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -901,13 +902,8 @@ func (s *Flower) Objects(rsrc interface{}, rsrclabels map[string]string, observe } ngdata := acTemplateValue(r, dependent, common.ValueAirflowComponentFlower, rsrclabels, rsrclabels, map[string]string{"flower": "5555"}) - bag := k8s.NewObjects() - bag.WithValue(ngdata) - if r.Spec.Flower.EnableRoutes == true { - bag.WithTemplate("route.yaml", &routev1.RouteList{}) - } - - return bag.WithTemplate("svc.yaml", &corev1.ServiceList{}). + bag := k8s.NewObjects(). + WithValue(ngdata). WithTemplate("flower-sts.yaml", &appsv1.StatefulSetList{}, s.sts). WithTemplate("svc.yaml", &corev1.ServiceList{})