All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Some broken links on the documentation
serviceRegistry.awsCloudMapandserviceRegistry.awsCloudMap.defaultRegionon operator settings.CloudMapSettingsstruct to contain Cloud Map settings.cloudmappackage to hold data and code for Cloud Map operations.Handlerinsidecloudmappackage, which is in charge of performing the operations above, includenamespace,serviceandendpointoperations.fakeCloudMapClientfor testing and mocking the client.- unexported
cloudMapIDsstruct insidecloudmappackage to hold theARNandIDof an object in Cloud Map. - Unit tests for Cloud Map functions.
- Deployment scripts now have
cloudmapcommand for deploying the operator with Cloud Map settings. - Documentation for Cloud Map.
- Validation now takes into account the fact that we have 3 service registries, and validation is first performed by counting how many are included in the settings.
- Some documentation sections have been modified with better wording or updated descriptions.
- A bug preventing deleted namespaces from being correctly identified
namespace.listPolicyis now replaced withwatchNamespacesByDefaultoperator.cnwan.io/allowedandoperator.cnwan.io/blockedare now replaced byoperator.cnwan.io/watchwith valuesenabledordisabled- Namespace and service controllers implement a new simpler way to deal with the above changes
service.annotationsis now justserviceAnnotations- settings are not passed to
viperbut only fractions of those are passed to the actual utilizers filterAnnotationsis now a member ofcontrollerspackage.- The name of the operator in its deployment yaml is now just
cnwan-operatorrather thancnwan-operator-controller-manager. - Some code paths in the controllers are now moved or changed to prevent unnecessary computation, e.g. if a namespace is deleted it is removed from the service registry without loading its services as this is performed elsewhere.
allowlistandblocklistconceptsoperator.cnwan.io/allowedandoperator.cnwan.io/blockedviperis now entirely removed- Many constants utilized by viper or other packages
- The old
gcloudsettings is now removed
/artifacts/secretsfolder to contain secrets (these are git ignored)./artifacts/deployto contain yamls to deploy to the cluster./artifacts/settingsto contains settings for the operator and service registries./artifacts/deploy/otherto contain yaml files to deploy with the operator.
- Fix an error causing
context.DeadlineExceedednot being correctly parsed when calls to Service Directory fail. - Update packages for Service Directory to the latest version.
- Update packages for etcd to a stable version.
- Files to deploy are now moved to
/artifacts. deploy.shis updated to reflect files reorganization.remove.shis updated to reflect files reorganization.- Update installation to include new ways to add files.
- Update go to
1.17.
- Some unused entrypoints in
Makefile. - Files that belonged to the old advance installation.
hackfolder.- Documentation about the advance installation.
- Package
clusternow contains code to automatically pull some data from GKE in case it is running there. - Package
clusternow contains code to pull some resources from the cluster it is running in, e.g. secrets and configmaps. - From previous point, it is able to automatically get region and project from GCP and automatically create the client with those data.
- Settings for Google Service Directory can now be empty, and if so cloud metadata is used in case the cluster is running in GKE. It fails otherwise.
- Using
google.golang.org/genproto/googleapis/cloud/servicedirectory/v1instead ofv1beta - Using
cloud.google.com/go/servicedirectory/apiv1instead ofv1beta - The two points above required a change in some of the structures, such as
changing
MetadatawithAnnotationsin services API. - Service Directory handler can now be instantiated directly.
- Changed
projecttoProjectIDin Service Directory handler. - Changed
regiontoDefaultRegionin Service Directory handler. - Changed
--imgto--imagein installation script. - Dockerfile is updated by also including the new
utils.go. - The etcd credentials are now being retrieved automatically from the cluster.
- The Google service account is now retrieved automatically from within the cluster.
- Operator's settings configmap is now retrieved automatically from within the cluster.
- Secrets and configmaps are not mounted on the pod anymore.
- Old code that was used to read the aforementioned files from the pod's mounted volumes.
- Old code from viper (will be removed entirely in future).
- Package
clusterwhich contains code that performs operations on the cluster that hosts the operator. - Automatic cloud metadata pull from GCP and AWS (although the latter is not being fully used yet).
- Get network and subnetwork data from GCP and AWS.
- Automatically retrieve Google service account
Secretfrom Kubernetes without mounting). cloudMetadatafield in settings.- Documentation on how to install
etcdon the cluster.
- Broker now has persistent metadata that are always inserted in services annotations/metadata on the service registry.
.gitignorenow also includes*.bak*files.- Fixed some code typos such as
&*.
etcdpackage that wraps around an etcd clientKeyBuilderfor easily building an etcd key- A
Rolefor reading secrets on the cluster - A
RoleBindingto bind the above role to Operator's service account etcddocumentation on folderdocs/etcdservice_registry.mddocumentation about service registry and its objectsupdate.mddocumentationfakeKVandfakeTXNto mock etcd key-value and transactions- namespace name as environment variable
serviceRegistryfield in settings- new utility functions in
utils - go report badge on readme.md
Service directorydocumentation is moved to its own folder ondocs/gcp_service_directory- main now uses
Goexitfor safer exit, but whole function will be changed in future - different exit codes depending on the error
- service registry objects now contain struct tags
- new settings format which deprecates the old one
gcloudin settings moved toserviceRegistry.gcpServiceDirectorydeploy.shandremove.shadapted to work with etcd and work as flag-enabled CLIs- git and docker badges changed with latest semver instead of latest date
- A service account, so that the operator does not use the default one anymore
- Folder
deploycontaining pre-built yaml files, for an easier and quicker deployment. - Scripts
deploy.shandremove.shto automate some commands.
- RBAC is changed: role only asks for the bare minimum permissions it needs.
- Version format.
- Annotations list in
config/manager/settings.yamlis now empty. - Leader election and metrics server
- Many resources that are not utilized.
- New Service Registry Broker, which manages data - i.e. checks if data is correct or if already exists, etc. - before sending requests to the service registry. As a matter of fact, it performs operations on namespaces, services and endpoints before actually executing the appropriate functions of the service registry. The service registry library can be used, but letting everything go through the broker is recommended as it will set up the data in the correct way and format.
- Stronger unit tests for the service registry broker.
- New handler for Google Cloud Service Directory, with better testing.
- New "intermediate" types: the operator works with
Namespace,ServiceandEndpointtypes, which strip away the complexities and non-relevant data from the K8s types or the ones used by the service registry. - Timeouts: all HTTP/S requests made by the operator to the service registry are now subject to a timeout. If the timeout expires, the http call is interrupted. This avoids the operator being stuck on requests and accumulate too many resources.
- This Changelog.
- Functions have more logs.
- Readme: add Kubernetes version requirement.
- Readme: add
Ownershipsection. - Readme: add
Kubernetes Requirementssection.
- Code about service registry is moved to
/pkg. typesandutilsare now moved to/internal.Dockerfilehas been changed accordingly- Improve requirements by adding minimum version to some of the dependencies of the operator.
- Upgrades:
sigs.k8s.io/controller-runtimetov0.6.3google.golang.org/grpctov1.33.0github.com/stretchr/testifytov1.6.1github.com/spf13/vipertov1.7.1github.com/onsi/gomegatov1.10.3github.com/onsi/ginkgotov1.14.2github.com/googleapis/gax-gotov1.0.3cloud.google.com/gotov0.69.1
- Readme: fixed a typo in
Service Directory Settingsanchor in table of contents.
- The old
servicedirectorypackage was removed, in favor ofpkg/servregistry/gcloud/servicedirectorycontaining better isolation, separation of concerns and unit tests. utilshas been cleaned up to only containFilterAnnotations, as the other functions have now been moved to other packages or just not used anymore.COPYRIGHTfile is removed, as copyright is contained on top of each file created by the CN-WAN Operator Owners.
- Namespace and Service controllers are added.
- Internal structures such as
typesandutils. - Support for Google Cloud Service Directory.