Skip to content

Conversation

@phlogistonjohn
Copy link
Collaborator

First, the patches define & name a Server Group concept, implied as part of the Phase 1 design doc. This is the name of smb server (or group of servers) hosting the share defined by a SmbShare resource.
Then this name is used to properly label and create kubernetes Services to expose port 445 for the instance.
A new test case, using the k8s internal dns name for the service is added.

@phlogistonjohn
Copy link
Collaborator Author

NOTE: This PR is a draft because it requires the work in PR #50 - as it currently stands the new tests are tested against the "latest" tag of the quay.io repo - not the changes in this PR!
Until that PR is merged this PR will always fail.

Copy link
Collaborator

@raghavendra-talur raghavendra-talur left a comment

Choose a reason for hiding this comment

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

Except for one small change, everything else looks very good!

The ServerGroup determines the name of the server (or group of servers)
actually hosting the share. Today it is a 1:1 relationship but may not
always be so. Add this operator determined value to the status of the
SmbShare resource.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Previously, we were just using the name of the SmbShare. Now we use
the derived (but often the same value) server group name.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
The share label is either meaningless or worse, misleading. Remove it
from the set of labels the operator applies to the deployment.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Allow the operator to configure services that go along with a share.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a function to support creating a service that can be used to access
the pod and port 455 hosting an smb share.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
After creating the deployment, create a service that exposes port 445
and matches the label specific to the share's server group.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Use the in-cluster dns to access a share by the name of the service
that gets created by the operator.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
@phlogistonjohn phlogistonjohn marked this pull request as ready for review April 30, 2021 15:31
@phlogistonjohn
Copy link
Collaborator Author

@raghavendra-talur or @obnoxxx PTAL. We'll need this as a starting point for future work.

@phlogistonjohn phlogistonjohn enabled auto-merge (rebase) May 11, 2021 18:12
@phlogistonjohn phlogistonjohn merged commit 5f3a16a into samba-in-kubernetes:master May 11, 2021
@phlogistonjohn phlogistonjohn deleted the jjm-servers-services branch May 12, 2021 13:48
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.

2 participants