Skip to content
Snippets Groups Projects
Commit 71413ee0 authored by Alexandre Lossent's avatar Alexandre Lossent
Browse files

Merge branch 'cern-4.10-dev' into 'cern-4.10'

Cherry-pick CERN patches for OKD 4.10 release

See merge request !3
parents d12b8a8f bf4c5863
No related branches found
No related tags found
1 merge request!3Cherry-pick CERN patches for OKD 4.10 release
Pipeline #4102114 passed
include:
- project: 'paas-tools/infrastructure-ci'
file: 'docker-images-ci-templates/DockerImages.gitlab-ci.yml'
FROM registry.ci.openshift.org/openshift/release:golang-1.17 AS builder
WORKDIR /go/src/github.com/openshift/machine-api-operator
COPY . .
ENV VERSION_OVERRIDE=v0.0.1-cern
RUN NO_DOCKER=1 make build
FROM registry.ci.openshift.org/openshift/origin-v4.0:base
......
# CERN modifications
For [various reasons](https://okd-internal.docs.cern.ch/design/cern-cloud-cluster-deployment/), we deploy our OpenShift clusters with infrastructure platform type set to 'None' instead of 'OpenStack'.
However, we still want some behaviors that come when setting the platform type to 'OpenStack', e.g. the automatic deployment of [machine-api-controllers](https://gitlab.cern.ch/paas-tools/okd4-deployment/machine-api-operator).
Thus, this repository contains patches that map the 'None' platform type to 'OpenStack' for our use-cases.
The Gitlab repository is configured to automatically mirror the [upstream machine-api-operator repository](https://github.com/openshift/machine-api-operator).
Use the following workflow to port our custom patches to a new release:
```sh
# Make sure your repo is up-to-date
git fetch origin
# Check out the pristine upstream release
git checkout origin/release-4.x
# Push a new branch with the pristine upstream release
git checkout -b cern-4.x
git push origin cern-4.x
# Create a new branch for development
git checkout -b cern-4.x-dev
```
Then, locate the latest patches that have been made by us.
This can be done by checking out an old release branch (e.g. `cern-4.8`) and looking at the commits prefixed with `[cern]`.
```
git log origin/cern-4.8
git cherry-pick [CERN_PATCH_REFS]
```
At this point, you might need to resolve the merge conflicts (*fingers crossed*).
Afterwards, commit your changes with a `[cern]` prefix and push them to the dev branch.
Finally, create a merge request from `cern-4.x-dev` to `cern-4.x` so someone else can review your changes.
# Machine API Operator
The Machine API Operator manages the lifecycle of specific purpose CRDs, controllers and RBAC objects that extend the Kubernetes API.
......
......@@ -57,6 +57,10 @@ type Images struct {
func getProviderFromInfrastructure(infra *configv1.Infrastructure) (configv1.PlatformType, error) {
if infra.Status.PlatformStatus != nil {
if infra.Status.PlatformStatus.Type != "" {
if infra.Status.PlatformStatus.Type == configv1.NonePlatformType {
// Map cloud platform 'None' to 'OpenStack' for CERN Cloud
return configv1.OpenStackPlatformType, nil
}
return infra.Status.PlatformStatus.Type, nil
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment