`acorn run --update`/ `acorn update` does not pick changes made to credentials
sangee2004 opened this issue · 1 comments
sangee2004 commented
acorn version - v0.10.0-rc2-36-g994b4680+994b4680
Steps to reproduce the problem:
Scenario 1:
- Deploy app with credentials -
acorn run -n test1
secrets: config: {
type: "credential.acorn.io/mytestcred"
params: {
promptOrder: ["username", "password"]
}
data: {
username: "xxx"
password: ""
}
}
containers: {
mytest: {
image: "nginx"
env:{
username: "secret://config/username"
password: "secret://config/password"
}
}
}
- Once app is deployed, edit the Acornfile to include a new field for creds and change the default value for existing field.
secrets: config: {
type: "credential.acorn.io/mytestcred"
params: {
promptOrder: ["username", "password", "host"]
}
data: {
username: "xyz"
password: ""
host: "localhost"
}
}
containers: {
mytest: {
image: "nginx"
env:{
username: "secret://config/username"
password: "secret://config/password"
}
}
}
- Update the app -
acorn run --update -n test1
to update the credential definition.
This does not result in prompting the user with new credential definition.
Expected Behavior:
User should be prompted for changing the existing credential associated with the app/create new new credential to be associated with the app.
Scenario 2:
- Deploy app with credentials and a container consuming it -
acorn run --update -n test3
secrets: config: {
type: "credential.acorn.io/mytestcred"
params: {
promptOrder: ["username", "password"]
}
data: {
username: "xxx"
password: ""
}
}
containers: {
mytest: {
image: "nginx"
env:{
username: "secret://config/username"
password: "secret://config/password"
}
}
}
- Update app with following Acornfile that adds a new field to the credential -
acorn run --update -n test3
secrets: config: {
type: "credential.acorn.io/mytestcred"
params: {
promptOrder: ["username", "password", "host"]
}
data: {
username: "xyz"
password: ""
host: "localhost"
}
}
containers: {
mytest: {
image: "nginx"
env:{
username: "secret://config/username"
password: "secret://config/password"
host: "secret://config/host"
}
}
}
- App update fails and gets stuck with error -
CreateContainerConfigError: couldn't find key host in Secret mytest3-acorn-4b7f1628/config
mytest3
STATUS: ENDPOINTS[] HEALTHY[1] UPTODATE[1] pending
STATUS: ENDPOINTS[] HEALTHY[1] UPTODATE[1] (container: mytest): updating; (secret: config): updating
STATUS: ENDPOINTS[] HEALTHY[1] UPTODATE[0/1] (container: mytest): ContainerCreating
STATUS: ENDPOINTS[] HEALTHY[1] UPTODATE[1/2] (container: mytest): ContainerCreating
STATUS: ENDPOINTS[] HEALTHY[1] UPTODATE[1/2] (container: mytest): CreateContainerConfigError: couldn't find key host in Secret mytest3-acorn-4b7f1628/config
^C%
Same error is also seen when attempting acorn update -f <Acornfile> <appname>
cjellick commented
non-blocker for v0.10.0. moving out