forked from coryodaniel/bonny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwidget.ex
34 lines (28 loc) · 820 Bytes
/
widget.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# credo:disable-for-this-file
defmodule Widget do
@moduledoc false
use Bonny.Controller
require Logger
@rule {"apps", ["deployments", "services"], ["*"]}
@rule {"", ["configmaps"], ["create", "read"]}
@additional_printer_columns [
%{
name: "test",
type: "string",
description: "test",
JSONPath: ".spec.test"
}
]
@impl true
@spec add(map()) :: :ok | :error
def add(obj), do: Logger.info("add: #{inspect(obj)}")
@impl true
@spec modify(map()) :: :ok | :error
def modify(obj), do: Logger.info("modify: #{inspect(obj)}")
@impl true
@spec delete(map()) :: :ok | :error
def delete(obj), do: Logger.info("delete: #{inspect(obj)}")
@impl true
@spec reconcile(map()) :: :ok | :error
def reconcile(obj), do: Logger.info("reconcile: #{inspect(obj)}")
end