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 (
39
39
"sigs.k8s.io/controller-runtime/pkg/reconcile"
40
40
"sigs.k8s.io/controller-runtime/pkg/source"
41
41
42
+ "github.com/coderanger/migrations-operator/api/stubs/argoproj"
42
43
migrationsv1beta1 "github.com/coderanger/migrations-operator/api/v1beta1"
43
44
"github.com/coderanger/migrations-operator/utils"
44
45
"github.com/coderanger/migrations-operator/webhook"
@@ -332,6 +333,8 @@ func (_ *migrationsComponent) findSpecFor(obj cu.Object) *corev1.PodSpec {
332
333
return & v .Spec
333
334
case * appsv1.Deployment :
334
335
return & v .Spec .Template .Spec
336
+ case * argoproj.Rollout :
337
+ return & v .Spec .Template .Spec
335
338
// TODO other types. lots of them.
336
339
default :
337
340
return nil
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ rules:
32
32
- get
33
33
- list
34
34
- watch
35
+ - apiGroups :
36
+ - argoproj.io
37
+ resources :
38
+ - rollouts
39
+ verbs :
40
+ - get
41
+ - list
42
+ - watch
35
43
- apiGroups :
36
44
- batch
37
45
resources :
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import (
31
31
// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch
32
32
// +kubebuilder:rbac:groups=apps,resources=replicasets;deployments;statfulsets;daemonsets,verbs=get;list;watch
33
33
// +kubebuilder:rbac:groups=batch,resources=cronjobs,verbs=get;list;watch
34
+ // +kubebuilder:rbac:groups=argoproj.io,resources=rollouts,verbs=get;list;watch
34
35
35
36
func Migrator (mgr ctrl.Manager ) error {
36
37
return cu .NewReconciler (mgr ).
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
28
28
ctrl "sigs.k8s.io/controller-runtime"
29
29
"sigs.k8s.io/controller-runtime/pkg/log/zap"
30
30
31
+ "github.com/coderanger/migrations-operator/api/stubs/argoproj"
31
32
migrationsv1beta1 "github.com/coderanger/migrations-operator/api/v1beta1"
32
33
"github.com/coderanger/migrations-operator/controllers"
33
34
"github.com/coderanger/migrations-operator/http"
43
44
func init () {
44
45
_ = clientgoscheme .AddToScheme (scheme )
45
46
47
+ _ = argoproj .AddToScheme (scheme )
46
48
_ = migrationsv1beta1 .AddToScheme (scheme )
47
49
// +kubebuilder:scaffold:scheme
48
50
}
You can’t perform that action at this time.
0 commit comments