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: fix error when containerPort misses protocol #32

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions modules/generated/v1.19.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.20.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.21.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.22.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.23.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.24.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.25.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.26.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
13 changes: 10 additions & 3 deletions modules/generated/v1.27.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ let
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
# set key to default value if unset.
let
value' =
if (!(value ? key) && key == "protocol")
then value // { protocol = "TCP"; }
else value;
in
if isAttrs value'.${key}
then toString value'.${key}.content
else (toString value'.${key})
)
listMergeKeys))
)
Expand Down
11 changes: 8 additions & 3 deletions pkgs/generators/k8s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,14 @@ with lib; let
else
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map (key:
if isAttrs value.''${key}
then toString value.''${key}.content
else (toString value.''${key})
# set key to default value if unset.
let
value' = if (!(value ? key) && key == "protocol")
then value // {protocol = "TCP";}
else value;
in if isAttrs value'.''${key}
then toString value'.''${key}.content
else (toString value'.''${key})
) listMergeKeys))
) (value // { _priority = i; }))
values);
Expand Down