-
Notifications
You must be signed in to change notification settings - Fork 323
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
Add telemetryCollector.cloud.resourceId
field that works even when global.cloud.enabled
is false
#3219
Conversation
@@ -165,28 +166,46 @@ spec: | |||
# These are mounted as secrets so that the telemetry-collector can use them when cloud is enabled. | |||
# - the hcp-go-sdk in consul agent will already look for HCP_CLIENT_ID, HCP_CLIENT_SECRET, HCP_AUTH_URL, | |||
# HCP_SCADA_ADDRESS, and HCP_API_HOST. so nothing more needs to be done. | |||
# - HCP_RESOURCE_ID is created for use in the global cloud section but we will share it here | |||
# - HCP_RESOURCE_ID is created either in the global cloud section or in telemetryCollector.cloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bit of re-organizing to match Values.yaml ordering
- resource-id
- client-id
- client-secret
--set 'telemetryCollector.clientSecret.secretKey=client-secret-id-key' \ | ||
--set 'global.resourceId.secretName=resource-id-name' \ | ||
--set 'global.resourceId.secretKey=resource-id-key' \ | ||
--set 'telemetryCollector.cloud.clientSecret.secretName=client-secret-id-name' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whole lot of these kinds of bugs in the tests, missing .cloud
in the secret setting
# If global.cloud.resourceId is set, this should either be unset (defaulting to global.cloud.resourceId) or be the same as global.cloud.resourceId. | ||
# | ||
# @default: global.cloud.resourceId | ||
resourceId: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the new bit: adding telemetryCollector.cloud.resourceId
telemetryCollector.cloud.resourceId
field that works even when global.cloud.enabled
is false
@@ -689,8 +690,7 @@ global: | |||
# @type: string | |||
secretKey: null | |||
|
|||
# The name of the Kubernetes secret that holds the HCP cloud client id. | |||
# This is optional when global.cloud.enabled is true. | |||
# The hostname of HCP's API. This setting is used for internal testing and validation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
@@ -699,8 +699,7 @@ global: | |||
# @type: string | |||
secretKey: null | |||
|
|||
# The name of the Kubernetes secret that holds the HCP cloud authorization url. | |||
# This is optional when global.cloud.enabled is true. | |||
# The URL of HCP's auth API. This setting is used for internal testing and validation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
@@ -709,8 +708,7 @@ global: | |||
# @type: string | |||
secretKey: null | |||
|
|||
# The name of the Kubernetes secret that holds the HCP cloud scada address. | |||
# This is optional when global.cloud.enabled is true. | |||
# The address of HCP's scada service. This setting is used for internal testing and validation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
@@ -3491,7 +3488,7 @@ telemetryCollector: | |||
customExporterConfig: null | |||
|
|||
service: | |||
# This value defines additional annotations for the server service account. This should be formatted as a multi-line | |||
# This value defines additional annotations for the telemetry-collector's service account. This should be formatted as a multi-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
@@ -3538,9 +3575,9 @@ telemetryCollector: | |||
# @type: string | |||
priorityClassName: "" | |||
|
|||
# A list of extra environment variables to set within the stateful set. | |||
# A list of extra environment variables to set within the deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for filling in all of values.yaml. That will help a bunch with the website.
…`global.cloud.enabled` is false (#3219)
…`global.cloud.enabled` is false (#3219)
…`global.cloud.enabled` is false (#3219)
…`global.cloud.enabled` is false (#3219)
Changes proposed in this PR:
@eddie-rowe reported that he was unable to deploy the Consul Telemetry Collector when
global.cloud.enabled
was false. This should be possible, but right now the telemetry-collector deployment pulls its resourceId out ofglobal.cloud.resourceId
, which may not be set even when a user is trying to use the collector.For example, a user may link their cluster to HCP using
externalServers
, whileglobal.cloud
is empty (because there are no servers in the deployment), but then thetelemetryCollector
will fail to deploy for lack ofglobal.cloud.resourceId
The change here is to add a new field,
telemetryCollector.cloud.resourceId
that's settable. If set, it's used in the consul-telemetry-collector deploymentJIRA: https://hashicorp.atlassian.net/browse/CC-6866
Time willing, in a follow up PR I'll add something to the
-preset cloud
to parse anHCP_RESOURCE_ID
env var into aglobal.cloud.resourceId
like we do already for client id and secret:consul-k8s/cli/preset/preset.go
Line 16 in fc70b03
How I've tested this PR:
How I expect reviewers to test this PR:
Checklist: