在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):wave-k8s/wave开源软件地址(OpenSource Url):https://github.com/wave-k8s/wave开源编程语言(OpenSource Language):Go 96.5%开源软件介绍(OpenSource Introduction):WaveWave watches Deployments within a Kubernetes cluster and ensures that each Deployment's Pods always have up to date configuration. By monitoring ConfigMaps and Secrets mounted by a Deployment, Wave can trigger a Rolling Update of the Deployment when the mounted configuration is changed. Table of ContentsIntroductionNot all software is built equal. Some applications can automatically reload their configuration and continue running with the updated configuration, while others will just continue running the old configuration until their process dies. Wave is here to help those applications that do not support dynamic configuration reloading. When deploying applications to Kubernetes, it is common practice to deploy configuration using ConfigMaps and Secrets, mounted into the Pod either as environment variables or in files. When this configuration is updated, if the software consuming the configuration is not able to dynamically reload, it will continue running the old configuration until the Pod is killed, this leads to inconsistency between the supposed desired state of the application and the running state of the application. Wave monitors Deployments and their underlying configuration and will trigger the Kubernetes Deployment controller to update the application and bring up new Pods whenever the underlying configuration is changed. This means that, with Wave, whenever a ConfigMap or Secret is updated, all Deployments mounting the configuration will bring up new Pods on the cluster and remove the old Pods with the out-of-date configuration. Wave gives application developers confidence that the deployed configuration, matches the live configuration. It allows developers to discover misconfiguration as it is deployed, rather than when the Pods happen to be re-cycled. InstallationWave is released periodically. The latest version is A list of changes can be seen in the CHANGELOG. Deploying to KubernetesPublic docker images for releases since v0.4.0 are available on Quay. Deploying with HelmHelm charts are available in this repository and hosted through Github Pages. To deploy, add the repository to helm and install:
Deploying with KustomizeWave is a Kubebuilder based project, as such we have auto-generated Kustomize configuration as an example of how to install the controller in the config folder.
RBACIf you are using RBAC within your cluster, you must grant the service account used by your Wave instance permission to read all Secrets, ConfigMaps and Deployments and the ability to update Deployments within each namespace in the cluster. Example ConfigurationThe following section details the various configuration options that Wave provides at the controller level. Leader ElectionWave can be run in an active-standby HA configuration using Kubernetes leader election. When leader election is enabled, each Pod will attempt to become leader and, whichever is successful, will become the active or master controller. The master will perform all of the reconciliation of Resources. The standby Pods will sit and wait until the leader goes away and then one standby will be promoted to master. To enable leader election, set the following flags:
Sync periodThe controller uses Kubernetes informers to cache resources and reduce load on the Kubernetes API server. Every informer has a sync period, after which it will refresh all resources within its cache. At this point, every item in the cache is queued for reconciliation by the controller. Therefore, by setting the following flag;
You can ensure that every resource will be reconciled at least every 5 minutes. Quick StartIf you haven't yet got Wave running on your cluster, see Installation for details on how to get it running. Wave watches all Deployments within a cluster but only processes those that have
the annotation Therefore, to enable Wave for your Deployment, add the
Once enabled, Wave will set the initial configuration hash as an annotation on
the Deployment's
From now on, when a mounted ConfigMap or Secret is updated, Wave will update
this Project ConceptsThis section outlines some of the underlying concepts that enable this controller to work the way it does. Enabling Wave for a DeploymentWave acts as an opt-in controller on a per Deployment basis. Before processing any Deployment, Wave checks for the presence of a "Required annotation". If the annotation is not present, Wave will ignore the Deployment. Therefore, to enable Wave for your Deployment, add the
Wave will now start processing this Deployment. Triggering UpdatesWave monitors the data stored in ConfigMaps and Secrets referenced within a Deployment. By calculating a SHA256 hash of the data in a reproducible manner, Wave can determine when the data with the ConfigMaps and Secrets has changed. Wave stores the calculated hash as an annotation on the Modifying the FinalizersWave adds an Normally, when an owner is deleted, the Kubernetes Garbage Collector deletes all child resources. This is not desirable and so Wave prevents this from happening. Wave managed Deployments will have a When Wave encounters a Deployment marked for deletion that has the Wave Finalizer, it checks for all ConfigMaps and Secrets with an OwnerReference pointing to the Deployment and removes the OwnerReference. Thus preventing the ConfigMaps and Secrets from being deleted by the Garbage Collector. Read the docs for more about Kubernetes Garbage Collection. Communication
ContributingPlease see our Contributing guidelines. LicenseThis project is licensed under Apache 2.0 and a copy of the license is available here. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论