Skip to content

Conversation

@ankedia
Copy link
Member

@ankedia ankedia commented Jul 14, 2021

OFSS domain has 1 domain with multiple clusters each having 2 replicas. There are init containers defined in each cluster. When the introspectVersion is changed with no other changes, the second pod gets rolled. This is caused because the init container env variables point to the same underlying data structures (and not deep copies). However, we set different values for some variables such as SERVER_NAME and SERVICE_NAME. This causes the server name env variable of the init container for the second server to have an incorrect value of the first server name. This change creates a copy of the init container env variables list so they don't get overwritten when value changes for other pods. Integration test results at - https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/5658/

@ankedia ankedia requested review from doxiao and rjeberhard July 14, 2021 17:05
Copy link
Member

@doxiao doxiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me, although I hoped that we could have a better deep copy mechanism.

@ankedia ankedia marked this pull request as ready for review July 16, 2021 13:58
}
}

private V1Container createWithEnvCopy(V1Container c) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm nervous about this as it will be difficult to remember to keep this in sync if later versions of K8s add more fields to V1Container. Can you use new V1ContainerBuilder(V1Container)? We should probably update the copy of V1EnvVar too.

Copy link
Member Author

@ankedia ankedia Jul 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to use V1ContainerBuilder(V1Container) and V1EnvVarBuild(V1EnvVar) in c1cda3c. Please let me know if I missed something. Thanks.

@rjeberhard rjeberhard merged commit 0bff2af into main Jul 16, 2021
@ankedia ankedia deleted the owls_90857 branch July 16, 2021 21:59
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

Successfully merging this pull request may close these issues.

3 participants