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

pod security group implementation #2784

Open
2 tasks
Ardiea opened this issue Nov 8, 2024 · 0 comments
Open
2 tasks

pod security group implementation #2784

Ardiea opened this issue Nov 8, 2024 · 0 comments
Assignees

Comments

@Ardiea
Copy link
Member

Ardiea commented Nov 8, 2024

Description/Context

There is already a branch : https://github.com/mitodl/ol-infrastructure/compare/md/psg_impl?expand=1

Typically I get

      File "/Users/michaeldavidson/Library/Caches/pypoetry/virtualenvs/ol-infrastructure-PBwU_EEw-py3.12/lib/python3.12/site-packages/pulumi/output.py", line 374, in __iter__
        raise TypeError(
    TypeError: 'Output' object is not iterable, consider iterating the underlying value inside an 'apply'

The Output.all got me closer?

open_metadata_database_pod_security_group_config = Output.all(k8s_pod_subnet_cidrs).apply(lambda cidrs: OLEKSPodSecurityGroupConfig(
    pydantic_core._pydantic_core.ValidationError: 2 validation errors for OLEKSPodSecurityGroupConfig
    cluster_cidrs.list[str].0
      Input should be a valid string [type=string_type, input_value=['172.23.128.0/21', '172..../21', '172.23.152.0/21'], input_type=list]
        For further information visit https://errors.pydantic.dev/2.9/v/string_type
    cluster_cidrs.list[is-instance[Output]].0
      Input should be an instance of Output [type=is_instance_of, input_value=['172.23.128.0/21', '172..../21', '172.23.152.0/21'], input_type=list

        For further information visit https://errors.pydantic.dev/2.9/v/is_instance_of
Which made me think that cidrs was a list of rendered outputs which tracks with examples of Output.all() that I find so dereference with cidrs[0]  and I get the same ‘not iternable’ message

Outstanding issues:

  • Testing + Verification
  • Unpacking cluster_cidrs inside the component resource and creating ingress rules from them. Pulumi async issue.

Plan/Design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant