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

Do not hardcode agent namespace #136

Open
Temikus opened this issue Aug 1, 2022 · 5 comments
Open

Do not hardcode agent namespace #136

Temikus opened this issue Aug 1, 2022 · 5 comments

Comments

@Temikus
Copy link

Temikus commented Aug 1, 2022

Agent expects the namespace to be castai-agent - otherwise we get:

E0801 03:04:48.260087       1 leaderelection.go:334] error initially creating leader election record: namespaces "castai-agent" not found
E0801 03:04:51.692050       1 leaderelection.go:334] error initially creating leader election record: namespaces "castai-agent" not found
E0801 03:04:55.826509       1 leaderelection.go:334] error initially creating leader election record: namespaces "castai-agent" not found
E0801 03:04:58.587909       1 leaderelection.go:334] error initially creating leader election record: namespaces "castai-agent" not found
E0801 03:05:01.360483       1 leaderelection.go:334] error initially creating leader election record: namespaces "castai-agent" not found
E0801 03:05:05.235647       1 leaderelection.go:334] error initially creating leader election record: namespaces "castai-agent" not found
@alusvedejs
Copy link

right. stumbled on this yesterday.
Please take the value from .Values.namespace which can be overriden.

@anjmao
Copy link
Contributor

anjmao commented Nov 7, 2022

Hi @Temikus and @alusvedejs
Thanks for feedback. I understand that according to helm best practices user should be able to use any namespace.
The issue is that we currently rely on this namespace naming which is something we need to fix. In our terraform modules we do not expose namespace and use castai-agent.

Could you also describe what is the use case for you to set custom namespace for CASTAI components? Thanks.

@Temikus
Copy link
Author

Temikus commented Nov 9, 2022

@anjmao I'm no longer working in that company sadly, but the original issue was the surprising failures when deploying the chart through Helmfile as we always set a namespace there.

More broadly - the user-story around namespace names is specific naming conventions used in different places.

Hope that helps!

@roee-landesman
Copy link

Hey folks - want to drop a note and say that this is blocking for us. We use a prefix schema on all namespaces that have 3rd party provider software and can't install castai-agent until it can use a custom namespace!

@roee-landesman
Copy link

For future readers, I got on a call with cast.ai customer success and they helped point me towards the LEADER_ELECTION_NAMESPACE environment variable for switching operator namespaces. I use terraform for applying the helm chart, which ends up looking like this:

  values = [
    <<-EOF
    createNamespace: false
    provider: eks
    apiKey: <SECRET>
    additionalEnv:
      LEADER_ELECTION_NAMESPACE: <YOUR_NAMESPACE>
    EOF
  ]

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

No branches or pull requests

4 participants