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

Commit

Permalink
fix human merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wseaton committed Mar 8, 2021
1 parent 248ec77 commit 8327f08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
25 changes: 0 additions & 25 deletions api/v1alpha1/airflowbase_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 3 additions & 7 deletions controllers/airflowcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{})

Expand Down

0 comments on commit 8327f08

Please sign in to comment.