If you have a current Spinnaker instance installed via Halyard, use this guide to migrate existing configuration to Operator.
The migration process from Halyard to Operator can be completed in 7 steps:
-
To get started, install Spinnaker Operator.
-
Export Spinnaker configuration.
Copy the desired profile's content from the
configfileFor example, if you want to migrate the
defaulthal profile, use the followingSpinnakerServicemanifest structure:currentDeployment: default deploymentConfigurations: - name: default <CONTENT>
Add
<CONTENT>in thespec.spinnakerConfig.configsection in theSpinnakerServicemanifest as follows:spec: spinnakerConfig: config: <<CONTENT>>
Note:
configis under~/.halMore details on SpinnakerService Options on
.spec.spinnakerConfig.configsection -
Export Spinnaker profiles.
If you have configured Spinnaker profiles, you will need to migrate these profiles to the
SpinnakerServicemanifest.First, identify the current profiles under
~/.hal/default/profilesFor each file, create an entry under
spec.spinnakerConfig.profilesFor example, you have the following profile:
$ ls -a ~/.hal/default/profiles | sort echo-local.yml
Create a new entry with the name of the file without
-local.yamlas follows:spec: spinnakerConfig: profiles: echo: <CONTENT>
More details on SpinnakerService Options on
.spec.spinnakerConfig.profilessection -
Export Spinnaker settings.
If you configured Spinnaker settings, you need to migrate these settings to the
SpinnakerServicemanifest also.First, identify the current settings under
~/.hal/default/service-settingsFor each file, create an entry under
spec.spinnakerConfig.service-settingsFor example, you have the following settings:
$ ls -a ~/.hal/default/service-settings | sort echo.yml
Create a new entry with the name of the file without
.yamlas follows:spec: spinnakerConfig: service-settings: echo: <CONTENT>
More details on SpinnakerService Options on
.spec.spinnakerConfig.service-settingssection -
Export local file references.
If you have references to local files in any part of the config, like
kubeconfigFile, service account json files or others, you need to migrate these files to theSpinnakerServicemanifest.For each file, create an entry under
spec.spinnakerConfig.filesFor example, you have a Kubernetes account configured like this:
kubernetes: enabled: true accounts: - name: prod requiredGroupMembership: [] providerVersion: V2 permissions: {} dockerRegistries: [] configureImagePullSecrets: true cacheThreads: 1 namespaces: [] omitNamespaces: [] kinds: [] omitKinds: [] customResources: [] cachingPolicies: [] oAuthScopes: [] onlySpinnakerManaged: false kubeconfigFile: /home/spinnaker/.hal/secrets/kubeconfig-prod primaryAccount: prod
The
kubeconfigFilefield is a reference to a physical file on the machine running Halyard. You need to create a new entry infilessection like this:spec: spinnakerConfig: files: kubeconfig-prod: | <CONTENT>
Then replace the file path in the config to match the key in the
filessection:kubernetes: enabled: true accounts: - name: prod requiredGroupMembership: [] providerVersion: V2 permissions: {} dockerRegistries: [] configureImagePullSecrets: true cacheThreads: 1 namespaces: [] omitNamespaces: [] kinds: [] omitKinds: [] customResources: [] cachingPolicies: [] oAuthScopes: [] onlySpinnakerManaged: false kubeconfigFile: kubeconfig-prod # File name must match "files" key primaryAccount: prod
More details on SpinnakerService Options on
.spec.spinnakerConfig.filessection -
Export Packer template files (if used).
If you are using custom Packer templates for baking images, you need to migrate these files to the
SpinnakerServicemanifest.First, identify the current templates under
~/.hal/default/profiles/rosco/packerFor each file, reate an entry under
spec.spinnakerConfig.filesFor example, you have the following
example-packer-configfile:$ tree -v ~/.hal/default/profiles ├── echo-local.yml └── rosco └── packer └── example-packer-config.json 2 directories, 2 filesYou need to create a new entry with the name of the file following these instructions:
- For each file, list the folder name starting with
profiles, followed by double underscores (__) and at the very end the name of the file.
spec: spinnakerConfig: files: profiles__rosco__packer__example-packer-config.json: | <CONTENT>
More details on SpinnakerService Options on
.spec.spinnakerConfig.filessection - For each file, list the folder name starting with
-
Validate your Spinnaker configuration if you plan to run the Operator in cluster mode.
$ kubectl -n <namespace> apply -f <spinnaker service manifest> --server-dry-run
The validation service throws an error when something is wrong with your manifest.
-
Apply your SpinnakerService
$ kubectl -n <namespace> apply -f <spinnaker service>