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

spring.cloud.dataflow.task.platform.kubernetes.accounts.[platformid].initContainer no longer injects the initContainer #5496

Closed
juanpablo-santos opened this issue Oct 5, 2023 · 2 comments
Assignees
Labels
status/in-progress Something is happening
Milestone

Comments

@juanpablo-santos
Copy link

Description:
Using latest SCDF (2.11.0) the initContainer section described through spring.cloud.dataflow.task.platform.kubernetes.accounts.[platformid].initContainer is no longer working, the pods aren't set up with the described initContainer. F.ex., this configuration from SPRING_APPLICATION_JSON did work with SCDF 2.10.3, but doesn't with 2.11.0:

[...]
     "spring": {
        "cloud": {
          "dataflow": {
            [...]
            "features": {
              "schedules-enabled": true
            },
            "task": {
              "platform": {
                "kubernetes": {
                  "accounts": {
                    "onp": {
                      [...]
                      "initContainer": {
                        "containerName": "shared-libs",
                        "environmentVariables": [
                          "MY_VAR=/my-dir"
                        ],
                        "commands": [
                          "sh",
                          "/tmp/init.sh"
                        ],
                        "imageName": "myimagename:myversion",
                        "volumeMounts": [
                          {
                            "name": "vol-libs",
                            "mountPath": "/libs",
                            "readOnly": false
                          }
                        ]
                      },
[...]

Release versions:
Issue happens with 2.11.0, wasn't happening with 2.10.3

Custom apps:
N/A

Steps to reproduce:
set up the above configuration on SPRING_APPLICATION_JSON on a 2.11.0 SCDF server, and launch some pods; they don't get the initContainer

Screenshots:
N/A

Additional context:
N/A

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Oct 5, 2023
@juanpablo-santos
Copy link
Author

Hi,

went digging to see the cause of this issue, seems it is #5280 again:

#5280 was fixed by spring-cloud/spring-cloud-deployer#381 but seems that this issue was reintroduced by this commit later on.

So the only workaround right now would be the same as in #5280, that is, setting initContainer properties as task properties, something like:

spring.cloud.dataflow.task.platformName=onp
deployer.<TASK_ID>.kubernetes.init-container.container-name=shared-dir
deployer.<TASK_ID>.kubernetes.init-container.environment-variables=SHARED_DIR=/shared-dir
deployer.<TASK_ID>.kubernetes.init-container.commands=/tmp/init.sh
deployer.<TASK_ID>.kubernetes.init-container.image-name=XXXX.YYYY:zzz
deployer.<TASK_ID>.kubernetes.init-container.volume-mounts=[{name: 'vol-shared-dir', mountPath: '/shared-dir', readOnly: false}]

This happens with SCDF 2.11.0 and 2.11.1, either using the official helm chart or the local deployment mode.

@corneil corneil self-assigned this Oct 23, 2023
@cppwfs cppwfs added this to the 2.11.2 milestone Jan 5, 2024
@cppwfs cppwfs added status/in-progress Something is happening and removed status/need-triage Team needs to triage and take a first look labels Jan 5, 2024
@cppwfs
Copy link
Contributor

cppwfs commented Jan 5, 2024

Issue resolved with the following commit: spring-cloud/spring-cloud-deployer@02a1d05

@cppwfs cppwfs closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/in-progress Something is happening
Projects
None yet
Development

No branches or pull requests

3 participants