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

Cannot change tcp liveness probes with pod overrides #747

Open
razvan opened this issue Mar 7, 2024 · 0 comments
Open

Cannot change tcp liveness probes with pod overrides #747

razvan opened this issue Mar 7, 2024 · 0 comments
Labels

Comments

@razvan
Copy link
Member

razvan commented Mar 7, 2024

Affected version

0.0.0-dev

Current and expected behavior

  1. When using an integer as as port property:
....
      automatic-log-config:
        podOverrides:
          spec:
            containers:
              - name: airflow
                livenessProbe:
                  tcpSocket:
                    port: 8080
                  initialDelaySeconds: 30
                  periodSeconds: 5
                  failureThreshold: 6

An error is raised complaining that the property must be a string:

    case.go:366: AirflowCluster.airflow.stackable.tech "airflow" is invalid: [spec.webservers.roleGroups.automatic-log-config.podOverrides.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: "integer": spec.webservers.roleGroups.automatic-log-config.podOverrides.spec.containers[0].livenessProbe.tcpSocket.port in body must be of type string: "integer", spec.webservers.roleGroups.custom-log-config.podOverrides.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: "integer": spec.webservers.roleGroups.custom-log-config.podOverrides.spec.containers[0].livenessProbe.tcpSocket.port in body must be of type string: "integer"]
  1. When using a string as the tcpSocket.port property, the value must contain the name of the port and not the port number. So "http" and not "8080"

Possible solution

Maybe use k8s-openapi 0.21.1 to pull in Arnavion/k8s-openapi#153

Additional context

It is apparently a known bug: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#intorstring

Environment

No response

Would you like to work on fixing this bug?

maybe

@razvan razvan added the type/bug label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant