Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename in_cluster_url to internal_url; rename url to external_url #820

Merged
merged 1 commit into from
Sep 23, 2024
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
10 changes: 5 additions & 5 deletions crd-docs/cr/kiali.io_v1alpha1_kiali.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ spec:
- name: "Istio Performance Dashboard"
- name: "Istio Wasm Extension Dashboard"
enabled: true
external_url: ""
health_check_url: ""
# default: in_cluster_url is undefined
in_cluster_url: ""
# default: internal_url is undefined
internal_url: ""
is_core: false
url: ""
istio:
component_status:
enabled: true
Expand Down Expand Up @@ -356,9 +356,10 @@ spec:
custom_headers:
customHeader1: "customHeader1Value"
enabled: false
external_url: ""
grpc_port: 9095
health_check_url: ""
in_cluster_url: ""
internal_url: ""
is_core: false
namespace_selector: true
provider: "jaeger"
Expand All @@ -370,7 +371,6 @@ spec:
tempo_config:
datasource_uid: ""
org_id: ""
url: ""
use_grpc: true
whitelist_istio_system: ["jaeger-query", "istio-ingressgateway"]

Expand Down
24 changes: 12 additions & 12 deletions crd-docs/crd/kiali.io_kialis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -795,18 +795,18 @@ spec:
enabled:
description: "When true, Grafana support will be enabled in Kiali."
type: boolean
external_url:
description: "The URL that the Kiali UI uses when displaying Grafana links to the user. This URL must be accessible to clients external to the cluster (e.g. a browser) in order for the integration to work properly. If empty, an attempt to auto-discover it is made. This URL can contain query parameters if needed, such as '?orgId=1'."
type: string
health_check_url:
description: "Used in the Components health feature. This is the URL which Kiali will ping to determine whether the component is reachable or not. It defaults to `in_cluster_url` when not provided."
description: "Used in the Components health feature. This is the URL which Kiali will ping to determine whether the component is reachable or not. It defaults to `internal_url` when not provided."
type: string
in_cluster_url:
description: "The URL used for in-cluster access. An example would be `http://grafana.istio-system:3000`. This URL can contain query parameters if needed, such as '?orgId=1'. If not defined, it will default to `http://grafana.<istio_namespace>:3000`."
internal_url:
description: "The URL used by Kiali to perform requests and queries to Grafana. An example would be `http://grafana.istio-system:3000`. This URL can contain query parameters if needed, such as '?orgId=1'. If not defined, it will default to `http://grafana.<istio_namespace>:3000`."
type: string
is_core:
description: "Used in the Components health feature. When true, the unhealthy scenarios will be raised as errors. Otherwise, they will be raised as a warning."
type: boolean
url:
description: "The URL that Kiali uses when integrating with Grafana. This URL must be accessible to clients external to the cluster in order for the integration to work properly. If empty, an attempt to auto-discover it is made. This URL can contain query parameters if needed, such as '?orgId=1'."
type: string
istio:
description: "Istio configuration that Kiali needs to know about in order to observe the mesh."
type: object
Expand Down Expand Up @@ -999,16 +999,19 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: "When true, connections to the Tracing server are enabled. `in_cluster_url` and/or `url` need to be provided."
description: "When true, connections to the Tracing server are enabled. `internal_url` and/or `external_url` need to be provided."
type: boolean
external_url:
description: "The URL that the Kiali UI uses when displaying Tracing UI links to the user. This URL must be accessible to clients external to the cluster (e.g. a browser) in order to generate valid links. If the tracing service is deployed with a QUERY_BASE_PATH set, set this URL like https://<hostname>/<QUERY_BASE_PATH>; for example, https://tracing-service:8080/jaeger"
type: string
grpc_port:
description: "Set port number when `use_grpc` is true and `provider` is `tempo`. By default is `9095`"
type: integer
health_check_url:
description: "Used in the Components health feature. This is the url which Kiali will ping to determine whether the component is reachable or not. It defaults to `url` when not provided."
type: string
in_cluster_url:
description: "Set URL for in-cluster access, which enables further integration between Kiali and Jaeger. When not provided, Kiali will only show external links using the `url` setting. Note: Jaeger v1.20+ has separated ports for GRPC(16685) and HTTP(16686) requests. Make sure you use the appropriate port according to the `use_grpc` value. Example: http://tracing.istio-system:16685"
internal_url:
description: "The URL used by Kiali to perform requests and queries to the tracing backend which enables further integration between Kiali and the tracing server. When not provided, Kiali will only show external links using the `external_url` setting. Note: Jaeger v1.20+ has separated ports for GRPC(16685) and HTTP(16686) requests. Make sure you use the appropriate port according to the `use_grpc` value. Example: http://tracing.istio-system:16685"
type: string
is_core:
description: "Used in the Components health feature. When true, the unhealthy scenarios will be raised as errors. Otherwise, they will be raised as a warning."
Expand Down Expand Up @@ -1036,9 +1039,6 @@ spec:
org_id:
description: "The Id of the organization that the dashboard is in. Default to 1 (the first and default organization)."
type: string
url:
description: "The external URL that will be used to generate links to Jaeger. It must be accessible to clients external to the cluster (e.g: a browser) in order to generate valid links. If the tracing service is deployed with a QUERY_BASE_PATH set, set this URL like https://<hostname>/<QUERY_BASE_PATH>. For example, https://tracing-service:8080/jaeger"
type: string
use_grpc:
description: "Set to true in order to enable GRPC connections between Kiali and Jaeger which will speed up the queries. In some setups you might not be able to use GRPC (e.g. if Jaeger is behind some reverse proxy that doesn't support it). If not specified, this will defalt to 'true'."
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion molecule/asserts/configmap_asserts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
- name: Assert Kiali Configmap has the correct Grafana Url for Upstream Istio installs
assert:
that:
- kiali_configmap.external_services.grafana.in_cluster_url == "http://grafana.{{ istio.control_plane_namespace }}:3000"
- kiali_configmap.external_services.grafana.internal_url == "http://grafana.{{ istio.control_plane_namespace }}:3000"
8 changes: 4 additions & 4 deletions molecule/grafana-test/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
- import_tasks: ../asserts/pod_asserts.yml
- import_tasks: ../common/wait_for_kiali_running.yml

- name: Remember the good in_cluster_url
- name: Remember the good internal_url
set_fact:
good_in_cluster_url: "{{ kiali_configmap.external_services.grafana.in_cluster_url }}"
good_internal_url: "{{ kiali_configmap.external_services.grafana.internal_url }}"

- name: Get statuses from Istio components
uri:
Expand Down Expand Up @@ -46,7 +46,7 @@
vars:
current_kiali_cr: "{{ kiali_cr_list.resources[0] }}"
set_fact:
new_kiali_cr: "{{ current_kiali_cr | combine({'spec': {'external_services': {'grafana': {'in_cluster_url': 'http://wrong.url'}}}}, recursive=True) }}"
new_kiali_cr: "{{ current_kiali_cr | combine({'spec': {'external_services': {'grafana': {'internal_url': 'http://wrong.url'}}}}, recursive=True) }}"

- import_tasks: ../common/set_kiali_cr.yml

Expand Down Expand Up @@ -88,7 +88,7 @@
vars:
current_kiali_cr: "{{ kiali_cr_list.resources[0] }}"
set_fact:
new_kiali_cr: "{{ current_kiali_cr | combine({'spec': {'external_services': {'grafana': {'in_cluster_url': good_in_cluster_url, 'health_check_url': good_in_cluster_url }}}}, recursive=True) }}"
new_kiali_cr: "{{ current_kiali_cr | combine({'spec': {'external_services': {'grafana': {'internal_url': good_internal_url, 'health_check_url': good_internal_url }}}}, recursive=True) }}"

- import_tasks: ../common/set_kiali_cr.yml

Expand Down
2 changes: 1 addition & 1 deletion molecule/jaeger-test/update-jaeger-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
vars:
current_kiali_cr: "{{ kiali_cr_list.resources[0] }}"
set_fact:
new_kiali_cr: "{{ current_kiali_cr | combine({'spec': {'external_services': {'tracing': {'in_cluster_url': 'http://wrong.url'}}}}, recursive=True) }}"
new_kiali_cr: "{{ current_kiali_cr | combine({'spec': {'external_services': {'tracing': {'internal_url': 'http://wrong.url'}}}}, recursive=True) }}"

- import_tasks: ../common/set_kiali_cr.yml
8 changes: 4 additions & 4 deletions molecule/null-cr-values-test/kiali-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ spec:
username: null
dashboards: null
enabled: null
in_cluster_url: null
url: null
internal_url: null
external_url: null

istio:
component_status: null
Expand Down Expand Up @@ -97,9 +97,9 @@ spec:
use_kiali_token: null
username: null
enabled: null
in_cluster_url: null
internal_url: null
namespace_selector: null
url: null
external_url: null
whitelist_istio_system: null

health_config: null
Expand Down
8 changes: 4 additions & 4 deletions roles/default/kiali-deploy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ kiali_defaults:
- name: "Istio Performance Dashboard"
- name: "Istio Wasm Extension Dashboard"
enabled: true
external_url: ""
health_check_url: ""
#in_cluster_url
#internal_url
is_core: false
url: ""
istio:
component_status:
enabled: true
Expand Down Expand Up @@ -200,9 +200,10 @@ kiali_defaults:
username: ""
custom_headers: {}
enabled: false
external_url: ""
grpc_port: 9095
health_check_url: ""
in_cluster_url: ""
internal_url: ""
is_core: false
namespace_selector: true
provider: "jaeger"
Expand All @@ -211,7 +212,6 @@ kiali_defaults:
tempo_config:
datasource_uid: ""
org_id: ""
url: ""
use_grpc: true
whitelist_istio_system: ["jaeger-query", "istio-ingressgateway"]

Expand Down
18 changes: 9 additions & 9 deletions roles/default/kiali-deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,19 @@
{% set kv = kv | combine({'external_services': {'istio': {'root_namespace': kv.istio_namespace}}}, recursive=True) %}
{% endif %}

{# Set default Grafana in_cluster_url #}
{% if kv.external_services.grafana.in_cluster_url is not defined %}
{% set kv = kv | combine({'external_services': {'grafana': {'in_cluster_url': 'http://grafana.' + kv.istio_namespace + ':3000'}}}, recursive=True) %}
{# Set default Grafana internal_url #}
{% if kv.external_services.grafana.internal_url is not defined %}
{% set kv = kv | combine({'external_services': {'grafana': {'internal_url': 'http://grafana.' + kv.istio_namespace + ':3000'}}}, recursive=True) %}
{% endif %}

{# Set default Tracing in_cluster_url for grpc consumption #}
{% if kv.external_services.tracing.in_cluster_url == "" and (kv.external_services.tracing.use_grpc is not defined or kv.external_services.tracing.use_grpc|bool == True) %}
{% set kv = kv | combine({'external_services': {'tracing': {'in_cluster_url': 'http://tracing.' + kv.istio_namespace + ':16685/jaeger'}}}, recursive=True) %}
{# Set default Tracing internal_url for grpc consumption #}
{% if kv.external_services.tracing.internal_url == "" and (kv.external_services.tracing.use_grpc is not defined or kv.external_services.tracing.use_grpc|bool == True) %}
{% set kv = kv | combine({'external_services': {'tracing': {'internal_url': 'http://tracing.' + kv.istio_namespace + ':16685/jaeger'}}}, recursive=True) %}
{% endif %}

{# Set default Tracing in_cluster_url for http consumption #}
{% if kv.external_services.tracing.in_cluster_url == "" and kv.external_services.tracing.use_grpc is defined and kv.external_services.tracing.use_grpc|bool == False %}
{% set kv = kv | combine({'external_services': {'tracing': {'in_cluster_url': 'http://tracing.' + kv.istio_namespace + '/jaeger'}}}, recursive=True) %}
{# Set default Tracing internal_url for http consumption #}
{% if kv.external_services.tracing.internal_url == "" and kv.external_services.tracing.use_grpc is defined and kv.external_services.tracing.use_grpc|bool == False %}
{% set kv = kv | combine({'external_services': {'tracing': {'internal_url': 'http://tracing.' + kv.istio_namespace + '/jaeger'}}}, recursive=True) %}
{% endif %}

{# Set default Prometheus URL #}
Expand Down