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

Refactor EKS #317

Merged
merged 1 commit into from
Jun 10, 2018
Merged

Refactor EKS #317

merged 1 commit into from
Jun 10, 2018

Conversation

naumvd95
Copy link
Contributor

@naumvd95 naumvd95 commented Jun 7, 2018

  • Template structure defined
  • Kubeconfig download fixed
  • Cluster states fixed
  • Engine status fixed
  • Provision/Deprovision processes fixed
  • TODO added

current issue related with kqueen-k8s-api methods:

api_1           | Traceback (most recent call last):
api_1           |   File "/code/kqueen/models.py", line 124, in status
api_1           |     'addons': kubernetes.list_services(filter_addons=True),
api_1           |   File "/code/kqueen/kubeapi.py", line 238, in list_services
api_1           |     include_uninitialized=include_uninitialized
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/core_v1_api.py", line 14358, in list_service_for_all_namespaces
api_1           |     (data) = self.list_service_for_all_namespaces_with_http_info(**kwargs)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/core_v1_api.py", line 14455, in list_service_for_all_namespaces_with_http_info
api_1           |     collection_formats=collection_formats)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 321, in call_api
api_1           |     _return_http_data_only, collection_formats, _preload_content, _request_timeout)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 155, in __call_api
api_1           |     _request_timeout=_request_timeout)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 342, in request
api_1           |     headers=headers)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 231, in GET
api_1           |     query_params=query_params)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 222, in request
api_1           |     raise ApiException(http_resp=r)
api_1           | kubernetes.client.rest.ApiException: (403)

faced when try to parse k8s config body

@naumvd95
Copy link
Contributor Author

naumvd95 commented Jun 8, 2018

seems its related to security policies, coz

api_1           | HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services is forbidden: User \"system:anonymous\" cannot list services at the cluster scope","reason":"Forbidden","details":{"kind":"services"},"code":403}
api_1           |

@naumvd95
Copy link
Contributor Author

naumvd95 commented Jun 8, 2018

Seems its related to istio/istio#5327

@katyafervent
Copy link
Contributor

Please, remove traceback from the commit message, looks huge in a git history

# Cluster settings
self.role_arn = kwargs['role_arn']
subnets = kwargs['subnet_id']
self.subnet_id = subnets.split(',')
Copy link
Contributor

Choose a reason for hiding this comment

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

add strip() also

subnets = kwargs['subnet_id']
self.subnet_id = subnets.split(',')
security_groups = kwargs.get('security_group_id', '')
self.security_group_id = security_groups.split(',')
Copy link
Contributor

Choose a reason for hiding this comment

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

add strip() also

aws_secret_key = kwargs.get('aws_secret_key', '')
aws_access_key = kwargs['aws_access_key']
aws_secret_key = kwargs['aws_secret_key']
aws_region = kwargs['aws_region']
except Exception:
Copy link
Contributor

Choose a reason for hiding this comment

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

We expected KeyError here, I think we should except that type of exception and do not log it, just log message, that credentials are missed

- Template structure defined
- Kubeconfig download fixed
- Cluster states fixed
- Engine status fixed
- TODO added

current issue related with kqueen-k8s-api methods:
```
api_1           | Traceback (most recent call last):
api_1           |   File "/code/kqueen/models.py", line 124, in status
api_1           |     'addons': kubernetes.list_services(filter_addons=True),
api_1           |   File "/code/kqueen/kubeapi.py", line 238, in list_services
api_1           |     include_uninitialized=include_uninitialized
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/core_v1_api.py", line 14358, in list_service_for_all_namespaces
api_1           |     (data) = self.list_service_for_all_namespaces_with_http_info(**kwargs)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/core_v1_api.py", line 14455, in list_service_for_all_namespaces_with_http_info
api_1           |     collection_formats=collection_formats)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 321, in call_api
api_1           |     _return_http_data_only, collection_formats, _preload_content, _request_timeout)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 155, in __call_api
api_1           |     _request_timeout=_request_timeout)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 342, in request
api_1           |     headers=headers)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 231, in GET
api_1           |     query_params=query_params)
api_1           |   File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 222, in request
api_1           |     raise ApiException(http_resp=r)
api_1           | kubernetes.client.rest.ApiException: (403)
```
faced when try to parse k8s config body
@naumvd95 naumvd95 merged commit 391f91c into aws-eks Jun 10, 2018
@ekhomyakova ekhomyakova deleted the eks-refactor branch June 26, 2018 09:54
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