Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-7031

Allow injection of custom policies (apicast operator)

    XMLWordPrintable

Details

    Description

      The apicast operator allows injection of custom policies

      Proposed design:

      1) The content of the custom policy lives in a secret pre-created by the user and referenced in the CR

      apiVersion: apps.3scale.net/v1alpha1
      kind: APIcast
      metadata:
        name: example-apicast
      spec:
        adminPortalCredentialsRef:
          name: asecretname
        customPolicies:
          - name: custom-policy1
            version: "0.1"
            secretRef: 
                name: custom-policy1-secret
          - name: custom-policy2
            version: "0.1"
            secretRef: 
                name: custom-policy2-secret
      

      Content of the secret:

      apiVersion: v1
      data:
        apicast-policy.json:   CONTENT OF THE POLICY METADATA (required)
        init.lua: CODE OF THE POLICY (required)
        example.lua: CODE OF THE POLICY (optional)
        other.lua: CODE OF THE POLICY (optional)
      kind: Secret
      type: Opaque
      

      For more info about custom policies: https://github.com/3scale/APIcast/blob/master/doc/policies.md#write-your-own-policy

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              eguzki Eguzki Astiz Lezaun
              Eguzki Astiz Lezaun Eguzki Astiz Lezaun
              David Rajnoha David Rajnoha
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: