Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Conversation

nlamirault
Copy link
Contributor

@nlamirault nlamirault commented May 2, 2022

Description: Currently we can't customize affinity, nodeSelectors or tolerations.
This makes it impossible to deploy OSM on an ARM64 cluster.

#4702

Testing done:

Affected area:

Functional Area
New Functionality [ ]
CI System [ ]
CLI Tool [ ]
Certificate Management [ ]
Control Plane [ ]
Demo [ ]
Documentation [ ]
Egress [ ]
Ingress [ ]
Install [ ]
Networking [ ]
Observability [ ]
Performance [ ]
SMI Policy [ ]
Security [ ]
Sidecar Injection [ ]
Tests [ ]
Upgrade [ ]
Other [x ]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project?

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change?

  3. Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?
    Yes into the chart README.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented May 2, 2022

Codecov Report

Merging #4706 (15c86d8) into main (102baf5) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #4706      +/-   ##
==========================================
- Coverage   69.56%   69.53%   -0.04%     
==========================================
  Files         220      223       +3     
  Lines       15800    15941     +141     
==========================================
+ Hits        10992    11085      +93     
- Misses       4758     4805      +47     
- Partials       50       51       +1     
Flag Coverage Δ
unittests 69.53% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/certificate/manager.go 83.33% <0.00%> (-1.59%) ⬇️
pkg/configurator/client.go 88.97% <0.00%> (-1.14%) ⬇️
cmd/osm-bootstrap/osm-bootstrap.go 43.60% <0.00%> (-0.21%) ⬇️
cmd/osm-controller/osm-controller.go 14.78% <0.00%> (-0.07%) ⬇️
cmd/cli/verify.go 100.00% <0.00%> (ø)
cmd/cli/verify_control_plane.go 36.11% <0.00%> (ø)
pkg/cli/verifier/control_plane.go 61.11% <0.00%> (ø)
pkg/cli/verifier/pod.go 79.48% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 102baf5...15c86d8. Read the comment docs.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@nlamirault nlamirault changed the title Refactoring scheduling methods [Helm chart] Refactoring scheduling methods May 3, 2022
@@ -166,13 +229,16 @@ osm:
enableReconciler: false

# -- Deploy Prometheus with OSM installation
deployPrometheus: false
deployPrometheus: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reasoning for changing the default values for deploying Prometheus, Grafana, Jaeger, and fluentbit?

Copy link
Contributor Author

@nlamirault nlamirault May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An error. Fixed

@nshankar13
Copy link
Contributor

@nlamirault can you also share the full osm install command and CLI output on ARM64 cluster/environment, and if possible also on AMD64?

@nshankar13 nshankar13 mentioned this pull request May 3, 2022
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@nlamirault
Copy link
Contributor Author

@nshankar13 can i only generate manifests from CLI ?

Copy link
Member

@shashankram shashankram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nlamirault for this change. Could you address the following comments:

  1. Describe in the PR description what additional testing was done
  2. Update the release notes to reflect the breaking changes to existing Helm chart values.

@nshankar13
Copy link
Contributor

@nlamirault manifests/configs not needed, just need to ensure that installation succeeded and that all pods in OSM release namespace are ready.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@nlamirault
Copy link
Contributor Author

nlamirault commented May 5, 2022

My tests was :

NAME                              READY   STATUS    RESTARTS   AGE
osm-injector-7ccd8c9d98-xdmqg     0/1     Pending   0          8d
osm-controller-687f75c598-l4lsd   0/1     Pending   0          8d
osm-bootstrap-5df4b86cc7-wpsbp    0/1     Pending   0          8d

kubectl edit to change amd64 to arm64 :

❯ kubectl -n osm-system get pod
NAME                              READY   STATUS    RESTARTS   AGE
osm-bootstrap-74fdcc5589-58f9q    1/1     Running   0          76s
osm-controller-7fc5c87bf4-jd5zp   1/1     Running   0          43s
osm-injector-6dc5fd7658-bqm6q     1/1     Running   0          61s

Then update the chart, and check differences :

with https://github.com/Wilfred/difftastic :

❯ difft amd64.yaml arm64.yaml
arm64.yaml --- YAML
No syntactic changes.

with diff :

