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

CP-21656: Dynamically Populate Service Endpoints #29

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Conversation

bdrennz
Copy link
Contributor

@bdrennz bdrennz commented Sep 9, 2024

This PR modifies the generate command so that it populates the kube_state_metrics_service_endpoint and prometheus_node_exporter_service_endpoint using the work done in #27, to find all services within a cluster.

(system) ➜  cloudzero-agent-validator git:(cp-21656) ✗ ./bin/cloudzero-agent-validator config generate --kubeconfig /tmp/bdren.kubeconfig --account 123 --cluster test --region us-east-1 --kubeconfig /tmp/bdren.kubeconfig                                                      <region:us-east-1>(⎈|arn:aws:eks:us-east-1:975482786146:cluster/bdren:default)
versions:
  chart_version: 0.0.26
  agent_version: latest

logging:
  level: info
  location: ./cloudzero-agent-validator.log

deployment:
  account_id:  123
  cluster_name:  test
  region:  us-east-1

cloudzero:
  host:  https://api.cloudzero.com
  credentials_file: /etc/config/prometheus/secrets/value

prometheus:
  kube_state_metrics_service_endpoint:  http://cz-prom-agent-kube-state-metrics.default.svc.cluster.local:8080
  prometheus_node_exporter_service_endpoint:  http://cz-prom-agent-prometheus-node-exporter.default.svc.cluster.local:9100
  configurations:
    - /etc/config/prometheus/configmaps/prometheus.yml

diagnostics:
  stages:
    - name: pre-start
      enforce: true
      checks:
        - egress_reachable
        - api_key_valid
    - name: post-start
      enforce: false
      checks:
        - k8s_version
        - kube_state_metrics_reachable
        - node_exporter_reachable
        - scrape_cfg
    - name: pre-stop
      enforce: false
      checks:

@bdrennz bdrennz marked this pull request as ready for review September 9, 2024 21:27
@bdrennz bdrennz requested a review from a team as a code owner September 9, 2024 21:27
@@ -75,21 +87,6 @@ func NewCommand(ctx context.Context) *cli.Command {
return nil
},
},
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command was initially to prove out that we can list the services installed on a Cluster. Now that this functionality has moved into the generate command, I opted to remove it.

Copy link
Collaborator

@josephbarnett josephbarnett Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we still want this as a hidden command? I think there is a flag for that. It might be a useful - non-destructive test we could have hidden

Copy link
Collaborator

@josephbarnett josephbarnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚀

@bdrennz bdrennz merged commit b2304d9 into develop Sep 11, 2024
6 checks passed
@bdrennz bdrennz deleted the cp-21656 branch September 11, 2024 14:37
evan-cz pushed a commit that referenced this pull request Jan 13, 2025
…ols/v3-3.5.1

Bump gotest.tools/v3 from 3.0.3 to 3.5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants