Skip to content

Conversation

@akostadinov
Copy link
Contributor

Assisted-by: Claude Code

not tested at all, just an example

@akostadinov akostadinov requested a review from a team as a code owner October 21, 2025 18:16
@briangallagher
Copy link
Contributor

briangallagher commented Oct 21, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@tkan145
Copy link
Contributor

tkan145 commented Nov 25, 2025

@akostadinov Unfortunately, this doesn't work.

  • Deploy 3scale with 2.16 image
image: 'registry.redhat.io/3scale-amp2/system-rhel9@sha256:f9926c0b1131cf99a491402251a985bc334415b4bd5cad076adaff0826c45e9f'
  • Attach debug pod
kubectl debug -it system-app-769b8bbc76-6v9kv --image=registry.redhat.io/rhel8/support-tools --target system-master
  • Check running command
bash-4.4$ ps aux                                                                                                                                                                       
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND                                                                                                             
1000680+       1  0.0  0.0   1088   512 ?        Ss   06:28   0:00 /usr/libexec/catatonit/catatonit -- /opt/system/entrypoint.sh unicorn -c config/unicorn.rb -E ${RAILS_ENV} config.ru
1000680+       2 10.7  1.3 427128 278620 ?       Sl   06:28   0:13 unicorn master -c config/unicorn.rb -E ${RAILS_ENV} config.ru                                                       
1000680+      43  0.0  1.2 433284 258724 ?       Sl   06:28   0:00 unicorn worker[0] -c config/unicorn.rb -E ${RAILS_ENV} config.ru                                                    
1000680+      44  0.0  1.2 433284 258552 ?       Sl   06:28   0:00 unicorn worker[1] -c config/unicorn.rb -E ${RAILS_ENV} config.ru                                                    
1000680+      57  0.2  0.0  12140  3200 pts/0    Ss   06:30   0:00 /usr/bin/bash                                                                                                       
1000680+      58  0.0  0.0  44788  3328 pts/0    R+   06:30   0:00 ps aux                                                                                                              
  • Check RAILS_ENV
bash-4.4$ echo $RAILS_ENV
                         

I like to explicitly set the arguments inside the operator, it's easier to track what was used rather than having to dig into the container image or attach a debug pod

@akostadinov
Copy link
Contributor Author

RAILS_ENV should be set within the image itself. I don't think the processes would work if it was not set and I don't think the PR changes how RAILS_ENV is set in any way.

I think it is normal that you don't see that variable using a debug pod of a totally unrelated image.

I think you need to look also for TENANT_MODE and PORT variables. The source of truth should be /proc/<pid>/environ and you can checked it also by podman exec or in OCP open pod terminal, no need for a separate debug pod.

I prefer that we update the image and then it run in the mode that we want instead of having discrepancies between image definition and runtime environment. Less moving parts. That's my vote.

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