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

Ch 08 - readonly not working as expected #18

Open
czmoku opened this issue Jul 25, 2021 · 2 comments
Open

Ch 08 - readonly not working as expected #18

czmoku opened this issue Jul 25, 2021 · 2 comments

Comments

@czmoku
Copy link

czmoku commented Jul 25, 2021

I'm facing with issue with setting "ReadOnly" for "todo-list" application. I'm not dotnet expert but i check the configuration file and setting "Database__ReadOnly" is set correctly, but when i apply the "todo-web-readonly.yaml" for minikube, application do not switch into "readonly" mode.

Here is output of printenv from inside container

KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_SERVICE_PORT=443
Database__ReadOnly=true
HOSTNAME=todo-web-8f6fc55f8-9xl4l
ASPNETCORE_ENVIRONMENT=Test
TODO_WEB_SERVICE_HOST=10.111.61.140
TODO_WEB_PORT_8081_TCP_ADDR=10.111.61.140
Logging__LogLevel__Default=Error
ASPNETCORE_URLS=http://+:80
PWD=/app
HOME=/root
KUBERNETES_PORT_443_TCP=tcp://10.96.0.1:443
TODO_WEB_PORT_8081_TCP=tcp://10.111.61.140:8081
TODO_WEB_SERVICE_PORT=8081
TERM=xterm
USER=root
ConfigController__Enabled=false
SHLVL=1
KUBERNETES_PORT_443_TCP_PROTO=tcp
DOTNET_RUNNING_IN_CONTAINER=true
KUBERNETES_PORT_443_TCP_ADDR=10.96.0.1
ConnectionStrings__ToDoDb=Filename=/data/todo-list.db
KUBERNETES_SERVICE_HOST=10.96.0.1
KUBERNETES_PORT=tcp://10.96.0.1:443
KUBERNETES_PORT_443_TCP_PORT=443
TODO_WEB_PORT=tcp://10.111.61.140:8081
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
TODO_WEB_PORT_8081_TCP_PORT=8081
TODO_WEB_PORT_8081_TCP_PROTO=tcp
DATA_DIRECTORY=/data
_=/usr/bin/printenv
@undertheflag
Copy link

I am working on intel Mac, same issue occurred.

@undertheflag
Copy link

undertheflag commented Jul 2, 2022

I solved the problem , just add one line code adding:
image
Also delete Dockerfile env:
image
Then locally build the image by yourself.
@czmoku

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants