Skip to content

Migrate components deployed with odo 1.0.0-beta3 and earlier after extension update #1051

@dgolovin

Description

@dgolovin

odo 1.0.0-beta4 introduces breaking changes and not going to work correctly with components deployed to cluster:

  1. latest odo won't see any components deployed in with previous versions
  2. latest odo won't be able to deploy components created form local workspace folders, because of name conflict betweel local component and component in cluster
  3. there would be no way to fix name conflicts from vscode, except manually deleting components form cluster using odo version prior 1.0.0-beta4 from command line

extension should check after update that there is no components deployed in cluster with old labels and allow ether to convert to new labels or delete deployed components (whichever is easier) to allow developers move forward.

Conversion
Identify if it is update by checking if ~/.vs-openshift folder is present.
Search and update labels for:
* DeploymentConfigs
* Routes
* BuildConfigs
* ImageStreams
* Services
* PersistentVolumeClimes
* Secrets
* ServiceInstances

Labels conversion map:
app.kubernetes.io/component-name => app.kubernetes.io/instance
app.kubernetes.io/name => app.kubernetes.io/part-of
app.kubernetes.io/component-type => app.kubernetes.io/name
app.kubernetes.io/component-version => app.openshift.io/runtime-version

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions