Skip to content

GitOps support

Mikhail Mazurskiy requested to merge ash2k/gitops3 into master

This MR implements design two from https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/doc/gitops.md

Demo https://youtu.be/jKT25JvTt9E

These files were generated, don't need to review them:

  • build/repositories.bzl - generated by make update-repos. It runs gazelle to import code dependencies from go.sum into Bazel's dependency system. It's a lot of stuff because gitops-engine depends on Kubernetes directly and so we are pulling in all the Kubernetes' dependencies. See https://github.com/argoproj/gitops-engine/issues/56
  • BUILD.bazel - generated by make update-bazel. It also runs gazelle, which parses go source files and creates/updates/deletes build files and rule instantiations in them. Some of these generated files were altered by hand to make minor tweaks, but that is 1% of them. Re-running gazelle preserves modifications and this is the intended way to use it.
  • pkg/agentcfg/agentcfg.pb.go generated by running make regenerate-proto which invokes bazel which runs proto compiler for pkg/agentcfg/agentcfg.proto. See go_proto_compile in the build file. go_proto_compile and go_grpc_compile come from rules_proto_grpc.
  • pkg/agentrpc/agentrpc.pb.go - same as above but for pkg/agentrpc/agentrpc.proto. proto compiler was invoked with the gRPC plugin. See go_grpc_compile in the build file.
  • go.sum, as you probably know, is the "lock" file used by Go's modules.
Edited by GitLab Release Tools Bot

Merge request reports

Loading