Add only non-null default pool Security Context values #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
From Cesar,
Issue comes from file github.com/minio/operator/pkg/resources/statefulsets/minio-statefulset.go:424 because we cannot longer support securityContext: {} in our Tenant Specification under pools option as before. I think we are trying to get some values from an empty context:
PR was: minio#1372
We should fix above issue/panic and still support securityContext: {} under pools in Tenant Specification.
Reproduce
Deploy and maintain a kind cluster with tenant-lite. e.g. with
testing/deploy-tenant.sh
in the operator repo.Ensure that the
destroy_kind
command is commented out.Once the tenant pods are online, edit the tenant ensuring the following is under
.spec.pools
, withk -n tenant-lite edit tenants.minio.min.io
:Fix
Test
Clone https://github.com/allanrogerr/operator/tree/fix-security-context-npe
Deploy and maintain a kind cluster with tenant-lite. e.g. with
testing/deploy-tenant.sh
in the operator repo.Ensure that the
destroy_kind
command is commented out.Once the tenant pods are online, edit the tenant ensuring the following is under
.spec.pools
, withk -n tenant-lite edit tenants.minio.min.io
: