slime-io / slime

An intelligent ServiceMesh manager based on Istio
https://slime-io.github.io/
Other
424 stars 78 forks source link

[Configuration Lazy Loading]: Failed to create SlimeBoot CR #8

Closed g0194776 closed 3 years ago

g0194776 commented 3 years ago

Bug description Failed to create SlimeBoot CR, I just followed the official guides at the main page of Github repository here.

The content I was attempting to create:

apiVersion: config.netease.com/v1alpha1
kind: SlimeBoot
metadata:
  name: lazyload
  namespace: mesh-operator
spec:
  module:
    - fence:
        enable: true
        wormholePort:
        - 9080
      name: slime-fence
 component:
   globalSidecar:
     enable: true
     namespace:
       - zhl
   pilot:
     enable: true
     image:
       repository: docker.io/bcxq/pilot
       tag: preview-1.3.7-v0.0.1
   reportServer:
     enable: true
     image:
       repository: docker.io/bcxq/mixer
       tag: preview-1.3.7-v0.0.1

Error:

[root@10 netease]# kubectl create -f slimeboot.yml
error: error parsing slimeboot.yml: error converting YAML to JSON: yaml: line 12: did not find expected key

Slimeboot has been deployed successfully.

[root@10 netease]# kubectl get pods -n mesh-operator
NAME                          READY   STATUS    RESTARTS   AGE
slime-boot-68fd9cd867-brk6z   1/1     Running   0          116m
[root@10 netease]#

Affected sub-moudle (please put an X in all that apply)

[x] Configuration Lazy Loading [ ] Http Plugin Management [ ] Adaptive Ratelimit [x] Slime Boot

Steps to reproduce the bug

ydh926 commented 3 years ago

The format of yaml is incorrect. Check the indentation of the "component" field.

ydh926 commented 3 years ago

The yaml of the readme also has some formatting errors, which may mislead you. I have fixed it, please try again. #10

g0194776 commented 3 years ago

@ydh926 Thank you.

After I successfully created the SlimeBoot CR, It reports an error here:

[root@10 netease]# kubectl get slimeboots.config.netease.com lazyload -n mesh-operator -o yaml
apiVersion: config.netease.com/v1alpha1
kind: SlimeBoot
metadata:
  creationTimestamp: "2021-02-01T02:12:01Z"
  finalizers:
  - uninstall-helm-release
  generation: 1
  name: lazyload
  namespace: mesh-operator
  resourceVersion: "57693925"
  selfLink: /apis/config.netease.com/v1alpha1/namespaces/mesh-operator/slimeboots/lazyload
  uid: deafdb07-6432-11eb-a88b-00155d5c3516
spec:
  component:
    globalSidecar:
      enable: true
      namespace:
      - zhl
    pilot:
      enable: true
      image:
        repository: docker.io/bcxq/pilot
        tag: preview-1.3.7-v0.0.1
    reportServer:
      enable: true
      inspectorImage:
        repository: docker.io/bcxq/report-server
        tag: preview-v0.0.1-rc
      mixImage:
        repository: docker.io/bcxq/mixer
        tag: preview-1.3.7-v0.0.1
  module:
  - fence:
      enable: true
      wormholePort:
      - 9080
    name: slime-fence
status:
  conditions:
  - lastTransitionTime: "2021-02-01T02:12:01Z"
    status: "True"
    type: Initialized
  - lastTransitionTime: "2021-02-01T02:12:02Z"
    message: 'failed to install release: template: slimeboot/templates/report-server.yaml:78:22:
      executing "slimeboot/templates/report-server.yaml" at <$.Values.component.reportServer.image.repository>:
      nil pointer evaluating interface {}.repository'
    reason: InstallError
    status: "True"
    type: ReleaseFailed

How can I make it works?