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.awsCloudMap
andserviceRegistry.awsCloudMap.defaultRegion
on operator settings.CloudMapSettings
struct to contain Cloud Map settings.cloudmap
package to hold data and code for Cloud Map operations.Handler
insidecloudmap
package, which is in charge of performing the operations above, includenamespace
,service
andendpoint
operations.fakeCloudMapClient
for testing and mocking the client.- unexported
cloudMapIDs
struct insidecloudmap
package to hold theARN
andID
of an object in Cloud Map. - Unit tests for Cloud Map functions.
- Deployment scripts now have
cloudmap
command 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.listPolicy
is now replaced withwatchNamespacesByDefault
operator.cnwan.io/allowed
andoperator.cnwan.io/blocked
are now replaced byoperator.cnwan.io/watch
with valuesenabled
ordisabled
- Namespace and service controllers implement a new simpler way to deal with the above changes
service.annotations
is now justserviceAnnotations
- settings are not passed to
viper
but only fractions of those are passed to the actual utilizers filterAnnotations
is now a member ofcontrollers
package.- The name of the operator in its deployment yaml is now just
cnwan-operator
rather 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.
allowlist
andblocklist
conceptsoperator.cnwan.io/allowed
andoperator.cnwan.io/blocked
viper
is now entirely removed- Many constants utilized by viper or other packages
- The old
gcloud
settings is now removed
/artifacts/secrets
folder to contain secrets (these are git ignored)./artifacts/deploy
to contain yamls to deploy to the cluster./artifacts/settings
to contains settings for the operator and service registries./artifacts/deploy/other
to contain yaml files to deploy with the operator.
- Fix an error causing
context.DeadlineExceeded
not 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.sh
is updated to reflect files reorganization.remove.sh
is 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.
hack
folder.- Documentation about the advance installation.
- Package
cluster
now contains code to automatically pull some data from GKE in case it is running there. - Package
cluster
now 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/v1
instead ofv1beta
- Using
cloud.google.com/go/servicedirectory/apiv1
instead ofv1beta
- The two points above required a change in some of the structures, such as
changing
Metadata
withAnnotations
in services API. - Service Directory handler can now be instantiated directly.
- Changed
project
toProjectID
in Service Directory handler. - Changed
region
toDefaultRegion
in Service Directory handler. - Changed
--img
to--image
in 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
cluster
which 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
Secret
from Kubernetes without mounting). cloudMetadata
field in settings.- Documentation on how to install
etcd
on the cluster.
- Broker now has persistent metadata that are always inserted in services annotations/metadata on the service registry.
.gitignore
now also includes*.bak*
files.- Fixed some code typos such as
&*
.
etcd
package that wraps around an etcd clientKeyBuilder
for easily building an etcd key- A
Role
for reading secrets on the cluster - A
RoleBinding
to bind the above role to Operator's service account etcd
documentation on folderdocs/etcd
service_registry.md
documentation about service registry and its objectsupdate.md
documentationfakeKV
andfakeTXN
to mock etcd key-value and transactions- namespace name as environment variable
serviceRegistry
field in settings- new utility functions in
utils
- go report badge on readme.md
Service directory
documentation is moved to its own folder ondocs/gcp_service_directory
- main now uses
Goexit
for 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
gcloud
in settings moved toserviceRegistry.gcpServiceDirectory
deploy.sh
andremove.sh
adapted 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
deploy
containing pre-built yaml files, for an easier and quicker deployment. - Scripts
deploy.sh
andremove.sh
to automate some commands.
- RBAC is changed: role only asks for the bare minimum permissions it needs.
- Version format.
- Annotations list in
config/manager/settings.yaml
is 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
,Service
andEndpoint
types, 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
Ownership
section. - Readme: add
Kubernetes Requirements
section.
- Code about service registry is moved to
/pkg
. types
andutils
are now moved to/internal
.Dockerfile
has been changed accordingly- Improve requirements by adding minimum version to some of the dependencies of the operator.
- Upgrades:
sigs.k8s.io/controller-runtime
tov0.6.3
google.golang.org/grpc
tov1.33.0
github.com/stretchr/testify
tov1.6.1
github.com/spf13/viper
tov1.7.1
github.com/onsi/gomega
tov1.10.3
github.com/onsi/ginkgo
tov1.14.2
github.com/googleapis/gax-go
tov1.0.3
cloud.google.com/go
tov0.69.1
- Readme: fixed a typo in
Service Directory Settings
anchor in table of contents.
- The old
servicedirectory
package was removed, in favor ofpkg/servregistry/gcloud/servicedirectory
containing better isolation, separation of concerns and unit tests. utils
has been cleaned up to only containFilterAnnotations
, as the other functions have now been moved to other packages or just not used anymore.COPYRIGHT
file 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
types
andutils
. - Support for Google Cloud Service Directory.