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
Optimize the helm chart #208
Conversation
|
||
#Set this to containerd or crio if you want to collect CRI format logs | ||
containerRuntime: docker | ||
Kubernetes: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this Kubernetes
used for?
this operator can only be used for k8s
fluentd: | ||
|
||
fluentd: | ||
enable: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need resources for fluentd as well, @zhu733756 do you have any suggest values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need resources for fluentd as well, @zhu733756 do you have any suggest values?
I have some suggests below, totally lgtm.
charts/fluent-operator/values.yaml
Outdated
#Set this to containerd or crio if you want to collect CRI format logs | ||
containerRuntime: docker | ||
Kubernetes: false | ||
|
||
operator: | ||
image: "kubesphere/fluent-operator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested to
initcontainer:
image: xx
tag: xx
container:
image: xxx
tag: xxx
Or I think initcontainer can hard code in yaml.
charts/fluent-operator/values.yaml
Outdated
forward: | ||
enable: false | ||
host: "fluentd.kubesphere-logging-system.svc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does have anyway to keep host equals with fluentd.name,like host: "{fluentd.name}.kubesphere-logging-system.svc"
, Or this forward is determined by the fluentd section is enough?
charts/fluent-operator/values.yaml
Outdated
name: flentd | ||
port: 24224 | ||
image: "kubesphere/fluentd" | ||
tag: "v1.14.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repo and tag always under the same field named image.
like :
image:
repository: ""
tag: ""
charts/fluent-operator/values.yaml
Outdated
- kube-system | ||
- kubesphere-monitoring-system | ||
#Configure the output plugin parameter in FluentBit. | ||
#You can set enable to true to output logs to the specified location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment here should fix.
charts/fluent-operator/values.yaml
Outdated
initcontainer: | ||
image: "docker" | ||
tag: "19.03" | ||
container: | ||
image: "kubesphere/fluent-operator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image
here suggested to the field repository. I think image
means repository+ tag.
@@ -202,6 +202,26 @@ If your container runtime is `cri-o` | |||
helm upgrade fluentbit-operator --create-namespace -n kubesphere-logging-system charts/fluent-operator/ --set Kubernetes=true,containerRuntime=crio | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fluentbit-operator => fluent-operator
charts/fluent-operator/values.yaml
Outdated
forward: | ||
enable: false | ||
host: "fluentd.kubesphere-logging-system.svc" | ||
host: "kubesphere-logging-system.svc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable: false should keep.
charts/fluent-operator/values.yaml
Outdated
forward: | ||
enable: false | ||
host: "fluentd.kubesphere-logging-system.svc" | ||
host: "kubesphere-logging-system.svc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think host and port should be removed and only defined in fluentd part. We should keep host and port defined in one place. Besides, forward.enabled to enable or disable the function of fluentd is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do u guys think of? @benjaminhuo @wenchajun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forward logs to fluentd should be controlled by the fluentd switch, and should be in the fluentd part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I almost get it. Fluentd can enable by its switch for other requirements. And logs from Fluent Bit forwarding to fluentd would use two switches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the forward
profile is controlled by fluentd.enable
and no dedicated forward profile is being set up. Is this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If suggested to remove Fluentbit forward part and needs some docs to implement this case. User's confusion about the forward plugin can be defined to other fluentds. In addition, one fluentd activated, there must be one service, the docs also should implement this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fluentbit forwarding to fluentd is only required when fluentd is enabled and there is requirements to receive logs from fluentbit. Fluentd can also receive logs from non-fluentd source such as HTTP or syslog
No need to add fluentbit forward CR in fluentbit configs because you don't know if the fluentd is enabled in fluentbit config.
1d258f3
to
353d70b
Compare
@@ -112,19 +112,19 @@ Fluent Bit Operator supports `docker` as well as `containerd` and `CRI-O`. `cont | |||
If your container runtime is `docker` | |||
|
|||
```shell | |||
helm install fluentbit-operator --create-namespace -n kubesphere-logging-system charts/fluent-operator/ --set containerRuntime=docker | |||
helm install fluent-operator --create-namespace -n kubesphere-logging-system charts/fluent-operator/ --set containerRuntime=docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namespace should use an env variable to set before any helm install cmd, and reference this env in the following helm install cmd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
helm does not initially support the environment variable approach for security reasons. Please see:helm/helm#944 . helm3 can use set
to set environment variables. But I don't think there is much difference between this way and the previous one. Perhaps we could create a namespace.yaml
file and change its namespace by setting the value in value.yaml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use {{ .Release.Namespace }}
to tell the CRs what's namespace the helm used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, maybe we needn't change the namespace as a helm parameter.
My concern is this is a community project now, the kubesphere namespace is not appropriate anymore.
We might need to use a namespace like fluent
for readme, helm, YAML and samples
@wenchajun you can do this in another PR and @zhu733756 can help to review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,I will revise and test as soon as possible
Signed-off-by: chengdehao <wenchajun@gmail.com>
Signed-off-by: chengdehao wenchajun@gmail.com