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

additional checks for 2.0: leader-follower, statefulSet, cloud-integration configs #3066

Merged
merged 10 commits into from
Feb 15, 2024

Conversation

jessegoodier
Copy link
Collaborator

@jessegoodier jessegoodier commented Feb 3, 2024

What does this PR change?

Add additional checks for 2.0: leader-follower, statefulSet, cloud-integration configs

Does this PR rely on any other PRs?

No

How does this PR impact users? (This is the kind of thing that goes in release notes!)

Additional 2.0 upgrade checks for users that have leader-follower or statefulSet deployments enabled.
Added cloud-integration check for mutually exclusive methods of providing that configuration.

What risks are associated with merging this PR? What is required to fully test this PR?

None

How was this PR tested?

Helm upgrade with and without the relevant values. Output of those tests below.

helm upgrade kubecost-cloudcost ./cost-analyzer 
Alias tip: hup kubecost-cloudcost ./cost-analyzer
Release "kubecost-cloudcost" has been upgraded. Happy Helming!
NAME: kubecost-cloudcost
LAST DEPLOYED: Thu Feb 15 14:41:33 2024
NAMESPACE: kubecost-cloudcost
STATUS: deployed
REVISION: 63
NOTES:
--------------------------------------------------
Kubecost 2.0.0 has been successfully installed.

Welcome to Kubecost 2.0!

Kubecost 2.0 is a major upgrade from previous versions and includes major new features including a brand new API Backend. Please review the following documentation to ensure a smooth transition: https://docs.kubecost.com/install-and-configure/install/kubecostv2

For the full list of enhancements, please see our release notes: https://github.com/kubecost/cost-analyzer-helm-chart/releases/tag/v2.0.0

When pods are Ready, you can enable port-forwarding with the following command:

    kubectl port-forward --namespace kubecost-cloudcost deployment/kubecost-cloudcost-cost-analyzer 9090

Then, navigate to http://localhost:9090 in a web browser.

Please allow 25 minutes for Kubecost to gather metrics. A progress indicator will appear at the top of the UI.

Having installation issues? View our Troubleshooting Guide at http://docs.kubecost.com/troubleshoot-install

(qa-gcp1/kubecost-cloudcost) ubuntu@aerog in /home/ubuntu/git/cost-analyzer-helm-chart on v2-upgrade-checks
>helm template kubecost cost-analyzer --set kubecostProductConfigs.bigQueryBillingDataDataset=test
Error: execution error at (cost-analyzer/templates/NOTES.txt:6:4): 
Kubecost 2.x requires a change to the method that cloud-provider billing integrations are configured.
Please use this output to create a cloud-integration.json config. See:
<https://docs.kubecost.com/install-and-configure/install/cloud-integration#adding-a-cloud-integration>
for more information

  {
    "gcp":
      {
        [
          {
              "bigQueryBillingDataDataset": "test",
              "bigQueryBillingDataProject": "<no value>",
              "bigQueryBillingDataTable": "<no value>",
              "projectID": "<no value>"
          }
        ]
      }
  }

Use --debug flag to render out invalid YAML

(qa-gcp1/kubecost-cloudcost) ubuntu@aerog in /home/ubuntu/git/cost-analyzer-helm-chart on v2-upgrade-checks
>helm template kubecost cost-analyzer --set kubecostProductConfigs.azureStorageContainer=test     
Error: execution error at (cost-analyzer/templates/NOTES.txt:7:4): 

Kubecost 2.x requires a change to the method that cloud-provider billing integrations are configured.
Please use this output to create a cloud-integration.json config. See:
<https://docs.kubecost.com/install-and-configure/install/cloud-integration#adding-a-cloud-integration>
for more information
  {
    "azure":
      [
        {
            "azureStorageContainer": "test",
            "azureSubscriptionID": "<no value>",
            "azureStorageAccount": "<no value>",
            "azureStorageAccessKey": "<no value>",
            "azureContainerPath": "<no value>",
            "azureCloud": "<no value>"
        }
      ]
  }

Use --debug flag to render out invalid YAML

Have you made an update to documentation? If so, please provide the corresponding PR.

@jessegoodier jessegoodier changed the title check for mutually exclusive values additional checks for 2.0: leader-follower, statefulSet, cloud-integration configs Feb 4, 2024
@jessegoodier jessegoodier marked this pull request as ready for review February 4, 2024 13:22
jessegoodier and others added 4 commits February 6, 2024 09:28
Co-authored-by: Chip Zoller <chipzoller@gmail.com>
Co-authored-by: Chip Zoller <chipzoller@gmail.com>
@chipzoller
Copy link
Collaborator

Conflicts

Copy link

gitguardian bot commented Feb 15, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
7414 Triggered Google API Key 496c294 cost-analyzer/templates/cost-analyzer-deployment-template.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@jessegoodier
Copy link
Collaborator Author

Conflicts
fixed

@jessegoodier
Copy link
Collaborator Author

/cherry-pick v2.0

@jessegoodier
Copy link
Collaborator Author

/cherry-pick v2.1

@jessegoodier jessegoodier enabled auto-merge (squash) February 15, 2024 19:43
@jessegoodier jessegoodier merged commit c5c043c into develop Feb 15, 2024
12 checks passed
@jessegoodier jessegoodier deleted the v2-upgrade-checks branch February 15, 2024 19:51
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Feb 15, 2024
…ation configs (#3066)

* check for mutually exclusive values

* add checks for leaderFollower and statefulSet deployments

* add checks for leaderFollower and statefulSet deployments

* reword checks

* helm 3.13+

Co-authored-by: Chip Zoller <chipzoller@gmail.com>

* spacing

Co-authored-by: Chip Zoller <chipzoller@gmail.com>

* cloud integration checks

* cloud integration checks

---------

Co-authored-by: Chip Zoller <chipzoller@gmail.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Feb 15, 2024
…ation configs (#3066)

* check for mutually exclusive values

* add checks for leaderFollower and statefulSet deployments

* add checks for leaderFollower and statefulSet deployments

* reword checks

* helm 3.13+

Co-authored-by: Chip Zoller <chipzoller@gmail.com>

* spacing

Co-authored-by: Chip Zoller <chipzoller@gmail.com>

* cloud integration checks

* cloud integration checks

---------

Co-authored-by: Chip Zoller <chipzoller@gmail.com>
jessegoodier added a commit that referenced this pull request Feb 15, 2024
…ation configs (#3066) (#3151)

* check for mutually exclusive values

* add checks for leaderFollower and statefulSet deployments

* add checks for leaderFollower and statefulSet deployments

* reword checks

* helm 3.13+



* spacing



* cloud integration checks

* cloud integration checks

---------

Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
Co-authored-by: Chip Zoller <chipzoller@gmail.com>
jessegoodier added a commit that referenced this pull request Feb 15, 2024
…ation configs (#3066) (#3150)

* check for mutually exclusive values

* add checks for leaderFollower and statefulSet deployments

* add checks for leaderFollower and statefulSet deployments

* reword checks

* helm 3.13+



* spacing



* cloud integration checks

* cloud integration checks

---------

Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
Co-authored-by: Chip Zoller <chipzoller@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants