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

[Feature]: Add minio remote cache support in the operator #464

Open
2 tasks done
arbreezy opened this issue Jul 7, 2024 · 3 comments · May be fixed by #521
Open
2 tasks done

[Feature]: Add minio remote cache support in the operator #464

arbreezy opened this issue Jul 7, 2024 · 3 comments · May be fixed by #521
Assignees

Comments

@arbreezy
Copy link
Member

arbreezy commented Jul 7, 2024

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature request in the K8sGPT Slack and got positive feedback

Is this feature request related to a problem?

None

Problem Description

No response

Solution Description

We have recently added Minio as another remote cache storage, to hold K8sGPT's findings.

In order to have feature parity, it will be great to add it in the operator's config as well

Benefits

Feature parity with K8sGPT

Potential Drawbacks

No response

Additional Information

There is already a GRPC proto schema to support minio S3-like api

and the original PR has included the server mode changes

@chetak123
Copy link

I would like to take up this issue please,

Also I'm new to this operator ecosystem and trying to find my way,
So I would be grateful if you could please point me what operator's config is.

@aghilish
Copy link

@arbreezy
hey, I'm new to k8sgpt and would like to contribute to the operator of it.

I am currently working on this feature. I tried to use the S3_cache schema in pkg/client/config.go
by using sth like

if config.Spec.RemoteCache.MinIO != nil {
			req.Cache = &schemav1.Cache{
				CacheType: &schemav1.Cache_S3Cache{
					S3Cache: &schemav1.S3Cache{
						BucketName: config.Spec.RemoteCache.MinIO.BucketName,
						Endpoint:   config.Spec.RemoteCache.MinIO.Endpoint,
					},
				},
			}
		}

But i get this error during reconciliation loop

Finished Reconciling k8sGPT with error: failed to call AddConfig RPC: rpc error: code = Unimplemented desc = unknown service schema.v1.ServerConfigService
2024-09-23T11:32:52Z	ERROR	Reconciler error	{"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "K8sGPT": {"name":"k8sgpt-sample","namespace":"k8sgpt-operator-system"}, "namespace": "k8sgpt-operator-system", "name": "k8sgpt-sample", "reconcileID": "d0a14f69-ad49-4dca-a546-aa83836069d4", "error": "failed to call AddConfig RPC: rpc error: code = Unimplemented desc = unknown service schema.v1.ServerConfigService"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:324
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:265
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:226

does this require changing the schema/protobuf ? or changing the server implementation ?

@chetak123 I might be able to create a PR soon, you can have a look at changes and suggest improvements.

@AlexsJones
Copy link
Member

Please make sure you pull the latest four SDK's that are part of the RPC stack https://buf.build/k8sgpt-ai/k8sgpt/sdks

Follow these instructions to get the generated SDK for k8sgpt-ai/k8sgpt at main using v1.34.2 of protocolbuffers/go.More details on Go SDKs
go get buf.build/gen/go/k8sgpt-ai/k8sgpt/protocolbuffers/go@latest
Copy to clipboard
grpc/go

v1.5.1
Follow these instructions to get the generated SDK for k8sgpt-ai/k8sgpt at main using v1.5.1 of grpc/go.More details on Go SDKs
go get buf.build/gen/go/k8sgpt-ai/k8sgpt/grpc/go@latest
Copy to clipboard
connectrpc/go

v1.17.0
Follow these instructions to get the generated SDK for k8sgpt-ai/k8sgpt at main using v1.17.0 of connectrpc/go.More details on Go SDKs
go get buf.build/gen/go/k8sgpt-ai/k8sgpt/connectrpc/go@latest
Copy to clipboard
grpc-ecosystem/gateway

v2.22.0
Follow these instructions to get the generated SDK for k8sgpt-ai/k8sgpt at main using v2.22.0 of grpc-ecosystem/gateway.More details on Go SDKs
go get buf.build/gen/go/k8sgpt-ai/k8sgpt/grpc-ecosystem/gateway/v2@latest

aghilish added a commit to aghilish/k8sgpt-operator that referenced this issue Sep 30, 2024
aghilish added a commit to aghilish/k8sgpt-operator that referenced this issue Sep 30, 2024
aghilish added a commit to aghilish/k8sgpt-operator that referenced this issue Sep 30, 2024
aghilish added a commit to aghilish/k8sgpt-operator that referenced this issue Sep 30, 2024
aghilish added a commit to aghilish/k8sgpt-operator that referenced this issue Sep 30, 2024
Signed-off-by: Shahrooz Aghili <[email protected]>
@aghilish aghilish linked a pull request Sep 30, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants