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

StackSet cannot be created when RouteGroup contains metadata #278

Closed
amila-ku opened this issue Dec 10, 2020 · 1 comment · Fixed by #279
Closed

StackSet cannot be created when RouteGroup contains metadata #278

amila-ku opened this issue Dec 10, 2020 · 1 comment · Fixed by #279
Assignees
Labels
bug Something isn't working

Comments

@amila-ku
Copy link

amila-ku commented Dec 10, 2020

Stackset creation fails when stackset has a routegroup and the routegroup contains a metadata section. This prevents the use of annotations to set loadbalancer specific configurations

apiVersion: zalando.org/v1
kind: StackSet
metadata:
  name: my-app-amilak
spec:
  # optional Ingress definition.
  routegroup:
    # optional metadata Ingress definition
    metadata:
       annotations:
          zalando.org/aws-load-balancer-ssl-policy: ELBSecurityPolicy-2016-08
    hosts:
    - testnginx.payments-core-test.zalan.do
    backendPort: 80
    routes:
    - pathSubtree: /
      filters:
      - preserveHost("false")
  stackLifecycle:
    scaledownTTLSeconds: 1800 # TTL for when to scale down the pods of a stack that is not getting traffic. (30 min.)
    limit: 1 # maximum number of scaled down stacks to keep.
             # If there are more than `limit` _extra_ (ones without traffic) stacks, the oldest stacks which are scaled
             # down will be deleted.
  stackTemplate:
    spec:
      version: v1 # version of the Stack.
      replicas: 3
      # optional horizontalPodAutoscaler definition (will create an HPA for the stack).
      horizontalPodAutoscaler:
        minReplicas: 3
        maxReplicas: 10
        metrics:
        - type: Resource
          resource:
            name: cpu
            targetAverageUtilization: 50
      # full Pod template.
      podTemplate:
        spec:
          containers:
          - name: nginx
            image: nginx
            ports:
            - containerPort: 80
              name: ingress
            resources:
              limits:
                cpu: 10m
                memory: 50Mi
              requests:
                cpu: 10m
                memory: 50Mi

error message shown:

error: error validating "stackset.yaml": error validating data: ValidationError(StackSet.spec.routegroup): unknown field "metadata" in org.zalando.v1.StackSet.spec.routegroup; if you choose to ignore these errors, turn validation off with --validate=false

I did a quick check in type definition and RouteGroupSpec did not contain EmbeddedObjectMetaWithAnnotations.

@mikkeloscar mikkeloscar added the bug Something isn't working label Dec 10, 2020
@mikkeloscar mikkeloscar self-assigned this Dec 10, 2020
@mikkeloscar
Copy link
Contributor

Thanks for reporting this. Should be fixed with: #279

jonathanbeber pushed a commit that referenced this issue Dec 10, 2020
Make it possible to set annotations on RouteGroups. This is needed for some settings configured via annotations e.g. configuring kube-ingress-aws-controller.

Fix #278

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants