Skip to content
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

Operator support for external name #264

Merged
merged 2 commits into from
Aug 23, 2020

Conversation

kerneltime
Copy link
Contributor

@kerneltime kerneltime commented Aug 22, 2020

Testing:

curl -X POST 2S88LTODNZO5Q6WTCRFY:QlS2QMVx91q4v1bpz3nmFg5Xtb6RdpRtlt58en8+@operator.minio-operator.svc.cluster.local:4222/webhook/v
1/bucketsrv/default/minio?bucket=bucket

creates

ritesh@kerneltop:~$ kubectl get services
NAME            TYPE           CLUSTER-IP       EXTERNAL-IP                       PORT(S)             AGE
bucket          ExternalName   <none>           minio.default.svc.cluster.local   9000/TCP            12s
kubernetes      ClusterIP      10.96.0.1        <none>                            443/TCP             31d
minio           ClusterIP      10.106.87.105    <none>                            9000/TCP            7m59s
minio-console   ClusterIP      10.106.168.60    <none>                            9090/TCP,9443/TCP   6m17s
minio-hl        ClusterIP      None             <none>                            9000/TCP            7m59s
minio-service   ClusterIP      10.111.152.237   <none>                            9000/TCP            25d

Which can be queried

/ # nslookup bucket
Server:		10.96.0.10
Address:	10.96.0.10:53

bucket.default.svc.cluster.local	canonical name = minio.default.svc.cluster.local
Name:	minio.default.svc.cluster.local
Address: 10.106.87.105

I have not yet tested with bucket traffic.

@kerneltime
Copy link
Contributor Author

Tested with latest change.

@harshavardhana
Copy link
Member

While this creates a service, what is the plan on deleting the service upon Delete bucket?

The BucketSrvHandler needs to take another query param like delete=true to invoke delete for the service as well..

@kerneltime
Copy link
Contributor Author

While this creates a service, what is the plan on deleting the service upon Delete bucket?

The BucketSrvHandler needs to take another query param like delete=true to invoke delete for the service as well..

Yup will add it.

Create and delete a k8s external name service for a bucket.

Signed-off-by: Ritesh H Shukla <ritesh@minio.io>
@kerneltime
Copy link
Contributor Author

Tested
create

curl -v -X POST -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjkwMDAwMDAwMDAwMCwiaXNzIjoiM0RMT1hJU0JLSTJU
M0FSQ1UwUU4iLCJzdWIiOiJNSU5JT19BUkdTIn0.wnMkzIzmLpPOsDXtmdx26-Gi46BARpPqAsB7GRB9AKpQ3jRhWh4fnEQv7_ug_2xiBVB1WrfsGFwqjCqS8J0GiQ" operato
r.minio-operator.svc.cluster.local:4222/webhook/v1/bucketsrv/default/minio?bucket=bucket53

delete

curl -v -X POST -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjkwMDAwMDAwMDAwMCwiaXNzIjoiM0RMT1hJU0JLSTJU
M0FSQ1UwUU4iLCJzdWIiOiJNSU5JT19BUkdTIn0.wnMkzIzmLpPOsDXtmdx26-Gi46BARpPqAsB7GRB9AKpQ3jRhWh4fnEQv7_ug_2xiBVB1WrfsGFwqjCqS8J0GiQ" operato
r.minio-operator.svc.cluster.local:4222/webhook/v1/bucketsrv/default/minio?bucket=bucket53\&delete=true

pkg/controller/cluster/main-controller.go Outdated Show resolved Hide resolved
pkg/controller/cluster/main-controller.go Outdated Show resolved Hide resolved
Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

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

LGTM

@harshavardhana harshavardhana merged commit 4500c94 into minio:master Aug 23, 2020
nitisht added a commit to nitisht/minio that referenced this pull request Sep 2, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 2, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 2, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 2, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 2, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 3, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 3, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 4, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 4, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 9, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 9, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
nitisht added a commit to nitisht/minio that referenced this pull request Sep 9, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.
harshavardhana added a commit to minio/minio that referenced this pull request Sep 9, 2020
This PR adds a DNS target that ensures to update an entry
into Kubernetes operator when a bucket is created or deleted.

See minio/operator#264 for details.

Co-authored-by: Harshavardhana <harsha@minio.io>
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.

None yet

3 participants