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

fix: added node security group additional rule to allow all traffic i… #359

Open
wants to merge 2 commits into
base: terragrunt
Choose a base branch
from

Conversation

kvvit
Copy link

@kvvit kvvit commented Nov 25, 2024

Added node security group additional rule to allow all traffic inside the group

PR Description

Please explain the changes you made here and link to any relevant issues.

Fixes # (issue)

Type of change

Delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@kvvit kvvit requested a review from mglotov November 25, 2024 09:13
@kvvit kvvit self-assigned this Nov 25, 2024
Copy link

sonarcloud bot commented Nov 25, 2024

@kvvit
Copy link
Author

kvvit commented Nov 25, 2024

@mglotov during the tests I get next error when I deployed k8s-addons:

│ Error: 1 error occurred:
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│ 
│ 
│ 
│   with helm_release.external_secrets[0],
│   on eks-external-secrets.tf line 143, in resource "helm_release" "external_secrets":
│  143: resource "helm_release" "external_secrets" {
│ 
╵
╷
│ Error: 3 errors occurred:
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│ 
│ 
│ 
│   with helm_release.ingress_nginx[0],
│   on eks-ingress-nginx-controller.tf line 202, in resource "helm_release" "ingress_nginx":
│  202: resource "helm_release" "ingress_nginx" {
│ 
╵
╷
│ Error: 4 errors occurred:
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│ 
│ 
│ 
│   with helm_release.loki_stack[0],
│   on eks-loki-stack.tf line 169, in resource "helm_release" "loki_stack":
│  169: resource "helm_release" "loki_stack" {
│ 

I added depends_on for loki and external-secrets and updated helm version for external-secrets . After that I deployed twice and everything was okay.

@@ -154,4 +154,5 @@ resource "helm_release" "external_secrets" {
local.external_secrets_values
]

depends_on = [helm_release.aws_loadbalancer_controller]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Author

Choose a reason for hiding this comment

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

Because during terragrunt apply I get next error:

│ Error: 1 error occurred:
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│ 
│ 
│ 
│   with helm_release.external_secrets[0],
│   on eks-external-secrets.tf line 143, in resource "helm_release" "external_secrets":
│  143: resource "helm_release" "external_secrets" {
│ 
╵
╷
│ Error: 3 errors occurred:
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│ 
│ 
│ 
│   with helm_release.ingress_nginx[0],
│   on eks-ingress-nginx-controller.tf line 202, in resource "helm_release" "ingress_nginx":
│  202: resource "helm_release" "ingress_nginx" {
│ 
╵
╷
│ Error: 4 errors occurred:
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│       * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-controller-webhook-service.aws-load-balancer-controller.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-controller-webhook-service"
│ 
│ 
│ 
│   with helm_release.loki_stack[0],
│   on eks-loki-stack.tf line 169, in resource "helm_release" "loki_stack":
│  169: resource "helm_release" "loki_stack" {
│ 

After added these depends_on error has vanished. I deploy k8s-addons with these depens_on twice, and everything was okay (without errors).

depends_on = [kubectl_manifest.kube_prometheus_stack_operator_crds]
depends_on = [
kubectl_manifest.kube_prometheus_stack_operator_crds,
helm_release.aws_loadbalancer_controller
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Author

Choose a reason for hiding this comment

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

Same answer, as in the comment above.

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