Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
{{- if .Values.disableIngestionController }}
- --disable-ingestion-controller
{{- end }}
{{- with .Values.extraArgs}}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@ crd:
enabled: true
keep: true

# Disable the DruidIngestion controller if the CRD is not installed
disableIngestionController: false

extraArgs: {}
#- -zap-devel=false
13 changes: 10 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ func main() {
var metricsAddr string
var enableLeaderElection bool
var probeAddr string
var disableIngestionController bool
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.BoolVar(&disableIngestionController, "disable-ingestion-controller", false,
"Disable the DruidIngestion controller. Use this if the DruidIngestion CRD is not installed.")
opts := zap.Options{
Development: true,
}
Expand Down Expand Up @@ -100,9 +103,13 @@ func main() {
os.Exit(1)
}

if err = (druidingestioncontrollers.NewDruidIngestionReconciler(mgr)).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DruidIngestion")
os.Exit(1)
if !disableIngestionController {
if err = (druidingestioncontrollers.NewDruidIngestionReconciler(mgr)).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DruidIngestion")
os.Exit(1)
}
} else {
setupLog.Info("DruidIngestion controller is disabled")
}

//+kubebuilder:scaffold:builder
Expand Down
Loading