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

Rename operator component to ops #940

Merged
merged 2 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ buildifier(

genrule(
name = "copy_piped",
srcs = ["//cmd/piped"],
srcs = ["//cmd/piped:piped"],
outs = ["piped"],
cmd = "cp $< $@",
)
Expand All @@ -56,5 +56,5 @@ genrule(
# gazelle:exclude pkg/model/project.pb.validate.go
# gazelle:exclude pkg/model/role.pb.validate.go
# gazelle:exclude pkg/model/user.pb.validate.go
# gazelle:exclude pkg/app/operator/handler/templates.embed.go
# gazelle:exclude pkg/app/ops/handler/templates.embed.go
# gazelle:exclude pkg/app/api/api/deployment_config_templates.embed.go
2 changes: 1 addition & 1 deletion cmd/image.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def all_images():
"api": "api",
"piped": "piped",
"web": "web",
"operator": "operator",
"ops": "ops",
"helloworld": "helloworld",
}
images = {}
Expand Down
2 changes: 0 additions & 2 deletions cmd/operator/OWNERS

This file was deleted.

12 changes: 6 additions & 6 deletions cmd/operator/BUILD.bazel → cmd/ops/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ load("//bazel:image.bzl", "app_image")
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "github.com/pipe-cd/pipe/cmd/operator",
importpath = "github.com/pipe-cd/pipe/cmd/ops",
visibility = ["//visibility:private"],
deps = [
"//pkg/app/operator/cmd/server:go_default_library",
"//pkg/app/ops/cmd/server:go_default_library",
"//pkg/cli:go_default_library",
],
)

go_binary(
name = "operator",
name = "ops",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)

app_image(
name = "operator",
binary = ":operator",
repository = "operator",
name = "ops",
binary = ":ops",
repository = "ops",
visibility = ["//visibility:public"],
)
2 changes: 2 additions & 0 deletions cmd/ops/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
labels:
- area/ops
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/operator/main.go → cmd/ops/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ package main
import (
"log"

"github.com/pipe-cd/pipe/pkg/app/operator/cmd/server"
"github.com/pipe-cd/pipe/pkg/app/ops/cmd/server"
"github.com/pipe-cd/pipe/pkg/cli"
)

func main() {
app := cli.NewApp(
"operator",
"ops",
"A single component for operating owner tasks such as adding new project, deleting old data.",
)
app.AddCommands(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ description: >
This page describes how to set up a new project.
---

The control plane operator can add a new project for a team.
Project adding can be simply done from an internal web page prepared for the operator.
Because that web service is running in an `operator` pod, so in order to access it, using `kubectl port-forward` command to forward a local port to a port on the `operator` pod as following:
The control plane ops can add a new project for a team.
Project adding can be simply done from an internal web page prepared for the ops.
Because that web service is running in an `ops` pod, so in order to access it, using `kubectl port-forward` command to forward a local port to a port on the `ops` pod as following:

``` console
kubectl port-forward service/pipecd-operator 9082
kubectl port-forward service/pipecd-ops 9082
```

Then, access to [http://localhost:9082](http://localhost:9082).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ The control plane is a centralized part of PipeCD. It contains several services

`cache` is a single pod service for caching internal data used by `api` service. Currently, this `cache` service is using the `redis` docker image. You can configure the control plane to use a fully-managed redis cache service instead of launching a cache pod in your cluster.

##### Operator
##### Ops

`operator` is a single pod service for operating PipeCD owner's tasks.
`ops` is a single pod service for operating PipeCD owner's tasks.
For example, it provides an internal web page for adding and managing projects; it periodically removes the old data; it collects and saves the deployment insights.

##### Data Store
Expand Down
Binary file modified docs/static/images/control-plane-components.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions pkg/app/operator/OWNERS

This file was deleted.

2 changes: 2 additions & 0 deletions pkg/app/ops/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
labels:
- area/ops
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["server.go"],
importpath = "github.com/pipe-cd/pipe/pkg/app/operator/cmd/server",
importpath = "github.com/pipe-cd/pipe/pkg/app/ops/cmd/server",
visibility = ["//visibility:public"],
deps = [
"//pkg/admin:go_default_library",
"//pkg/app/operator/handler:go_default_library",
"//pkg/app/ops/handler:go_default_library",
"//pkg/cli:go_default_library",
"//pkg/config:go_default_library",
"//pkg/datastore:go_default_library",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"golang.org/x/sync/errgroup"

"github.com/pipe-cd/pipe/pkg/admin"
"github.com/pipe-cd/pipe/pkg/app/operator/handler"
"github.com/pipe-cd/pipe/pkg/app/ops/handler"
"github.com/pipe-cd/pipe/pkg/cli"
"github.com/pipe-cd/pipe/pkg/config"
"github.com/pipe-cd/pipe/pkg/datastore"
Expand All @@ -51,7 +51,7 @@ func NewCommand() *cobra.Command {
}
cmd := &cobra.Command{
Use: "server",
Short: "Start running operator server.",
Short: "Start running ops server.",
RunE: cli.WithContext(s.run),
}
cmd.Flags().IntVar(&s.httpPort, "http-port", s.httpPort, "The port number used to run http server.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go_library(
"handler.go",
":templates.embed", #keep
],
importpath = "github.com/pipe-cd/pipe/pkg/app/operator/handler",
importpath = "github.com/pipe-cd/pipe/pkg/app/ops/handler",
visibility = ["//visibility:public"],
deps = [
"//pkg/config:go_default_library",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["collector.go"],
importpath = "github.com/pipe-cd/pipe/pkg/app/operator/insightcollector",
importpath = "github.com/pipe-cd/pipe/pkg/app/ops/insightcollector",
visibility = ["//visibility:public"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["cleaner.go"],
importpath = "github.com/pipe-cd/pipe/pkg/app/operator/modelcleaner",
importpath = "github.com/pipe-cd/pipe/pkg/app/ops/modelcleaner",
visibility = ["//visibility:public"],
)