Skip to content

Commit

Permalink
provide the ability to disable features
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli committed Mar 23, 2022
1 parent 8fa823a commit 3b43ebf
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions crd-docs/cr/kiali.io_v1alpha1_kiali.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ spec:
- "istio-ca-secret"
clustering:
enabled: true
disabled_features: []
istio_injection_action: true
istio_upgrade_action: false
ui_defaults:
Expand Down
6 changes: 6 additions & 0 deletions crd-docs/crd/kiali.io_kialis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,12 @@ spec:
enabled:
description: "Flag to enable/disable clustering and federation related features."
type: boolean
disabled_features:
description: "There may be some features that admins do not want to be accessible to users (even in 'view only' mode). In this case, this setting allows you to disable one or more of those features entirely."
type: array
items:
type: string
enum: ["log-view"]
istio_injection_action:
description: "Flag to enable/disable an Action to label a namespace for automatic Istio Sidecar injection."
type: boolean
Expand Down
1 change: 1 addition & 0 deletions roles/default/kiali-deploy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ kiali_defaults:
- istio-ca-secret
clustering:
enabled: true
disabled_features: []
istio_injection_action: true
istio_upgrade_action: false
ui_defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ rules:
resources:
- configmaps
- endpoints
{% if kiali_vars.kiali_feature_flags.disabled_features is defined and 'log-view' not in kiali_vars.kiali_feature_flags.disabled_features %}
- pods/log
{% endif %}
verbs:
- get
- list
Expand Down
2 changes: 2 additions & 0 deletions roles/default/kiali-deploy/templates/kubernetes/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ rules:
resources:
- configmaps
- endpoints
{% if kiali_vars.kiali_feature_flags.disabled_features is defined and 'log-view' not in kiali_vars.kiali_feature_flags.disabled_features %}
- pods/log
{% endif %}
verbs:
- get
- list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ rules:
resources:
- configmaps
- endpoints
{% if kiali_vars.kiali_feature_flags.disabled_features is defined and 'log-view' not in kiali_vars.kiali_feature_flags.disabled_features %}
- pods/log
{% endif %}
verbs:
- get
- list
Expand Down
2 changes: 2 additions & 0 deletions roles/default/kiali-deploy/templates/openshift/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ rules:
resources:
- configmaps
- endpoints
{% if kiali_vars.kiali_feature_flags.disabled_features is defined and 'log-view' not in kiali_vars.kiali_feature_flags.disabled_features %}
- pods/log
{% endif %}
verbs:
- get
- list
Expand Down

0 comments on commit 3b43ebf

Please sign in to comment.