Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterMeshEtcdInit ¶
func ClusterMeshEtcdInit(ctx context.Context, log *logrus.Entry, client *clientv3.Client, ciliumClusterName string) error
ClusterMeshEtcdInit initializes etcd for use by Cilium Clustermesh via the provided client. It creates a number of user accounts and roles with permissions, sets a well-known key to indicate that clients should expect a cilium config to be present, and enables authentication for the cluster.
This function uses log to perform informational and debug logging about operations. This function does not log errors and instead returns an error for handling, as it is assumed that the calling function will log errors. Most errors are wrapped with extra context as to the situation in which the error arose.
The ciliumClusterName is used to determine the admin username.
The context provided as ctx can be used to implement a timeout on operations, and is passed to all etcd client functions.
Note that this function is **not idempotent**. It expects a completely blank etcd server with no non-default users, roles, permissions, or keys.
Types ¶
This section is empty.