-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Line
kubenix/modules/generated/v1.27.nix
Line 5190 in e4d0365
| type = (types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ContainerPort" "name" [ "containerPort" "protocol" ])); |
protocol key be present in all helm generated Pod specifications. For example the following kubenix resource definition
resources.pods.hello.spec = {
containers = [
{
name = "hello";
image = "hello";
ports = [
{containerPort = 1234;}
];
}
];
};fails with the following error
error: attribute 'protocol' missing
at /nix/store/jznzhivlpsahv83fsvkp866bda50nd23-source/modules/generated/v1.27.nix:82:28:
81| (key:
82| if isAttrs value.${key}
| ^
83| then toString value.${key}.content
It should not fail when protocol is missing from the ports.
There are certainly other similar issues with e.g. EphemeralContainer which need to be addressed as well.
Workaround
Currently I have just deleted the "protocol" from
kubenix/modules/generated/v1.27.nix
Line 5190 in e4d0365
| type = (types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ContainerPort" "name" [ "containerPort" "protocol" ])); |
Backstory
I ran into this issue while trying to deploy prometheus as a Helm chart. After a bit of debugging I noticed that the prometheus chart doesn't specify the port protocol: https://github.com/prometheus-community/helm-charts/blob/d628ebad62f119ef2985319a5f7a1dd5bee1863b/charts/prometheus/templates/deploy.yaml#L157
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels