2.6.4.2.5. base64enc function
base64enc
功能返回以 base64
编码的输入 data string
值。查看该功能的以下语法:
func base64enc (data string) (enc-data string)
使用功能时,输入字符串值。查看以下使用 base64enc
功能的配置策略示例:
apiVersion: policy.open-cluster-management.io/v1 kind: ConfigurationPolicy metadata: name: demo-fromsecret namespace: test spec: namespaceSelector: exclude: - kube-* include: - default object-templates: - complianceType: musthave objectDefinition: ... data: USER_NAME: '{{ fromConfigMap "default" "myconfigmap" "admin-user" | base64enc }}'