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
Reconcile noobaa pods HTTP* envs based on operator pod HTTP* envs #313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackyalbo merged the pv-pools PR. apply the proxy settings to pv-pools pods too
c8e5c54
to
4f3f131
Compare
"IO_ERRORS": nbv1.BackingStorePhaseInfo{nbv1.BackingStorePhaseRejected, "BackingStorePhaseRejected", "Backing store mode: IO_ERRORS"}, | ||
"STORAGE_NOT_EXIST": nbv1.BackingStorePhaseInfo{nbv1.BackingStorePhaseRejected, "BackingStorePhaseRejected", "Backing store mode: STORAGE_NOT_EXIST"}, | ||
"AUTH_FAILED": nbv1.BackingStorePhaseInfo{nbv1.BackingStorePhaseRejected, "BackingStorePhaseRejected", "Backing store mode: AUTH_FAILED"}, | ||
"INITIALIZING": {nbv1.BackingStorePhaseReady, "BackingStorePhaseReady", "Backing store mode: INITALIZING"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
is that just a formatter thing? if it is, then we must align on the same rules so we won't have irrelevant changes in PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, Ohad please revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new GoFmt is removing unnecessary type declaration. We all use the same GoFmt and it runs automatically on every save
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an update. It's not the GoFmt version. It the gofmt settings. My editor is running gofmt with the simplify code flag while vscode does not (by default). I will try to check if I can disable the simplify behavior to be more consistent but as a rule of thumb I think this behavior can benefit us
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after a second look at the code, I think you should not define the proxy vars ahead of time in the yamls. just test for the envs using LookupEnv
and if they are set then append them to the Env of the different pods
@dannyzaken Why? This is the way we handle all of our env, even the ones that are not used in some circumstances. I see no benefit in doing it the other way around. Declaring them ahead of time give the reader a sense that understanding of what we are going to reconcile. |
@nb-ohad are you sure it behaves the same? these envs are not used by noobaa, you are just propagating them from the operator to other pods. I think that in this case, you should forward them as is |
4af3aeb
to
8ba6427
Compare
@ALL |
8ba6427
to
0441057
Compare
also warn when agent pod PROXY vars does not operator PROXY vars
0441057
to
fffdca9
Compare
When running in a proxied environment the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables control which of a pod's outgoing traffic is directed to a proxy and which not.
When cluster-wide proxy setting is used OLM update the operator's env variables to the proper values. In turn, the operator should set the environment variables on the resources that it is responsible for.
This PR update the operator to read the values of the HTTP* environment variables set on the operator container and set them for the
noobaa-core
statefulset andnobaa-endpoint
deploymentsFixes https://bugzilla.redhat.com/show_bug.cgi?id=1819549
Edit:
We have a gap where changes to the env vars will not be reconciled for pv pool agent pods.
This is because a pod spec cannot be changed and we need takedown the pod and start a new one which we currently do not support with pv pool pods.