st-tech / gatling-operator

Automating distributed Gatling load testing using Kubernetes operator
MIT License
68 stars 21 forks source link

Need support for security context #117

Closed vijayjoshi16 closed 6 days ago

vijayjoshi16 commented 1 month ago

Summary

I wanted to perform kernel and network tuning on my Gatling pod. I had applied the settings by editing the /etc/sysctl.conf file as per the documentation: https://docs.gatling.io/reference/script/core/operations/#kernel-and-network-tuning This approach works if I edit these files inside the pod but I need these settings configured without having to manually execute the command in a container

In my yaml file I need an option to increase the range of local ports as following:

securityContext:
      sysctls:
        - name: net.ipv4.ip_local_port_range
          value: "1024 65535"

when I apply my yaml file which has the security context settings specified I get the following error:

error: error validating "STDIN": error validating data: ValidationError(Gatling.spec.podSpec): unknown field "securityContext" in com.zozo.tech.gatling-operator.v1alpha1.Gatling.spec.podSpec; if you choose to ignore these errors, turn validation off with --validate=false

Also I don't see the relevant option here as well: https://github.com/st-tech/gatling-operator/blob/22c021f1d43b8d0136c85ac299bd465d7b7de19a/docs/api.md?plain=1#L121 Is there any option to configure security context for all of my gatling pods?

kane8n commented 1 month ago

Hi @vijayjoshi16 . Thank you for creating the issue! Currently, the pod that GatlingOperator applies does not support SecurityContext. We would like to consider adding support for securityContext.

kane8n commented 6 days ago

@vijayjoshi16 SecurityContext support was released in v0.9.8! We hope this will be useful to you.