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/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",
},
},
},