Comments (10)
Good point. However identifying resources deployed by a helm chart is probably non-trivial task. It needs to be analyzed/explored if/how this would be possible.
from testsuite.
@martin-mat,
Below are additional insights that point to an issue with the label filtering on StatefulSets.
I am deploying two objects as AUT:
- Deployment/release-dns-sig
- StatefulSet/release-dns-prov
The number of replicas is 1 pod for each AUT object.
There are also other Deployments / StatefulSets deployed in the same namespace (without those, the AUT would not become ready and work properly).
For the Deployment, the test correctly logs:
INFO -- cnf-testsuite-specialized_init_system: Pod count for resource Deployment/release-dns-sig in ns: 1
But for the StatefulSet,the test incorrectly determines:
INFO -- cnf-testsuite-specialized_init_system: Pod count for resource StatefulSet/release-dns-prov in ns: 8
So instead of identifying one replica of StatefulSet/release-dns-prov the test checks 8 objects including itself, the already checked object Deployment/release-dns-sig, and 6 other objects in the namespace.
I have updated the title and the bug description accordingly and am staying tuned for any follow-up thoughts or support.
from testsuite.
@martin-mat, is there anything else I can add to the ticket to move it forward? Currently, the issue is extremely extending the duration of the tests and I also believe that the sig_term_handled test fails because of the multiple involvement of the same pod in the test. Thanks a lot for your support.
from testsuite.
@sysarch-repo sure you can; this is open community project, you are free and welcome to figure out how to design a fix and and go ahead with implementation.
If you are not into digging into the code, you need to wait until someone has some time to work on it. The fix of this does not look to be trivial and needs some time.
Meanwhile you can think about a workaround - depending on your use case, for example splitting to 2 different namespaces.
Other than that that: can you get in contact with me via LFN slack?
https://github.com/cnti-testcatalog/testsuite?tab=readme-ov-file#communication-and-community-meetings
from testsuite.
the issue might point here
https://github.com/cnf-testsuite/kubectl_client/blob/v1.0.6/kubectl_client.cr#L1310
from testsuite.
@martin-mat thanks a lot. Very helpful and much appreciated. IMO the simple fix would be adding an if statement for statefulset to use the labels in the pod selector - exactly as done for the deployment type.
def self.resource_spec_labels(kind : String, resource_name : String, namespace : String | Nil = nil) : JSON::Any
Log.debug { "resource_labels kind: #{kind} resource_name: #{resource_name}" }
if kind.downcase == "service"
resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "selector")
elsif kind.downcase == "deployment"
resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "selector", "matchLabels")
elsif kind.downcase == "statefulset"
resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "selector", "matchLabels")
else
resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "template", "metadata", "labels")
end
Log.debug { "resource_labels: #{resp}" }
if resp
resp
else
JSON.parse(%({}))
end
end
I am not skilled wrt git merges (yet) and crystal but I am happy to join the team on Slack. Thanks again!
from testsuite.
@sysarch-repo can you please test this patch on your cnf?
cnf-testsuite/kubectl_client#14
from testsuite.
@martin-mat I can only test by downloading a new CNTI testsuite tar gz, i.e. here is how I install it on AWS EC2:
curl -sLO "https://github.com/cnti-testcatalog/testsuite/releases/download/v1.2.0/cnf-testsuite-v1.2.0.tar.gz"
I assume for the test you ask I need to master a different procedure but I have no skills / experience with that. Thoughts?
from testsuite.
Thoughts?
joining the lfn slack for a quicker support?
from testsuite.
The issue is addressed by cnf-testsuite/kubectl_client#14 and #2085 and released as a part of v1.3.0.
from testsuite.
Related Issues (20)
- [Feature] Separate manifest installation mode from helm
- [Feature] Join installation modes HelmChart and HelmDirectory
- [Feature] Redesign oran_e2_connection test HOT 1
- [Feature] redesign observability tracing test
- [Feature] Redesign workload_resource_test function HOT 2
- [MAINTENANCE] Remove and exchange duplicate test for privileged containers
- [MAINTENANCE] update stable/envoy HOT 3
- [MAINTENANCE] Align cert set with "Certification 2.0 beta" - reduce it to 19 essential tests
- Test Documentation Updates
- [EPIC] Redesign CNF installation process
- [Feature] CNF installation (1), Implement new config format
- [MAINTENANCE] Delete or redesign of CNF configuration HOT 1
- [Feature] Redesign manifest generation for helm charts
- [Feature] CNF installation (4), Create and use common manifest
- [Feature] CNF Installation (2.1), Config format transformer for older version
- [Feature] Should we remove "ip_addresses" test?
- [Feature] Install cnfs into system-wide directory
- [Feature] CNF Installation (3), Switch to new config usage
- [BUG] Image size spec test using protected repo is not working HOT 1
- [Feature] CNF Installation (2.2), New config format generation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testsuite.