Skip to content
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

Allow adding additional containers to a pod. #2211

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

saintstack
Copy link

E.g. In tests, I want to be able to optionally add a sidecar.

  • e2e/fixtures/cluster_config.go Add new AddtionalContainers member.

  • e2e/fixtures/fdb_cluster_specs.go Add AddtionalContainers to the spec if present.

@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: ebe9cc1
  • Duration 2:43:34
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@saintstack
Copy link
Author

Need to be able to add more than just a container. Need to be able to add a (shared) volumemount to the main container and a volume to the pod. Environment variables too.

Copy link
Member

@johscheuer johscheuer left a comment

Choose a reason for hiding this comment

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

Those changes shouldn't be required. You can already generate the default cluster spec, modify it and then create the FDB cluster from this spec. That's basically what the default CreateFdbCluster (see: https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/e2e/fixtures/factory.go#L167-L174) is doing.

Is there any need to expose additional fields like this?

@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: 366cfa0
  • Duration 2:43:17
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@saintstack
Copy link
Author

saintstack commented Feb 13, 2025

Is there any need to expose additional fields like this?

Thanks for the suggestion. I can use clusterconfig to add voumemount and envvars to the main container but I don't see how I can add volumemounts to the pod and a additional container (I don't see how I can edit the pod template). Thanks @johscheuer

Turns out I can't add volumemounts+envars to the main container; I can only do what is in ContainerOverrides which does not include envvars or volumemounts. Restored patch before this one...... which allows me do volumemounts, volumes, envvar, and containers (You probably have a cleaner way of doing what I want).

michael stack added 2 commits February 13, 2025 10:47
E.g. In tests, I want to optionally add a sidecar.

* e2e/fixtures/cluster_config.go
 Add new AddtionalContainers member.

* e2e/fixtures/fdb_cluster_specs.go
 Add AddtionalContainers to the spec if present.
main container. Also make it so can optionally add a volume to the pod.

* e2e/fixtures/cluster_config.go
 Add AdditionalEnvVars, AdditionalVolumeMounts, and AdditionalVolumes
 to the ClusterConfig.

* e2e/fixtures/fdb_cluster_specs.go
 Add inserting env, volumemounts, and volumes if any.
@saintstack saintstack force-pushed the additionalcontainers branch 2 times, most recently from 3391cc6 to ae6ad2b Compare February 13, 2025 20:54
@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: 3391cc6
  • Duration 2:39:35
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: ae6ad2b
  • Duration 3:00:31
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: e9dd49a
  • Duration 2:47:29
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants