You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, mostly.
Previously any time installer added a field to metadata.json, we would
need to evaluate and possibly add a bespoke field and code path for it
to make sure it was supplied to the destroyer at deprovision time.
With this change, we're offloading metadata.json verbatim (except in
some cases we have to scrub/replace credentials fields -- see HIVE-2804
/ #2612) to a new Secret in the ClusterDeployment's namespace,
referenced from a new field:
ClusterDeployment.Spec.ClusterMetadata.MetadataJSONSecretRef.
For legacy clusters -- those created before this change -- we attempt to
retrofit the new Secret based on the legacy fields. This is best effort
and may not always work.
In the future (but not here!) instead of building the installer's
ClusterMetadata structure for the destroyer with individual fields from
the CD's ClusterMetadata, we'll unmarshal it directly from the contents
of this Secret.
Copy file name to clipboardExpand all lines: contrib/pkg/createcluster/create.go
+17-2Lines changed: 17 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -161,6 +161,7 @@ type Options struct {
161
161
AdoptAdminKubeConfigstring
162
162
AdoptInfraIDstring
163
163
AdoptClusterIDstring
164
+
AdoptMetadataJSONstring
164
165
AdoptAdminUsernamestring
165
166
AdoptAdminPasswordstring
166
167
MachineNetworkstring
@@ -349,6 +350,7 @@ OpenShift Installer publishes all the services of the cluster like API server an
349
350
flags.StringVar(&opt.AdoptAdminKubeConfig, "adopt-admin-kubeconfig", "", "Path to a cluster admin kubeconfig file for a cluster being adopted. (required if using --adopt)")
350
351
flags.StringVar(&opt.AdoptInfraID, "adopt-infra-id", "", "Infrastructure ID for this cluster's cloud provider. (required if using --adopt)")
351
352
flags.StringVar(&opt.AdoptClusterID, "adopt-cluster-id", "", "Cluster UUID used for telemetry. (required if using --adopt)")
353
+
flags.StringVar(&opt.AdoptMetadataJSON, "adopt-metadata-json", "", "Path to a metadata.json file for a cluster being adopted. (optional)")
352
354
flags.StringVar(&opt.AdoptAdminUsername, "adopt-admin-username", "", "Username for cluster web console administrator. (optional)")
353
355
flags.StringVar(&opt.AdoptAdminPassword, "adopt-admin-password", "", "Password for cluster web console administrator. (optional)")
0 commit comments