-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add latest k8s versions in testing #26729
Conversation
Signed-off-by: chrismark <[email protected]>
Pinging @elastic/integrations (Team:Integrations) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Signed-off-by: chrismark <[email protected]>
It seems that default ports for proxy and scheduler have been changed in latest versions. We need to tune them accordingly for our test. |
I wonder why the config for
10249 like at
Also we need to find a way to set the proper ports for newest versions of k8s for @jsoriano do you have any ideas on how we could check for what version we are running and set the config accordingly at
|
Signed-off-by: chrismark <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsoriano do you have any ideas on how we could check for what version we are running and set the config accordingly?
More than checking for the version, we might explicitly provide it via environment variables or something, the job invoking the test knows the version, so it could set an environment variable, and then in the methods to get the config we can chose what config to use depending on the version.
Other option is to configure the services to listen always in the same ports, it is possible to customize the control plane with kubeadm, so invoking kind with something like this config might do the trick for the scheduler (not tested):
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
scheduler:
extraArgs:
secure-port: "0"
port: "10251"
Or we can try to enable always the new port, I guess that by setting the secure-port
flag. But maybe this doesn't work if older versions don't have this flag.
(Take into account that it is not only a port change, but also a change from HTTP to HTTPS.)
deploy/kubernetes/Jenkinsfile.yml
Outdated
@@ -18,5 +18,5 @@ stages: | |||
make check-no-changes; | |||
stage: lint | |||
k8sTest: | |||
k8sTest: "v1.18.2,v1.17.2,v1.16.4,v1.15.7,v1.14.10" | |||
k8sTest: "v1.20.7,v1.19.11,v1.18.2,v1.17.2,v1.16.4,v1.15.7,v1.14.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to support 1.21 too 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind version required an update to work with 1.21
deploy/kubernetes/Jenkinsfile.yml
Outdated
@@ -18,5 +18,5 @@ stages: | |||
make check-no-changes; | |||
stage: lint | |||
k8sTest: | |||
k8sTest: "v1.18.2,v1.17.2,v1.16.4,v1.15.7,v1.14.10" | |||
k8sTest: "v1.20.7,v1.19.11,v1.18.2,v1.17.2,v1.16.4,v1.15.7,v1.14.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can start dropping some of the old versions from the matrix? I would leave the older one we support, but we can consider removing some of the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed 1.15 and 1.16
I have been trying some things and we cannot use only the old port because the scheduler pod has a healthcheck for the new one. Good thing about this is that, if needed, we can use the token in This config works to start with both ports, also in the oldest version:
|
👍🏼 @jsoriano thanks! In integrations we access the endpoint using the token too -> https://github.com/elastic/integrations/blob/master/packages/kubernetes/data_stream/scheduler/_dev/test/system/test-default-config.yml#L7. However there we test only with latest version. I think the patch for kind will do the trick! |
Signed-off-by: chrismark <[email protected]>
Signed-off-by: chrismark <[email protected]>
b68b4c0
to
ac3aa4c
Compare
@@ -29,7 +29,7 @@ import ( | |||
) | |||
|
|||
func TestFetchMetricset(t *testing.T) { | |||
config := test.GetAPIServerConfig(t, "controllermanager") | |||
config := test.GetControllerManagerConfig(t, "controllermanager") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: chrismark <[email protected]>
Signed-off-by: chrismark <[email protected]>
Signed-off-by: chrismark <[email protected]>
Signed-off-by: chrismark <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if it looks good to jenkins 🙂
For reference: Versions of k8s should be specified as per https://github.com/kubernetes-sigs/kind/releases/tag/v0.11.1 |
(cherry picked from commit 1654489)
(cherry picked from commit 1654489)
(cherry picked from commit 1654489) Co-authored-by: Chris Mark <[email protected]>
(cherry picked from commit 1654489) Co-authored-by: Chris Mark <[email protected]>
* upstream/master: (430 commits) CI: increase timeout (elastic#26764) Heartbeat: add datastream fields to synthetics (elastic#26774) Osquerybeat: Change the query timeout from 3 secs to 60 secs (elastic#26775) Remove experimental warning for inputs with variables. (elastic#26762) Add latest k8s versions in testing (elastic#26729) change type of max_bytes to ByteType (elastic#26699) [Elastic Agent] Fix broken enrollment command (elastic#26749) Update agent managed manifest to include enrolment token variable (elastic#26756) Filebeat: Ensure module pipelines compatibility with previous versions of Elasticsearch (elastic#26737) Forward port changelog for 7.13.3 (elastic#26731) to master (elastic#26754) Upgrade PyYAML dependency used for tests (elastic#26746) Add agent fleet enrolment k8s manifest (elastic#26566) CI: retry the step only (elastic#26736) Osquerybeat: Fix the configuration poll interval setting (elastic#26739) [Filebeat] Replace copy_from with templated value (elastic#26631) Reduce the verbosity of the debug log for monitoring (elastic#26583) Add instructions on testing metricbeat kubernetes module (elastic#26643) Revert "[CI] fight the flakiness with some retry option in the CI only for the Pull Requests (elastic#26617)" (elastic#26704) Packaging: linux/armv7 is not supported (elastic#26706) Cyberarkpas: Link to official docs on how to setup TLS (elastic#26614) ...
What does this PR do?
This PR adds more k8s versions for testing.