File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import (
3939 "sigs.k8s.io/controller-runtime/pkg/reconcile"
4040 "sigs.k8s.io/controller-runtime/pkg/source"
4141
42+ "github.com/coderanger/migrations-operator/api/stubs/argoproj"
4243 migrationsv1beta1 "github.com/coderanger/migrations-operator/api/v1beta1"
4344 "github.com/coderanger/migrations-operator/utils"
4445 "github.com/coderanger/migrations-operator/webhook"
@@ -332,6 +333,8 @@ func (_ *migrationsComponent) findSpecFor(obj cu.Object) *corev1.PodSpec {
332333 return & v .Spec
333334 case * appsv1.Deployment :
334335 return & v .Spec .Template .Spec
336+ case * argoproj.Rollout :
337+ return & v .Spec .Template .Spec
335338 // TODO other types. lots of them.
336339 default :
337340 return nil
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ rules:
3232 - get
3333 - list
3434 - watch
35+ - apiGroups :
36+ - argoproj.io
37+ resources :
38+ - rollouts
39+ verbs :
40+ - get
41+ - list
42+ - watch
3543- apiGroups :
3644 - batch
3745 resources :
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import (
3131// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch
3232// +kubebuilder:rbac:groups=apps,resources=replicasets;deployments;statfulsets;daemonsets,verbs=get;list;watch
3333// +kubebuilder:rbac:groups=batch,resources=cronjobs,verbs=get;list;watch
34+ // +kubebuilder:rbac:groups=argoproj.io,resources=rollouts,verbs=get;list;watch
3435
3536func Migrator (mgr ctrl.Manager ) error {
3637 return cu .NewReconciler (mgr ).
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
2828 ctrl "sigs.k8s.io/controller-runtime"
2929 "sigs.k8s.io/controller-runtime/pkg/log/zap"
3030
31+ "github.com/coderanger/migrations-operator/api/stubs/argoproj"
3132 migrationsv1beta1 "github.com/coderanger/migrations-operator/api/v1beta1"
3233 "github.com/coderanger/migrations-operator/controllers"
3334 "github.com/coderanger/migrations-operator/http"
4344func init () {
4445 _ = clientgoscheme .AddToScheme (scheme )
4546
47+ _ = argoproj .AddToScheme (scheme )
4648 _ = migrationsv1beta1 .AddToScheme (scheme )
4749 // +kubebuilder:scaffold:scheme
4850}
You can’t perform that action at this time.
0 commit comments