Skip to content

Commit

Permalink
Add route to ClusterRole/Role, update plugin name in ConfigMap
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan West <jonwest@redhat.com>
  • Loading branch information
jgwest committed Apr 11, 2024
1 parent ec88ea4 commit efd9a78
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
11 changes: 11 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,17 @@ rules:
- patch
- update
- watch
- apiGroups:
- route.openshift.io
resources:
- routes
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- split.smi-spec.io
resources:
Expand Down
1 change: 1 addition & 0 deletions controllers/argorollouts_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ var log = logr.Log.WithName("rollouts-controller")
//+kubebuilder:rbac:groups="traefik.containo.us",resources=traefikservices,verbs=watch;get;update
//+kubebuilder:rbac:groups="x.getambassador.io",resources=ambassadormappings;mappings,verbs=create;watch;get;update;list;delete
//+kubebuilder:rbac:groups="apisix.apache.org",resources=apisixroutes,verbs=watch;get;update
//+kubebuilder:rbac:groups="route.openshift.io",resources=routes,verbs=create;watch;get;update;patch;list

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down
4 changes: 2 additions & 2 deletions controllers/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const (
DefaultRolloutsSelectorKey = "app.kubernetes.io/name"

// OpenShiftRolloutPluginName is the plugin name for Openshift Route Plugin
OpenShiftRolloutPluginName = "argoproj-labs/openshift-route-plugin"
OpenShiftRolloutPluginName = "argoproj-labs/openshift"

// DefaultRolloutsConfigMapName is the default name of the ConfigMap that contains the Rollouts controller configuration
DefaultRolloutsConfigMapName = "argo-rollouts-config"

DefaultOpenShiftRoutePluginURL = "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-openshift/releases/download/commit-2749e0ac96ba00ce6f4af19dc6d5358048227d77/rollouts-plugin-trafficrouter-openshift-linux-amd64"
DefaultOpenShiftRoutePluginURL = "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-openshift/releases/download/commit-8d0b3c6c5c18341f9f019cf1015b56b0d0c6085b/rollouts-plugin-trafficrouter-openshift-linux-amd64"

// NamespaceScopedArgoRolloutsController is an environment variable that can be used to configure scope of Argo Rollouts controller
// Set true to allow only namespace-scoped Argo Rollouts controller deployment and false for cluster-scoped
Expand Down
16 changes: 16 additions & 0 deletions controllers/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,22 @@ func GetPolicyRules() []rbacv1.PolicyRule {
"update",
},
},
{
APIGroups: []string{
"route.openshift.io",
},
Resources: []string{
"routes",
},
Verbs: []string{
"create",
"watch",
"get",
"update",
"patch",
"list",
},
},
}
}

Expand Down

0 comments on commit efd9a78

Please sign in to comment.