You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "weixiang1862 (via GitHub)" <gi...@apache.org> on 2023/08/28 07:39:01 UTC
[GitHub] [skywalking] weixiang1862 opened a new issue, #11271: [Bug] swck does not support number env value for oapserver.
weixiang1862 opened a new issue, #11271:
URL: https://github.com/apache/skywalking/issues/11271
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
### Apache SkyWalking Component
SWCK (apache/skywalking-swck)
### What happened
I use swck to deploy oapserver with custom env config, the number is wrappered by double quotation marks:
```
- name: SW_CONFIGURATION
value: grpc
- name: SW_DCS_SERVER_HOST
value: 10.10.23.12
- name: SW_DCS_SERVER_PORT
value: "30989"
- name: SW_DCS_PERIOD
value: "5"
```
The oapserver failed to start, I try to describe it and found the quotation is missing, the following events shows the missing of the quotation caused the failure:
```
[root@15 swck]# kubectl describe oapserver default -n skywalking-system
Spec:
Config:
Name: SW_ES_USER
Value: elastic
Name: SW_ES_PASSWORD
Value: elastic
Name: SW_CONFIGURATION
Value: grpc
Name: SW_DCS_SERVER_HOST
Value: 10.10.23.12
Name: SW_DCS_SERVER_PORT
Value: 30980
Name: SW_DCS_PERIOD
Value: 5
Image: abcsys.cn:5000/public/skywalking-oap-server:9.5.0
Instances: 1
Service:
Ingress:
Template:
Type: ClusterIP
Storage:
Injectstorage:
Metadata:
Spec:
Resource:
Security:
User:
Status:
Name: boc-elasticsearch
Version: 9.5.0
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning failed to apply resource 4s (x13 over 25s) oapserver-controller encountered err: failed to create: Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: v1.EnvVar.Value: ReadString: expects " or n, but found 3, error found in #10 byte of ...|,"value":30980},{"na|..., bigger context ...|.10.23.12"},{"name":"SW_DCS_SERVER_PORT","value":30980},{"name":"SW_DCS_PERIOD","value":5},{"name":"|...
```
### What you expected to happen
The swck operator can keep double quotation marks in env value, then oap server can start successfully.
### How to reproduce
Add any number env value in OapServer CRD, then apply it.
### Anything else
My k8s version is 1.21.1 and swck version is 0.8.0.
I try to fix it by adding a template format func and it works, but i am not sure whether it is a good way, so If anyone else have good ideas, please reassign this to them:

### Are you willing to submit a pull request to fix on your own?
- [X] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] weixiang1862 commented on issue #11271: [Bug] swck does not support number env value for oapserver.
Posted by "weixiang1862 (via GitHub)" <gi...@apache.org>.
weixiang1862 commented on issue #11271:
URL: https://github.com/apache/skywalking/issues/11271#issuecomment-1695280194
> @weixiang1862 Would it be simpler to add a double quotation here? https://github.com/apache/skywalking-swck/blob/502610b1cc71940cb36107ec335bd47aa829a781/operator/pkg/operator/manifests/oapserver/templates/deployment.yaml#L110
Yes, this way is better than add a template func, I tested it and it works too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] weixiang1862 commented on issue #11271: [Bug] swck does not support number env value for oapserver.
Posted by "weixiang1862 (via GitHub)" <gi...@apache.org>.
weixiang1862 commented on issue #11271:
URL: https://github.com/apache/skywalking/issues/11271#issuecomment-1695289249
> Would you submit a pull request? Do we need a general fix?
Yes, thanks. I will check others CRD and submit a pr later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng closed issue #11271: [Bug] swck does not support number env value for oapserver.
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #11271: [Bug] swck does not support number env value for oapserver.
URL: https://github.com/apache/skywalking/issues/11271
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #11271: [Bug] swck does not support number env value for oapserver.
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11271:
URL: https://github.com/apache/skywalking/issues/11271#issuecomment-1695284979
Would you submit a pull request? Do we need a general fix?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] dashanji commented on issue #11271: [Bug] swck does not support number env value for oapserver.
Posted by "dashanji (via GitHub)" <gi...@apache.org>.
dashanji commented on issue #11271:
URL: https://github.com/apache/skywalking/issues/11271#issuecomment-1695244997
@weixiang1862 Would it be simpler to add a double quotation here? https://github.com/apache/skywalking-swck/blob/502610b1cc71940cb36107ec335bd47aa829a781/operator/pkg/operator/manifests/oapserver/templates/deployment.yaml#L110
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org