✖ diff amd64.yaml arm64.yaml
275c275
<                 - amd64
---
>                 - arm64
396c396
<                 - amd64
---
>                 - arm64
515c515
<                 - amd64
---
>                 - arm64
757c757
<         kubernetes.io/arch: amd64
---
>         kubernetes.io/arch: arm64

I will try to delete my setup and install the chart with arm64 values.

@nlamirault
Copy link
Contributor Author

❯ helm install test-osm -f ~/values-arm64.yaml -n test-osm Forks/osm/charts/osm/
NAME: test-osm
LAST DEPLOYED: Thu May  5 09:01:04 2022
NAMESPACE: test-osm
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Congratulations! The OSM control plane has been installed in your Kubernetes cluster!

❯ kubectl -n test-osm get pods
NAME                              READY   STATUS    RESTARTS   AGE
osm-bootstrap-7db9ccf4b6-d7sl4    1/1     Running   0          2m
osm-controller-7fbf694685-t6t4n   1/1     Running   0          2m1s
osm-injector-c9795d495-wxlc9      1/1     Running   0          2m

@shashankram
Copy link
Member

Thanks @nlamirault for this change. Could you address the following comments:

  1. Describe in the PR description what additional testing was done
  2. Update the release notes to reflect the breaking changes to existing Helm chart values.

@nlamirault The release notes aren't updated as requested. This is important because this PR is a breaking change to install options.

@nlamirault
Copy link
Contributor Author

@shashankram how i update the release note ?
Last release is on v1.1.0 (https://github.com/openservicemesh/osm/blob/main/docs/release_notes.md#release-v110=), but there is a v1.1.1
Do i have to create a v1.2.0 on the release note document ?

@shashankram
Copy link
Member

@shashankram how i update the release note ? Last release is on v1.1.0 (https://github.com/openservicemesh/osm/blob/main/docs/release_notes.md#release-v110=), but there is a v1.1.1 Do i have to create a v1.2.0 on the release note document ?

@nlamirault You need to make changes to that file by adding a section for v1.2.0 and listing the breaking changes.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this change @nlamirault! Left a few comments inline.

- key: kubernetes.io/arch
operator: In
values:
- amd64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say let's add arm64 here since all of the OSM images we publish will also work on arm64.

Copy link
Contributor Author

@nlamirault nlamirault May 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I add arm64 in other podAntiAffinity also.

@@ -88,6 +88,41 @@ osm:
# -- Average target memory utilization (%)
targetAverageUtilization: 80

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of not having multiple ways of doing the same thing, I would vote to only expose affinity in the values here and remove nodeSelector.


## Affinity settings for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
affinity: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the Promtheus image we're using by default has support for several different architectures, let's define all of them as acceptable here instead of just amd64 in nodeSelector: https://hub.docker.com/layers/prometheus/prom/prometheus/v2.34.0/images/sha256-cb42332b66ac51a05c52f255e48a4496c0a172676093123bf28b37762009e78a?context=explore

Copy link
Contributor Author

@nlamirault nlamirault May 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So only :

nodeSelector:
      kubernetes.io/arch: amd64

I think Prometheus images are multi arch now ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean let's define all of the architectures supported by the Prometheus image in the nodeAffinity here and remove the nodeSelector.

"title": "The preinstall schema",
"description": "Preinstall configurations",
"required": [],
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add "additionalProperties": false to these to match everything else.

…on arm64

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

## Affinity settings for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
affinity: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean let's define all of the architectures supported by the Prometheus image in the nodeAffinity here and remove the nodeSelector.


## Affinity settings for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
affinity: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do the same as Prometheus here and define all of the architectures supported by the image here in nodeAffinity.

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector:
kubernetes.io/arch: amd64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shashankram The envoy-alpine image is only built for amd64. Do you see any issues if we specify envoyproxy/envoy as the default sidecar image instead which also supports arm64?

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector:
kubernetes.io/arch: amd64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image also supports arm64, so let's define both amd64 and arm64 as acceptable in the nodeAffinity.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@shalier
Copy link
Contributor

shalier commented Jun 9, 2022

PR also addresses #4496

@shalier shalier requested a review from shashankram June 9, 2022 19:29
@shalier
Copy link
Contributor

shalier commented Jun 9, 2022

@nlamirault Please let us know if we can provide more information on the outstanding comments!

@shalier
Copy link
Contributor

shalier commented Jun 23, 2022

Created #4842 to address comments in this PR - closing this PR

@shalier shalier closed this Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants