Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Not able to bind secrets (that are not associated with app anymore) to another app. #1472

Closed
sangee2004 opened this issue Apr 12, 2023 · 2 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@sangee2004
Copy link
Contributor

Acorn version - v0.6.0-143-g94d09a10+94d09a10

Steps to reproduce the problem:

  1. Deploy an app which has secrets.
args: password: ""

containers: app: {
  image: "nginx"
  env: {
    PASSWORD: "secret://user-password/password"
  }
  ports: publish: "80/http"
  files: {
      "/usr/share/nginx/html/secret.html": "secret://user-password/password"
  }
}

secrets: "user-password": {
  type: "opaque"
  data: password: "\(args.password)"
}
  1. Once app is deployed successfully , delete this app without deleting secrets.

  2. Deploy another app by binding the secrets (relating to the deleted app) . App deployment is in "pending" state with error - [secrets: missing: [mytestsec]] message

containers: {
  nginx1: {
    image: "nginx"
    ports: publish: "80/http"
    files: {
      "/usr/share/nginx/html/secret.html": "secret://user-password/password"
    }
}
}
 % acorn rm mytestsec                                                                  
Removed: mytestsec
% acorn run -n mytestsecbind1 -s mytestsec.user-password:user-password -f AcornfileBind
.....
STATUS: ENDPOINTS[] HEALTHY[0] UPTODATE[0] [secrets: missing: [mytestsec]]
STATUS: ENDPOINTS[http://nginx1-mytestsecbind1-bdbbb2f7.local.on-acorn.io => nginx1:80] HEALTHY[0] UPTODATE[0] [secrets: missing: [mytestsec]]
^C  ✗  ERROR:  terminating watch: context canceled

 % acorn secrets mytestsec.user-password
NAME                      TYPE      KEYS         CREATED
mytestsec.user-password   opaque    [password]   115s ago
sangeethahariharan@Sangeethas-MBP secrets % 
@sangee2004 sangee2004 added the kind/bug Something isn't working label Apr 12, 2023
@sangee2004 sangee2004 added this to the v0.7.0 milestone Apr 12, 2023
@cjellick cjellick modified the milestones: v0.7.0, v0.8.0 Apr 12, 2023
@g-linville g-linville self-assigned this Jul 17, 2023
g-linville added a commit that referenced this issue Jul 21, 2023
@g-linville
Copy link
Contributor

Fix just merged to main.

@sangee2004
Copy link
Contributor Author

Tested with acorn version v0.8.0-alpha7-143-g86de32e8+86de32e8

  1. Deploy an app which has secrets.
  2. Once app is deployed successfully , delete this app without deleting secrets.
  3. Deploy another app by binding the existing secret (which was created as part of app deployment in step1).
    App deployment succeeds and app get access to the existing secret as expected.

cloudnautique pushed a commit to cloudnautique/runtime that referenced this issue Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants