Skip to content

How to reference Kubernetes secrets in WasmPlugins? #84

@PavelPikat

Description

@PavelPikat

I am new to Istio and Kubernetes

Is there a way to reference Kubernetes secret for the basic-auth plugin instead of hard-coding values in CRD object?

apiVersion: v1
kind: Secret
metadata:
  name: basic-auth-creds
type: Opaque
data:
  user: ok
  password: test
  user_password: "ok:test"
---
apiVersion: extensions.istio.io/v1alpha1
kind: WasmPlugin
metadata:
  name: basic-auth
  namespace: istio-system
spec:
  selector:
    matchLabels:
      istio: ingressgateway
  url: oci://ghcr.io/istio-ecosystem/wasm-extensions/basic_auth:1.12.0
  phase: AUTHN
  pluginConfig:
    basic_auth_rules:
      - prefix: "/productpage"
        request_methods:
          - "GET"
          - "POST"
        credentials:
          - "ok:test"
          - "YWRtaW4zOmFkbWluMw=="

Could you provide an example how to reference the basic-auth-creds secret in pluginConfig?

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