<p>So I have a spring boot app which runs with two replicas. I want to be able to inject whether the app is replica 1 or 2. I want to this as i want my application to run a proccess on startup, however I only want one of the replicas to run the start up proccess</p>

<p>My test.values.yaml.template</p>

<pre><code>spring-boot:

  application:
      spring:
        datasource:
          url: url
          username: username
          password: password
        profiles:
          active: prod, agent
</code></pre>

<p>In general if for any reason you need to make your application replicas distinguishable from each other, then you should use StatefulSet instead of Deployment. Then you can inject the POD name into your container as env variable and use it in your application.</p>
