-
Notifications
You must be signed in to change notification settings - Fork 27
Add common config custom resource #80
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
Merged
phlogistonjohn
merged 11 commits into
samba-in-kubernetes:master
from
phlogistonjohn:jjm-common-config
Jun 25, 2021
Merged
Add common config custom resource #80
phlogistonjohn
merged 11 commits into
samba-in-kubernetes:master
from
phlogistonjohn:jjm-common-config
Jun 25, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0a6c49b to
29c29b9
Compare
This custom resource will act as a template for all smb server/service/etc parameters that fall outside a proper share definition and is not directly related to security configuration but are needed to establish new resources in the cluster. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The 'commonConfig' field of the SmbShare CR will be used to associate a share with an SmbCommonConfig so that the parameters of the common config can be used as a template for properties of the pods, services, etc. that the operator may need to create. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a convenient method for fetching the common config associated with an SmbShare. Signed-off-by: John Mulligan <jmulligan@redhat.com>
As we need to add the SmbCommonConfig to the planner type, the name "Config" for the generated configuration (json) for the instances is a bit insufficient. Call it "ConfigState" as its the current configuration state mapped into the smb containers. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
When constructing a share planner, from which we derive our plans to create/update supporting resources, we will also need the common config associated with the smb share. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Use the common config's network publish field to determine what type of Service we will create - either the default of ClusterIP or LoadBalancer if this share is to be published externally. Signed-off-by: John Mulligan <jmulligan@redhat.com>
29c29b9 to
bd5c04c
Compare
Add a test case that sets up a share referencing a common config that sets network/publish=external. This performs the standard checks for share (regression) as well as adding a check that the service is created with a type=LoadBalancer. Signed-off-by: John Mulligan <jmulligan@redhat.com>
bd5c04c to
c3ba7da
Compare
raghavendra-talur
approved these changes
Jun 25, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As documented via PR #66 we need a place for configuration of resources beyond our security config and outside of what SmbShare should specify. This PR adds the SmbCommonConfig as a third, and very very hopefully final, custom resource.
Today, the common config resource only helps decide if the share should be set up with loadbalancer services for clients external to the cluster. However, it may soon grow other parameters for more general configuration common across many service groups.