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

Feature: Support dynamic secret/configmap exports #2555

Closed
matthchr opened this issue Oct 19, 2022 · 4 comments · Fixed by #4398
Closed

Feature: Support dynamic secret/configmap exports #2555

matthchr opened this issue Oct 19, 2022 · 4 comments · Fixed by #4398
Assignees
Milestone

Comments

@matthchr
Copy link
Member

matthchr commented Oct 19, 2022

Sometimes the consuming application wants a value like myredis.redis.cache.windows.net:6380, but the problem is that we export the pieces of that string separately today, like so:

  operatorSpec:
    secrets:
      ...
      hostName:
        name: redis-secret
        key: hostName
      sslPort:
        name: redis-secret
        key: port

There's no way for the application to get the value in the format it needs. Sometimes this can be worked around by the application making a code change, but that only works if the user controls the application. Some applications (such as DAPR which the above example is from) we cannot expect the user to change. We have to support getting them the values they want in a format that makes sense.

We should consider supporting something like formattedSecrets (or formattedValues?), which would be used like so:

  operatorSpec:
    secrets:
      ...
      hostName:
        name: redis-secret
        key: hostName
      sslPort:
        name: redis-secret
        key: port
      formattedValues:
      - name: redis-secret
        key: hostPort
        value: "${hostName}:${sslPort}"

Terraform supports this more generically with format, which is what ARM templates does as well.

@matthchr
Copy link
Member Author

Is there an existing operator we could use to do this instead of doing it ourselves.

@matthchr
Copy link
Member Author

We want to do this still, but need a design

@jonasnorlund
Copy link

jonasnorlund commented Oct 25, 2023

In general we need to have a way to get values from generated resources in a dynamic approach. Let me give one example, if we create a private endpoint then we would like to get the ip address of the newly created resource so we can create a network policy that opens up communication to that ip address in the next step.

@matthchr, this is just an example, is there any roadmap item to support fetching properties from created resources in a dynamic way, not static as it is done today? Similar to Terraform or Bicep output. This becomes important when there are resources that are dependent on each others values.

@matthchr
Copy link
Member Author

matthchr commented Jul 1, 2024

This is going to be our solution to exporting things like connections strings, so closed #3929 in favor in this

matthchr added a commit to matthchr/azure-service-operator that referenced this issue Jul 2, 2024
matthchr added a commit to matthchr/azure-service-operator that referenced this issue Jul 3, 2024
matthchr added a commit to matthchr/azure-service-operator that referenced this issue Jul 10, 2024
matthchr added a commit to matthchr/azure-service-operator that referenced this issue Jul 11, 2024
matthchr added a commit to matthchr/azure-service-operator that referenced this issue Jul 12, 2024
@matthchr matthchr modified the milestones: v2.9.0, v2.10.0 Aug 19, 2024
@theunrepentantgeek theunrepentantgeek modified the milestones: v2.10.0, v2.11.0 Oct 14, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Recently Completed in Azure Service Operator Roadmap Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants