BetterCorp / cloudflarewarp

MIT License
85 stars 6 forks source link

Unknown plugin when i try to use #20

Closed aevans1987 closed 1 year ago

aevans1987 commented 1 year ago

Traefik: 2.9.6 middleware:

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
    name: real-ip
    namespace: default
spec:
    plugin:
        cloudflarewarp:
            disableDefault: "false"
            trustip:
              - 10.0.0.0/8

values:

experimental:
  plugins:
    enabled: true
    cloudflarewarp:
      moduleName: "github.com/BetterCorp/cloudflarewarp"
      version: "v1.3.3"

Ingress:

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: who
  namespace: default
  annotations: 
    kubernetes.io/ingress.class: traefik-external
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`sub.domain.tld`)
      kind: Rule
      services:
        - name: who
          port: 80
      middlewares:
        - name: default-headers
        - name: real-ip
  tls:
    secretName: domain-tld-tls

Log:

time="2023-01-09T01:50:35Z" level=error msg="plugin: unknown plugin type: cloudflarewarp" entryPointName=websecure routerName=default-who-7bcab5b77f5e83b14a72@kubernetescrd

From Dashboard:

plugin: unknown plugin type: cloudflarewarp

I am really lost on this one, any help would be appreciated.

ahgraber commented 1 year ago

I experienced this as well (using Traefik helm chart on kubernetes); I think the Helm chart doesn't install under experimental.plugins and you have to add as a cli arg in additionalArguments I installed the plugin using the global args since it did not seem to install when I added under

values.yaml

values:
  # ...
  experimental:
    v3:
      enabled: false
    plugins:
      enabled: true
  additionalArguments:
    # ...
    ## add plugins
    - "--experimental.plugins.cloudflarewarp.modulename=github.com/BetterCorp/cloudflarewarp"
    - "--experimental.plugins.cloudflarewarp.version=v1.3.3"
aevans1987 commented 1 year ago

I managed to figure out what my issue was. I wasn't looking far enough up in the logs. I was getting an RO file system error. I assigned a pvc and was able to deploy using the config i offered originally.