Documentation ¶
Overview ¶
Package gkesagenerator contains a kio.Filter that that generates a iampolicy-related resources for a given cloud provider
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
IAMPolicyGenerator types.IAMPolicyGeneratorArgs `json:",inline,omitempty" yaml:",inline,omitempty"`
}
Example ¶
f := Filter{} var err = yaml.Unmarshal([]byte(` cloud: gke kubernetesService: namespace: k8s-namespace name: k8s-sa-name serviceAccount: name: gsa-name projectId: project-id `), &f) if err != nil { log.Fatal(err) } err = kio.Pipeline{ Inputs: []kio.Reader{}, Filters: []kio.Filter{f}, Outputs: []kio.Writer{kio.ByteWriter{Writer: os.Stdout}}, }.Execute() if err != nil { log.Fatal(err) }
Output: apiVersion: v1 kind: ServiceAccount metadata: annotations: iam.gke.io/gcp-service-account: gsa-name@project-id.iam.gserviceaccount.com name: k8s-sa-name namespace: k8s-namespace
Click to show internal directories.
Click to hide internal directories.