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

Cannot start instance with error: Go struct field EnvVar.spec.template.spec.containers.env.value of type string #121

Closed
vnStrawHat opened this issue Oct 23, 2023 · 4 comments · Fixed by #122
Labels
needs-triage Needs looking at to decide what to do

Comments

@vnStrawHat
Copy link

vnStrawHat commented Oct 23, 2023

Current Behavior

Cannot start instance with error:

{"statusCode":400,"body":{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment in version \"v1\" cannot be handled as a Deployment: json: cannot unmarshal number into Go struct field EnvVar.spec.template.spec.containers.env.value of type string","reason":"BadRequest","code":400}

K8s Deployment ENV

"env": [
              {
                "name": "TZ",
                "value": "Europe/London"
              },
              {
                "name": "FORGE_CLIENT_ID",
                "value": "ffp_1gkCsIqdZKFW8AF-5-1n0BgtFdvnktW64cKwzR7tJ94"
              },
              {
                "name": "FORGE_CLIENT_SECRET",
                "value": "GjML-nMDCIRxvFEN3a4fnjG4w3imSHzpbs2xW56hURRtApOBTxYrreswDd0RpJLs"
              },
              {
                "name": "FORGE_URL",
                "value": "http://forge.flowforge"
              },
              {
                "name": "BASE_URL",
                "value": "https://precious-purple-sandpiper-7561.forge.k8s.xxx"
              },
              {
                "name": "FORGE_TEAM_ID",
                "value": "34qaN4xX5v"
              },
              {
                "name": "FORGE_PROJECT_ID",
                "value": "8dcb5b43-06fe-4541-ae3f-2695027c9ec0"
              },
              {
                "name": "FORGE_PROJECT_TOKEN",
                "value": "fft_R0qEj6XaI-UN4uPjJNhu2xR8xKtNgvWPfDaUFnOzOnE"
              },
              {
                "name": "FORGE_NR_NO_TCP_IN",
                "value": "true"
              },
              {
                "name": "FORGE_NR_NO_UDP_IN",
                "value": "true"
              },
              {
                "name": "FORGE_BROKER_URL",
                "value": "mqtt://flowforge-broker.flowforge:1883"
              },
              {
                "name": "FORGE_BROKER_USERNAME",
                "value": "project:34qaN4xX5v:8dcb5b43-06fe-4541-ae3f-2695027c9ec0"
              },
              {
                "name": "FORGE_BROKER_PASSWORD",
                "value": "ffbp_cU0eStkmHZnT_1TliMcMmASelIn8ZCcscXflCnLZQMQ"
              },
              {
                "name": "FORGE_LICENSE_TYPE",
                "value": "ee"
              },
              {
                "name": "FORGE_MEMORY_LIMIT",
                "value": 256
              },
              {
                "name": "FORGE_CPU_LIMIT",
                "value": 10
              },
              {
                "name": "FORGE_NR_SECRET",
                "value": "54b4a8c405a487e67d83121a58440f26ce4bddb3ddd1ab10127c31bce0b0c494"
              }
            ],

Maybe issue related to FORGE_MEMORY_LIMIT and FORGE_CPU_LIMIT with value is int instead of string

Expected Behavior

No response

Steps To Reproduce

No response

Environment

  • FlowFuse version: v1.12.5
  • Node.js version: v16.20.2
  • npm version:
  • Platform/OS: k8s
  • Browser:
@vnStrawHat vnStrawHat added the needs-triage Needs looking at to decide what to do label Oct 23, 2023
@hardillb
Copy link
Contributor

hardillb commented Oct 23, 2023

What version of Kubernetes are you running on?

I'm not seeing that error on 1.23 (just checking on 1.24)

@vnStrawHat
Copy link
Author

I'm using Kubernetes v1.25.6

@hardillb
Copy link
Contributor

OK, working on 1.24 as well, but I think you are correct and I will open a PR to force the values to strings.

hardillb added a commit that referenced this issue Oct 23, 2023
@hardillb
Copy link
Contributor

Should be in release at the end of the week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs looking at to decide what to do
Projects
Status: Closed / Done
Development

Successfully merging a pull request may close this issue.

2 participants