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

change to run rekcurd on EKS #51

Merged
merged 4 commits into from
Dec 18, 2018
Merged

change to run rekcurd on EKS #51

merged 4 commits into from
Dec 18, 2018

Conversation

yuki-mt
Copy link
Member

@yuki-mt yuki-mt commented Dec 14, 2018

What is this PR for?

To be able to add EKS as Kubernetes Host

This PR includes

What type of PR is it?

Feature

What is the issue?

N/A

How should this be tested?

  1. create EKS cluster. ref: add EKS installation document community#16
  2. run docker-compose -f docker-compose/docker-compose.develop.yaml up
  3. try adding EKS Kubernetes Host from dashboard.

if i.metadata.labels.get("drucker-worker", "False") == "True":
application_name = i.metadata.labels["app"]
labels = i.metadata.labels
if labels is not None and labels.get("drucker-worker", "False") == "True":
Copy link
Member Author

Choose a reason for hiding this comment

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

In the new kubernetes-client version, labels can be None, so I check here.

@@ -313,10 +314,11 @@ def update_dbs_kubernetes(kubernetes_id:int, applist:set=None, description:str=N
db.session.flush()
"""Service"""
for i in ret.items:
if i.metadata.labels.get("drucker-worker", "False") == "False":
labels = i.metadata.labels
if labels is None or labels.get("drucker-worker", "False") == "False":
Copy link
Member Author

Choose a reason for hiding this comment

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

ditto

app/Dockerfile Outdated
RUN set -x && \
dist=/usr/local/bin/aws-iam-authenticator && \
curl -o $dist https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/bin/linux/amd64/aws-iam-authenticator && \
chmod +x $dist
Copy link
Member

Choose a reason for hiding this comment

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

Please create another Dockerfile since this configuration is only for AWS env.

@@ -26,6 +26,7 @@ services:
dockerfile: ./app/Dockerfile
volumes:
- ../app:/root/drucker-dashboard
- ~/.aws:/root/.aws
Copy link
Member

Choose a reason for hiding this comment

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

Please add another docker-compose file since this configuration is only for AWS env.

@@ -29,6 +29,7 @@ services:
dockerfile: ./app/Dockerfile
volumes:
- ../app:/root/drucker-dashboard
- ~/.aws:/root/.aws
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@@ -167,7 +167,7 @@ def delete(self, application_id:int, service_id:int):
v1_service = core_vi.delete_namespaced_service(
name="{0}-service".format(sobj.service_name),
namespace=sobj.service_level,
#body=client.V1DeleteOptions() #FIXME add this after v6.0.0
body=client.V1DeleteOptions()
Copy link
Member

Choose a reason for hiding this comment

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

Did you confirm it works fine on Kubernetes 1.9.

Copy link
Member Author

Choose a reason for hiding this comment

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

@keigohtr I confirmed I successfully deployed and deleted a service in Kubernetes 1.9.6 (in minikube)!

@keigohtr
Copy link
Member

Great work again!
Almost LGTM.

@yuki-mt
Copy link
Member Author

yuki-mt commented Dec 17, 2018

@keigohtr I separated AWS-specific Dockerfile and docker-compose YAML files.
Please check it.

README.md Outdated
@@ -25,22 +25,32 @@ https://github.com/drucker/drucker-parent
$ git clone https://github.com/drucker/drucker-dashboard.git drucker-dashboard
```

## Preparation for AWS setting
## Run it!
### For non-AWS users
Copy link
Member

Choose a reason for hiding this comment

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

x For non-AWS users
o General users

Copy link
Member Author

Choose a reason for hiding this comment

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

@keigohtr I fixed it 👍

Copy link
Member

@keigohtr keigohtr left a comment

Choose a reason for hiding this comment

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

LGTM

@yuki-mt yuki-mt merged commit 142523c into master Dec 18, 2018
@yuki-mt yuki-mt deleted the feature/eks branch December 18, 2018 04:07
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