Giter Club home page Giter Club logo

Comments (6)

arvindsv avatar arvindsv commented on June 16, 2024

@sheroy Regarding this question: I know that we can specify a pod yaml instead of the settings in the EA profile. Does that allow changing environment? Maybe it's a question to @Evesy as well. Feels like it should.

from gocd.

arvindsv avatar arvindsv commented on June 16, 2024

Reading this, I thought that it is related to k8s namespaces/labels. But, I see it’s about GoCD environments. Then, it's a question about authorization at an EA profile level. Has nothing to do with this elastic agent, as such. Sorry.

This is not possible right now, but I see your point.

from gocd.

varshavaradarajan avatar varshavaradarajan commented on June 16, 2024

Can't GO_EA_AUTO_REGISTER_ENVIRONMENT be used? Currently, this env var is set to the environment that the pipeline belongs to at the time of agent creation. What if GO_EA_AUTO_REGISTER_ENVIRONMENT is set to one specific environment in the profile setting? Then, at the time of agent creation, the environment the agent belongs to is fixed. Instead of GO_EA_AUTO_REGISTER_ENVIRONMENT being set to different environments every time a new agent is created with the profile. Is that a possible workaround until authorization on elastic profiles is implemented? Unless used properly, this could mean that the plugin brings up a new agent not in the same env as the pipeline and so, jobs might not get assigned but agents created. I haven't tried it though. So, not sure if it will even work, just a suggestion.

from gocd.

arvindsv avatar arvindsv commented on June 16, 2024

@varshavaradarajan I guess you're saying, allow this to be parameterized.

As a workaround, it might work, but yes, any job assigned to the wrong profile will not be assigned, but agents created. Not the most ideal experience, but should work.

from gocd.

varshavaradarajan avatar varshavaradarajan commented on June 16, 2024

@varshavaradarajan I guess you're saying, allow this to be parameterized.

Not parameterized, (don't know what you mean by it, but I took it to mean #{ugh} by it). If you look at the elastic profile edit page for the k8s elastic agent - https://build.gocd.org/go/admin/elastic_profiles, there's a section called Environment Variables. Set GO_EA_AUTO_REGISTER_ENVIRONMENT=a fixed environment name (since @Evesy knows which environment the profile should be used in). Works?

from gocd.

arvindsv avatar arvindsv commented on June 16, 2024

By parameterized, I meant "provide the ability to set it".

If you look at the elastic profile edit page for the k8s elastic agent - https://build.gocd.org/go/admin/elastic_profiles, there's a section called Environment Variables. Set GO_EA_AUTO_REGISTER_ENVIRONMENT=a fixed environment name (since @Evesy knows which environment the profile should be used in)

That depends on the order of the environment variables set, I guess. Also, since an agent will be brought up in the other environment, some other job in a pipeline in that environment can be picked up by the agent, etc. It might work as a workaround, but as a very hacky one. :) It's clever, though. But, I don't know if it will work.

It'll also not be clear why the jobs are not being picked up. I wouldn't recommend doing that.

from gocd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.