Install Alauda Container Platform API Refiner

Alauda Container Platform API Refiner is a platform service that filters Kubernetes API response data. It provides filtering capabilities by project, cluster, and namespace, and supports field exclusion, inclusion, and desensitization in API responses.

TOC

Install via console

  1. Navigate to Administrator
  2. In the left navigation bar, click Marketplace > Cluster Plugins
  3. Select the global cluster in the top navigation bar
  4. Search for Alauda Container Platform API Refiner and click to view its details
  5. Click Install to deploy the plugin

Install via YAML

1. Check available versions

Ensure the plugin has been published by checking for ModulePlugin and ModuleConfig resources, in global cluster :

# kubectl get moduleplugins apirefiner
NAME      AGE
apirefiner   4d20h

# kubectl get moduleconfigs -l cpaas.io/module-name=apirefiner
NAME             AGE
apirefiner-v4.0.4   4d21h

This indicates that the ModulePlugin apirefiner exists in the cluster and version v4.0.4 is published.

2. Create a ModuleInfo

Create a ModuleInfo resource to install the plugin without any configuration parameters:

apiVersion: cluster.alauda.io/v1alpha1
kind: ModuleInfo
metadata:
  annotations:
    cpaas.io/display-name: apirefiner
    cpaas.io/module-name: '{"en": "Alauda Container Platform API Refiner", "zh": "Alauda
      Container Platform API Refiner"}'
  labels:
    cpaas.io/cluster-name: global		 		
    cpaas.io/module-name: apirefiner
    cpaas.io/module-type: plugin
    cpaas.io/product: Platform-Center
  name: apirefiner-global					 	
spec:
  version: v4.2.0-default.1.g8f0543e4 				

Field explanations:

  • name: Temporary name for the cluster plugin. The platform will rename it after creation based on the content, in the format <cluster-name>-<hash of content>, e.g., global-ee98c9991ea1464aaa8054bdacbab313.
  • label cpaas.io/cluster-name: API Refiner only can be installed in the global cluster, keep this filed as global.
  • label cpaas.io/module-name: Plugin name, must match the ModulePlugin resource.
  • label cpaas.io/module-type: Fixed field, must be plugin; missing this field causes installation failure.
  • .spec.config: If the corresponding ModuleConfig is empty, this field can be left empty.
  • .spec.version: Specifies the plugin version to install, must match .spec.version in ModuleConfig.

Uninstallation Procedures

  1. Follow steps 1-4 from the installation process to locate the plugin
  2. Click Uninstall to remove the plugin

Default Configuration

Filtered Resources

The following resources are filtered by default:

ResourceAPI Version
namespacesv1
projectsauth.alauda.io/v1
clustermodulescluster.alauda.io/v1alpha2
clustersclusterregistry.k8s.io/v1alpha1

Field Desensitization

By default, the following field is desensitized:

  • metadata.annotations.cpaas.io/creator