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

Allow injection of custom policies (3scale operator)

    XMLWordPrintable

Details

    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Yes
    • 0
    • 0% 0%
    • Undefined

    Description

      The 3scale operator allow injection of custom policies for the managed apicast instances

      Proposed design:

      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: APIManager
      metadata:
        name: example-3scale
      spec:
        wildcardDomain: <wildcardDomain>
        apicast:
          productionSpec:
             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
      

      The same options would be available for the staging apicast

      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
              David Rajnoha David Rajnoha (Inactive)
              Eguzki Astiz Lezaun Eguzki Astiz Lezaun
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: