smalltown -> metropolis
This pass removes all mentions of Smalltown, both from code and comments,
and replaces them with appropriate new terminology.
Test Plan: Refactor, covered by CI.
X-Origin-Diff: phab/D674
GitOrigin-RevId: 04a94d44ef07d46f7821530da5614daefe16d7ea
diff --git a/metropolis/node/kubernetes/clusternet/clusternet.go b/metropolis/node/kubernetes/clusternet/clusternet.go
index d8dc7ad..cd78434 100644
--- a/metropolis/node/kubernetes/clusternet/clusternet.go
+++ b/metropolis/node/kubernetes/clusternet/clusternet.go
@@ -52,7 +52,7 @@
const (
clusterNetDeviceName = "clusternet"
- publicKeyAnnotation = "node.smalltown.nexantic.com/wg-pubkey"
+ publicKeyAnnotation = "node.metropolis.monogon.dev/wg-pubkey"
)
type Service struct {
diff --git a/metropolis/node/kubernetes/csi.go b/metropolis/node/kubernetes/csi.go
index 4b44a1a..81a94fc 100644
--- a/metropolis/node/kubernetes/csi.go
+++ b/metropolis/node/kubernetes/csi.go
@@ -205,7 +205,7 @@
// CSI Identity endpoints
func (*csiPluginServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) {
return &csi.GetPluginInfoResponse{
- Name: "com.smalltown.vfs",
+ Name: "dev.monogon.metropolis.vfs",
VendorVersion: "0.0.1", // TODO(lorenz): Maybe stamp?
}, nil
}
@@ -232,7 +232,7 @@
func (s *csiPluginServer) GetInfo(ctx context.Context, req *pluginregistration.InfoRequest) (*pluginregistration.PluginInfo, error) {
return &pluginregistration.PluginInfo{
Type: "CSIPlugin",
- Name: "com.smalltown.vfs",
+ Name: "dev.monogon.metropolis.vfs",
Endpoint: s.KubeletDirectory.Plugins.VFS.FullPath(),
SupportedVersions: []string{"1.2"}, // Keep in sync with container-storage-interface/spec package version
}, nil
diff --git a/metropolis/node/kubernetes/pki/certificate.go b/metropolis/node/kubernetes/pki/certificate.go
index 6bd50f9..da7d301 100644
--- a/metropolis/node/kubernetes/pki/certificate.go
+++ b/metropolis/node/kubernetes/pki/certificate.go
@@ -108,7 +108,7 @@
// in memory (if volatile), loading it from etcd, or creating and saving it on etcd if needed.
// This function is safe to call in parallel from multiple etcd clients (including across machines), but it will error
// in case a concurrent certificate generation happens. These errors are, however, safe to retry - as long as all the
-// certificate creators (ie., Smalltown nodes) run the same version of this code.
+// certificate creators (ie., Metropolis nodes) run the same version of this code.
// TODO(q3k): in the future, this should be handled better - especially as we introduce new certificates, or worse,
// change the issuance chain. As a stopgap measure, an explicit per-certificate or even global lock can be implemented.
// And, even before that, we can handle concurrency errors in a smarter way.
diff --git a/metropolis/node/kubernetes/pki/kubernetes.go b/metropolis/node/kubernetes/pki/kubernetes.go
index c4827a9..979fec6 100644
--- a/metropolis/node/kubernetes/pki/kubernetes.go
+++ b/metropolis/node/kubernetes/pki/kubernetes.go
@@ -57,7 +57,7 @@
// Kubernetes scheduler server certificate, used to run its HTTP server.
Scheduler KubeCertificateName = "scheduler"
- // Root-on-kube (system:masters) client certificate. Used to control the apiserver (and resources) by Smalltown
+ // Root-on-kube (system:masters) client certificate. Used to control the apiserver (and resources) by Metropolis
// internally.
Master KubeCertificateName = "master"
@@ -73,7 +73,7 @@
serviceAccountKeyName = "service-account-privkey"
)
-// KubernetesPKI manages all PKI resources required to run Kubernetes on Smalltown. It contains all static certificates,
+// KubernetesPKI manages all PKI resources required to run Kubernetes on Metropolis. It contains all static certificates,
// which can be retrieved, or be used to generate Kubeconfigs from.
type KubernetesPKI struct {
logger logtree.LeveledLogger
@@ -92,7 +92,7 @@
pki.Certificates[name] = New(pki.Certificates[i], string(name), template)
}
- pki.Certificates[IdCA] = New(SelfSigned, string(IdCA), CA("Smalltown Kubernetes ID CA"))
+ pki.Certificates[IdCA] = New(SelfSigned, string(IdCA), CA("Metropolis Kubernetes ID CA"))
make(IdCA, APIServer, Server(
[]string{
"kubernetes",
@@ -104,14 +104,14 @@
},
[]net.IP{{10, 0, 255, 1}, {127, 0, 0, 1}}, // TODO(q3k): add service network internal apiserver address
))
- make(IdCA, KubeletClient, Client("smalltown:apiserver-kubelet-client", nil))
+ make(IdCA, KubeletClient, Client("metropolis:apiserver-kubelet-client", nil))
make(IdCA, ControllerManagerClient, Client("system:kube-controller-manager", nil))
make(IdCA, ControllerManager, Server([]string{"kube-controller-manager.local"}, nil))
make(IdCA, SchedulerClient, Client("system:kube-scheduler", nil))
make(IdCA, Scheduler, Server([]string{"kube-scheduler.local"}, nil))
- make(IdCA, Master, Client("smalltown:master", []string{"system:masters"}))
+ make(IdCA, Master, Client("metropolis:master", []string{"system:masters"}))
- pki.Certificates[AggregationCA] = New(SelfSigned, string(AggregationCA), CA("Smalltown OpenAPI Aggregation CA"))
+ pki.Certificates[AggregationCA] = New(SelfSigned, string(AggregationCA), CA("Metropolis OpenAPI Aggregation CA"))
make(AggregationCA, FrontProxyClient, Client("front-proxy-client", nil))
return &pki
diff --git a/metropolis/node/kubernetes/provisioner.go b/metropolis/node/kubernetes/provisioner.go
index b671125..a9dfa72 100644
--- a/metropolis/node/kubernetes/provisioner.go
+++ b/metropolis/node/kubernetes/provisioner.go
@@ -46,7 +46,7 @@
)
// ONCHANGE(//metropolis/node/kubernetes/reconciler:resources_csi.go): needs to match csiProvisionerServerName declared.
-const csiProvisionerServerName = "com.nexantic.smalltown.vfs"
+const csiProvisionerServerName = "dev.monogon.metropolis.vfs"
// csiProvisionerServer is responsible for the provisioning and deprovisioning of CSI-based container volumes. It runs on all
// nodes and watches PVCs for ones assigned to the node it's running on and fulfills the provisioning request by
@@ -256,7 +256,7 @@
}
if *pvc.Spec.VolumeMode == v1.PersistentVolumeBlock {
- return fmt.Errorf("Block PVCs are not supported by Smalltown")
+ return fmt.Errorf("Block PVCs are currently not supported by Metropolis")
}
volumeID := "pvc-" + string(pvc.ObjectMeta.UID)
diff --git a/metropolis/node/kubernetes/reconciler/reconciler.go b/metropolis/node/kubernetes/reconciler/reconciler.go
index 9c5ba4e..0ce84d7 100644
--- a/metropolis/node/kubernetes/reconciler/reconciler.go
+++ b/metropolis/node/kubernetes/reconciler/reconciler.go
@@ -14,12 +14,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// The reconciler ensures that a base set of K8s resources is always available in the cluster. These are necessary to
-// ensure correct out-of-the-box functionality. All resources containing the smalltown.com/builtin=true label are assumed
-// to be managed by the reconciler.
-// It currently does not revert modifications made by admins, it is planned to create an admission plugin prohibiting
-// such modifications to resources with the smalltown.com/builtin label to deal with that problem. This would also solve a
-// potential issue where you could delete resources just by adding the smalltown.com/builtin=true label.
+// The reconciler ensures that a base set of K8s resources is always available
+// in the cluster. These are necessary to ensure correct out-of-the-box
+// functionality. All resources containing the
+// metropolis.monogon.dev/builtin=true label are assumed to be managed by the
+// reconciler.
+// It currently does not revert modifications made by admins, it is planned to
+// create an admission plugin prohibiting such modifications to resources with
+// the metropolis.monogon.dev/builtin label to deal with that problem. This
+// would also solve a potential issue where you could delete resources just by
+// adding the metropolis.monogon.dev/builtin=true label.
package reconciler
import (
@@ -45,17 +49,17 @@
const (
// BuiltinLabelKey is used as a k8s label to mark built-in objects (ie., managed by the reconciler)
- BuiltinLabelKey = "smalltown.com/builtin"
+ BuiltinLabelKey = "metropolis.monogon.dev/builtin"
// BuiltinLabelValue is used as a k8s label value, under the BuiltinLabelKey key.
BuiltinLabelValue = "true"
// BuiltinRBACPrefix is used to prefix all built-in objects that are part of the rbac/v1 API (eg.
// {Cluster,}Role{Binding,} objects). This corresponds to the colon-separated 'namespaces' notation used by
// Kubernetes system (system:) objects.
- BuiltinRBACPrefix = "smalltown:"
+ BuiltinRBACPrefix = "metropolis:"
)
// builtinLabels makes a kubernetes-compatible label dictionary (key->value) that is used to mark objects that are
-// built-in into Smalltown (ie., managed by the reconciler). These are then subsequently retrieved by listBuiltins.
+// built-in into Metropolis (ie., managed by the reconciler). These are then subsequently retrieved by listBuiltins.
// The extra argument specifies what other labels are to be merged into the the labels dictionary, for convenience. If
// nil or empty, no extra labels will be applied.
func builtinLabels(extra map[string]string) map[string]string {
@@ -71,8 +75,8 @@
}
// listBuiltins returns a k8s client ListOptions structure that allows to retrieve all objects that are built-in into
-// Smalltown currently present in the API server (ie., ones that are to be managed by the reconciler). These are created
-// by applying builtinLabels to their metadata labels.
+// Metropolis currently present in the API server (ie., ones that are to be managed by the reconciler). These are
+// created by applying builtinLabels to their metadata labels.
var listBuiltins = meta.ListOptions{
LabelSelector: fmt.Sprintf("%s=%s", BuiltinLabelKey, BuiltinLabelValue),
}
diff --git a/metropolis/node/kubernetes/reconciler/resources_csi.go b/metropolis/node/kubernetes/reconciler/resources_csi.go
index ecbcb4b..c7f7b2b 100644
--- a/metropolis/node/kubernetes/reconciler/resources_csi.go
+++ b/metropolis/node/kubernetes/reconciler/resources_csi.go
@@ -27,7 +27,7 @@
// TODO(q3k): this is duplicated with //metropolis/node/kubernetes:provisioner.go; integrate this once provisioner.go
// gets moved into a subpackage.
// ONCHANGE(//metropolis/node/kubernetes:provisioner.go): needs to match csiProvisionerName declared.
-const csiProvisionerName = "com.nexantic.smalltown.vfs"
+const csiProvisionerName = "dev.monogon.metropolis.vfs"
type resourceCSIDrivers struct {
kubernetes.Interface
diff --git a/metropolis/node/kubernetes/reconciler/resources_rbac.go b/metropolis/node/kubernetes/reconciler/resources_rbac.go
index 40ca879..15386a6 100644
--- a/metropolis/node/kubernetes/reconciler/resources_rbac.go
+++ b/metropolis/node/kubernetes/reconciler/resources_rbac.go
@@ -146,7 +146,7 @@
APIGroup: rbac.GroupName,
Kind: "User",
// TODO(q3k): describe this name's contract, or unify with whatever creates this.
- Name: "smalltown:apiserver-kubelet-client",
+ Name: "metropolis:apiserver-kubelet-client",
},
},
},