Skip to content

Consolidate EPP and sidecar TLS flag parsing #2783

Description

@andresllh

What would you like to be added:

Consolidate TLS version and cipher suite parsing for the EPP server and pd-sidecar onto the existing helpers in k8s.io/component-base/cli/flag:

  • flag.TLSVersion()
  • flag.TLSCipherSuites()

Remove the duplicated tlsVersions, parseTLSVersion, and parseCipherSuites implementations from pkg/epp/server/options.go and pkg/sidecar/proxy/options.go, while retaining coverage for valid and invalid CLI values in both components.

Confirm whether the Kubernetes helpers' stricter handling of whitespace and empty cipher names is acceptable for sidecar YAML configuration, and document or test that behavior as appropriate.

Why is this needed:

PR #2676 adds TLS security profile flags to the pd-sidecar by following the existing EPP implementation. Both components would otherwise maintain equivalent TLS name-to-ID parsing even though k8s.io/component-base is already a direct dependency and provides these helpers.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions