Skip to content

Instantly share code, notes, and snippets.

@grebneerg
Last active August 12, 2022 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grebneerg/00c187f3037e016bb57a7344786e4230 to your computer and use it in GitHub Desktop.
Save grebneerg/00c187f3037e016bb57a7344786e4230 to your computer and use it in GitHub Desktop.
gort db dump with no admin permissions for cli
bundle_name bundle_version command_name io_type advanced
gort 0.0.1 help input false
gort 0.0.1 help output false
gort 0.0.1 schedule input false
gort 0.0.1 schedule output false
gort 0.0.1 bundle input false
gort 0.0.1 bundle output false
gort 0.0.1 group input false
gort 0.0.1 group output false
gort 0.0.1 user input false
gort 0.0.1 user output false
gort 0.0.1 version input false
gort 0.0.1 version output false
gort 0.0.1 whoami input false
gort 0.0.1 whoami output false
gort 0.0.1 config input false
gort 0.0.1 config output false
gort 0.0.1 role input false
gort 0.0.1 role output false
testing 0.0.1 title-color input false
testing 0.0.1 title-color output false
testing 0.0.1 title-nocolor input false
testing 0.0.1 title-nocolor output false
testing 0.0.1 date input false
testing 0.0.1 date output false
testing 0.0.1 echo input false
testing 0.0.1 echo output false
testing 0.0.1 kubectl input false
testing 0.0.1 kubectl output false
testing 0.0.1 kubectl-small-blocks input false
testing 0.0.1 kubectl-small-blocks output false
testing 0.0.1 noheader input false
testing 0.0.1 noheader output false
testing 0.0.1 notitle-color input false
testing 0.0.1 notitle-color output false
testing 0.0.1 notitle-nocolor input false
testing 0.0.1 notitle-nocolor output false
incidents 0.0.1 bookmark input true
incidents 0.0.1 bookmark output false
create table bundle_command_io
(
bundle_name text not null,
bundle_version text not null,
command_name text not null,
io_type text not null,
advanced boolean not null,
primary key (bundle_name, bundle_version, command_name, io_type),
foreign key (bundle_name, bundle_version, command_name) references bundle_commands
on delete cascade
);
alter table bundle_command_io
owner to gort;
create unique index bundle_command_io_pkey
on bundle_command_io (bundle_name, bundle_version, command_name, io_type);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'help', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'help', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'schedule', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'schedule', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'bundle', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'bundle', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'group', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'group', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'user', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'user', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'version', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'version', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'whoami', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'whoami', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'config', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'config', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'role', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('gort', '0.0.1', 'role', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'title-color', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'title-color', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'title-nocolor', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'title-nocolor', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'date', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'date', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'echo', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'echo', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'kubectl', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'kubectl', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'kubectl-small-blocks', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'kubectl-small-blocks', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'noheader', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'noheader', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'notitle-color', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'notitle-color', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'notitle-nocolor', 'input', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('testing', '0.0.1', 'notitle-nocolor', 'output', false);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('incidents', '0.0.1', 'bookmark', 'input', true);
INSERT INTO public.bundle_command_io (bundle_name, bundle_version, command_name, io_type, advanced) VALUES ('incidents', '0.0.1', 'bookmark', 'output', false);
bundle_name bundle_version command_name rule
gort 0.0.1 help allow
gort 0.0.1 schedule allow
gort 0.0.1 bundle must have gort:manage_commands
gort 0.0.1 group must have gort:manage_groups
gort 0.0.1 user must have gort:manage_users
gort 0.0.1 version allow
gort 0.0.1 whoami allow
gort 0.0.1 config must have gort:manage_configs
gort 0.0.1 role must have gort:manage_roles
testing 0.0.1 title-color allow
testing 0.0.1 title-nocolor allow
testing 0.0.1 date allow
testing 0.0.1 echo allow
testing 0.0.1 kubectl allow
testing 0.0.1 kubectl-small-blocks allow
testing 0.0.1 noheader allow
testing 0.0.1 notitle-color allow
testing 0.0.1 notitle-nocolor allow
incidents 0.0.1 bookmark allow
create table bundle_command_rules
(
bundle_name text not null,
bundle_version text not null,
command_name text not null,
rule text not null
constraint bundle_command_rules_rule_check
check (rule <> ''::text),
primary key (bundle_name, bundle_version, command_name, rule),
constraint bundle_command_rules_bundle_name_bundle_version_command_na_fkey
foreign key (bundle_name, bundle_version, command_name) references bundle_commands
on delete cascade
);
alter table bundle_command_rules
owner to gort;
create unique index bundle_command_rules_pkey
on bundle_command_rules (bundle_name, bundle_version, command_name, rule);
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'help', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'schedule', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'bundle', 'must have gort:manage_commands');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'group', 'must have gort:manage_groups');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'user', 'must have gort:manage_users');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'version', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'whoami', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'config', 'must have gort:manage_configs');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('gort', '0.0.1', 'role', 'must have gort:manage_roles');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'title-color', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'title-nocolor', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'date', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'echo', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'kubectl', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'kubectl-small-blocks', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'noheader', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'notitle-color', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('testing', '0.0.1', 'notitle-nocolor', 'allow');
INSERT INTO public.bundle_command_rules (bundle_name, bundle_version, command_name, rule) VALUES ('incidents', '0.0.1', 'bookmark', 'allow');
bundle_name bundle_version command_name command command_error message message_error
gort 0.0.1 help
gort 0.0.1 schedule
gort 0.0.1 bundle
gort 0.0.1 group
gort 0.0.1 user
gort 0.0.1 version
gort 0.0.1 whoami
gort 0.0.1 config
gort 0.0.1 role
testing 0.0.1 title-color :- {{ header | color "#0000CD" | title "This is a header title" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}
testing 0.0.1 title-nocolor :- {{ header | title "This is a header title" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}
testing 0.0.1 date
testing 0.0.1 echo
testing 0.0.1 kubectl {{ header | color "#0000CD" | title "This is a title"}} {{ text | monospace true }} kubectl controls the Kubernetes cluster manager. Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/ Basic Commands (Beginner): create Create a resource from a file or from stdin. expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service run Run a particular image on the cluster set Set specific features on objects Basic Commands (Intermediate): explain Documentation of resources get Display one or many resources edit Edit a resource on the server delete Delete resources by filenames, stdin, resources and names, or by resources and label selector Deploy Commands: rollout Manage the rollout of a resource scale Set a new size for a Deployment, ReplicaSet or Replication Controller autoscale Auto-scale a Deployment, ReplicaSet, StatefulSet, or ReplicationController Cluster Management Commands: certificate Modify certificate resources. cluster-info Display cluster info top Display Resource (CPU/Memory) usage. cordon Mark node as unschedulable uncordon Mark node as schedulable drain Drain node in preparation for maintenance taint Update the taints on one or more nodes Troubleshooting and Debugging Commands: describe Show details of a specific resource or group of resources logs Print the logs for a container in a pod attach Attach to a running container exec Execute a command in a container port-forward Forward one or more local ports to a pod proxy Run a proxy to the Kubernetes API server cp Copy files and directories to and from containers. auth Inspect authorization debug Create debugging sessions for troubleshooting workloads and nodes Advanced Commands: diff Diff live version against would-be applied version apply Apply a configuration to a resource by filename or stdin patch Update field(s) of a resource replace Replace a resource by filename or stdin wait Experimental: Wait for a specific condition on one or many resources. kustomize Build a kustomization target from a directory or URL. Settings Commands: label Update the labels on a resource annotate Update the annotations on a resource completion Output shell completion code for the specified shell (bash or zsh) Other Commands: api-resources Print the supported API resources on the server api-versions Print the supported API versions on the server, in the form of "group/version" config Modify kubeconfig files plugin Provides utilities for interacting with plugins. version Print the client and server version information Usage: kubectl [flags] [options] Use "kubectl <command> --help" for more information about a given command. Use "kubectl options" for a list of global command-line options (applies to all commands). {{ endtext }}
testing 0.0.1 kubectl-small-blocks {{ header | color "#0000CD" | title "This is a title"}} {{ text | monospace true }}kubectl controls the Kubernetes cluster manager. Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/{{ endtext }} {{ text | monospace true }}Basic Commands (Beginner): create Create a resource from a file or from stdin. expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service run Run a particular image on the cluster set Set specific features on objects{{ endtext }} {{ text | monospace true }}Basic Commands (Intermediate): explain Documentation of resources get Display one or many resources edit Edit a resource on the server delete Delete resources by filenames, stdin, resources and names, or by resources and label selector{{ endtext }} {{ text | monospace true }}Deploy Commands: rollout Manage the rollout of a resource scale Set a new size for a Deployment, ReplicaSet or Replication Controller autoscale Auto-scale a Deployment, ReplicaSet, StatefulSet, or ReplicationController{{ endtext }} {{ text | monospace true }}Cluster Management Commands: certificate Modify certificate resources. cluster-info Display cluster info top Display Resource (CPU/Memory) usage. cordon Mark node as unschedulable uncordon Mark node as schedulable drain Drain node in preparation for maintenance taint Update the taints on one or more nodes{{ endtext }} {{ text | monospace true }}Troubleshooting and Debugging Commands: describe Show details of a specific resource or group of resources logs Print the logs for a container in a pod attach Attach to a running container exec Execute a command in a container port-forward Forward one or more local ports to a pod proxy Run a proxy to the Kubernetes API server cp Copy files and directories to and from containers. auth Inspect authorization debug Create debugging sessions for troubleshooting workloads and nodes{{ endtext }} {{ text | monospace true }}Advanced Commands: diff Diff live version against would-be applied version apply Apply a configuration to a resource by filename or stdin patch Update field(s) of a resource replace Replace a resource by filename or stdin wait Experimental: Wait for a specific condition on one or many resources. kustomize Build a kustomization target from a directory or URL.{{ endtext }} {{ text | monospace true }}Settings Commands: label Update the labels on a resource annotate Update the annotations on a resource completion Output shell completion code for the specified shell (bash or zsh){{ endtext }} {{ text | monospace true }}Other Commands: api-resources Print the supported API resources on the server api-versions Print the supported API versions on the server, in the form of "group/version" config Modify kubeconfig files plugin Provides utilities for interacting with plugins. version Print the client and server version information{{ endtext }} {{ text | monospace true }}Usage: kubectl [flags] [options] Use "kubectl <command> --help" for more information about a given command. Use "kubectl options" for a list of global command-line options (applies to all commands).{{ endtext }}
testing 0.0.1 noheader :- {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}
testing 0.0.1 notitle-color :- {{ header | color "#0000CD" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}
testing 0.0.1 notitle-nocolor :- {{ header }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}
incidents 0.0.1 bookmark
create table bundle_command_templates
(
bundle_name text not null,
bundle_version text not null,
command_name text not null,
command text,
command_error text,
message text,
message_error text,
constraint unq_bundle_command_templates
primary key (bundle_name, bundle_version, command_name),
constraint bundle_command_templates_bundle_name_bundle_version_comman_fkey
foreign key (bundle_name, bundle_version, command_name) references bundle_commands
on delete cascade
);
alter table bundle_command_templates
owner to gort;
create unique index unq_bundle_command_templates
on bundle_command_templates (bundle_name, bundle_version, command_name);
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'help', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'schedule', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'bundle', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'group', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'user', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'version', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'whoami', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'config', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('gort', '0.0.1', 'role', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'title-color', ':- {{ header | color "#0000CD" | title "This is a header title" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'title-nocolor', ':- {{ header | title "This is a header title" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'date', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'echo', '', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'kubectl', '{{ header | color "#0000CD" | title "This is a title"}}
{{ text | monospace true }}
kubectl controls the Kubernetes cluster manager.
Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/
Basic Commands (Beginner):
create Create a resource from a file or from stdin.
expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
run Run a particular image on the cluster
set Set specific features on objects
Basic Commands (Intermediate):
explain Documentation of resources
get Display one or many resources
edit Edit a resource on the server
delete Delete resources by filenames, stdin, resources and names, or by resources and label selector
Deploy Commands:
rollout Manage the rollout of a resource
scale Set a new size for a Deployment, ReplicaSet or Replication Controller
autoscale Auto-scale a Deployment, ReplicaSet, StatefulSet, or ReplicationController
Cluster Management Commands:
certificate Modify certificate resources.
cluster-info Display cluster info
top Display Resource (CPU/Memory) usage.
cordon Mark node as unschedulable
uncordon Mark node as schedulable
drain Drain node in preparation for maintenance
taint Update the taints on one or more nodes
Troubleshooting and Debugging Commands:
describe Show details of a specific resource or group of resources
logs Print the logs for a container in a pod
attach Attach to a running container
exec Execute a command in a container
port-forward Forward one or more local ports to a pod
proxy Run a proxy to the Kubernetes API server
cp Copy files and directories to and from containers.
auth Inspect authorization
debug Create debugging sessions for troubleshooting workloads and nodes
Advanced Commands:
diff Diff live version against would-be applied version
apply Apply a configuration to a resource by filename or stdin
patch Update field(s) of a resource
replace Replace a resource by filename or stdin
wait Experimental: Wait for a specific condition on one or many resources.
kustomize Build a kustomization target from a directory or URL.
Settings Commands:
label Update the labels on a resource
annotate Update the annotations on a resource
completion Output shell completion code for the specified shell (bash or zsh)
Other Commands:
api-resources Print the supported API resources on the server
api-versions Print the supported API versions on the server, in the form of "group/version"
config Modify kubeconfig files
plugin Provides utilities for interacting with plugins.
version Print the client and server version information
Usage:
kubectl [flags] [options]
Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).
{{ endtext }}', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'kubectl-small-blocks', '{{ header | color "#0000CD" | title "This is a title"}}
{{ text | monospace true }}kubectl controls the Kubernetes cluster manager.
Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/{{ endtext }}
{{ text | monospace true }}Basic Commands (Beginner):
create Create a resource from a file or from stdin.
expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
run Run a particular image on the cluster
set Set specific features on objects{{ endtext }}
{{ text | monospace true }}Basic Commands (Intermediate):
explain Documentation of resources
get Display one or many resources
edit Edit a resource on the server
delete Delete resources by filenames, stdin, resources and names, or by resources and label selector{{ endtext }}
{{ text | monospace true }}Deploy Commands:
rollout Manage the rollout of a resource
scale Set a new size for a Deployment, ReplicaSet or Replication Controller
autoscale Auto-scale a Deployment, ReplicaSet, StatefulSet, or ReplicationController{{ endtext }}
{{ text | monospace true }}Cluster Management Commands:
certificate Modify certificate resources.
cluster-info Display cluster info
top Display Resource (CPU/Memory) usage.
cordon Mark node as unschedulable
uncordon Mark node as schedulable
drain Drain node in preparation for maintenance
taint Update the taints on one or more nodes{{ endtext }}
{{ text | monospace true }}Troubleshooting and Debugging Commands:
describe Show details of a specific resource or group of resources
logs Print the logs for a container in a pod
attach Attach to a running container
exec Execute a command in a container
port-forward Forward one or more local ports to a pod
proxy Run a proxy to the Kubernetes API server
cp Copy files and directories to and from containers.
auth Inspect authorization
debug Create debugging sessions for troubleshooting workloads and nodes{{ endtext }}
{{ text | monospace true }}Advanced Commands:
diff Diff live version against would-be applied version
apply Apply a configuration to a resource by filename or stdin
patch Update field(s) of a resource
replace Replace a resource by filename or stdin
wait Experimental: Wait for a specific condition on one or many resources.
kustomize Build a kustomization target from a directory or URL.{{ endtext }}
{{ text | monospace true }}Settings Commands:
label Update the labels on a resource
annotate Update the annotations on a resource
completion Output shell completion code for the specified shell (bash or zsh){{ endtext }}
{{ text | monospace true }}Other Commands:
api-resources Print the supported API resources on the server
api-versions Print the supported API versions on the server, in the form of "group/version"
config Modify kubeconfig files
plugin Provides utilities for interacting with plugins.
version Print the client and server version information{{ endtext }}
{{ text | monospace true }}Usage:
kubectl [flags] [options]
Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).{{ endtext }}', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'noheader', ':- {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'notitle-color', ':- {{ header | color "#0000CD" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('testing', '0.0.1', 'notitle-nocolor', ':- {{ header }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}', '', '', '');
INSERT INTO public.bundle_command_templates (bundle_name, bundle_version, command_name, command, command_error, message, message_error) VALUES ('incidents', '0.0.1', 'bookmark', '', '', '', '');
bundle_name bundle_version command_name match
gort 0.0.1 version gort version
create table bundle_command_triggers
(
bundle_name text not null,
bundle_version text not null,
command_name text not null,
match text not null,
primary key (bundle_name, bundle_version, command_name, match),
constraint bundle_command_triggers_bundle_name_bundle_version_command_fkey
foreign key (bundle_name, bundle_version, command_name) references bundle_commands
on delete cascade
);
alter table bundle_command_triggers
owner to gort;
create unique index bundle_command_triggers_pkey
on bundle_command_triggers (bundle_name, bundle_version, command_name, match);
INSERT INTO public.bundle_command_triggers (bundle_name, bundle_version, command_name, match) VALUES ('gort', '0.0.1', 'version', 'gort version');
bundle_name bundle_version name description executable long_description
gort 0.0.1 help Provides information about a command %2Fbin%2Fgort,hidden,command Provides information about a command. If no command is specified, this will list all commands installed in Gort. Usage: gort:help [flags] [command]
gort 0.0.1 schedule Schedules a command to run periodically %2Fbin%2Fgort,schedule,create Schedules a command to run periodically. Usage: gort:schedule "cron" "command"
gort 0.0.1 bundle Perform operations on bundles %2Fbin%2Fgort,bundle Allows you to perform bundle administration. Usage: gort:bundle [command] Available Commands: disable Disable a bundle by name enable Enable the specified version of the bundle info Info a bundle install Install a bundle list List all bundles installed uninstall Uninstall bundles yaml Retrieve the raw YAML for a bundle. Flags: -h, --help help for bundle
gort 0.0.1 group Manage Cog user groups %2Fbin%2Fgort,group Manage Cog user groups. Usage: gort:group [command] Available Commands: add Add a user to an existing group create Create a new group delete Delete an existing group grant Grant a role to an existing group info Show info on a specific group list List all existing groups remove Remove a user from an existing group revoke Remove a role from an existing group Flags: -h, --help help for group
gort 0.0.1 user Allows you to perform user administration %2Fbin%2Fgort,user Allows you to perform user administration. Usage: gort:user [command] Available Commands: create Create a new user delete Deletes an existing user info Retrieve information about an existing user list List all existing users update Update an existing user Flags: -h, --help help for user
gort 0.0.1 version Displays version and build information %2Fbin%2Fgort,version Displays version and build information. Usage: gort:version [flags] Flags: -h, --help help for version -s, --short Print only the version number
gort 0.0.1 whoami Provides your basic identity and account information %2Fbin%2Fgort,hidden,whoami Provides your basic identity and account information. Usage: gort:whoami
gort 0.0.1 config Get or set dynamic configurations %2Fbin%2Fgort,config Allows you to perform bundle administration. Usage: gort:config [command] Available Commands: delete Delete an existing dynamic configuration get Get a dynamic configuration by key list List configurations for a particular bundle set Set a dynamic configuration Flags: -h, --help help for config
gort 0.0.1 role Allows you to perform role administration %2Fbin%2Fgort,role Allows you to perform role administration. Usage: gort:role [command] Available Commands: create Create a role delete Delete an existing role grant Grant a permission to an existing role list List all existing roles revoke-permission Revoke a permission from a role Flags: -h, --help help for role
testing 0.0.1 title-color Display the date and time. %2Fbin%2Fdate
testing 0.0.1 title-nocolor Display the date and time. %2Fbin%2Fdate
testing 0.0.1 date Display the date and time. %2Fbin%2Fdate
testing 0.0.1 echo Echos back anything sent to it. %2Fbin%2Fecho
testing 0.0.1 kubectl This is kubectl. Its help is very long. %2Fbin%2Fecho
testing 0.0.1 kubectl-small-blocks This is kubectl. Its help is very long. %2Fbin%2Fecho
testing 0.0.1 noheader Display the date and time. %2Fbin%2Fdate
testing 0.0.1 notitle-color Display the date and time. %2Fbin%2Fdate
testing 0.0.1 notitle-nocolor Display the date and time. %2Fbin%2Fdate
incidents 0.0.1 bookmark Bookmarks relevant links in a pagerduty incident slack channel. %2Fbundle%2Fbookmark
create table bundle_commands
(
bundle_name text not null,
bundle_version text not null,
name text not null
constraint bundle_commands_name_check
check (name <> ''::text),
description text not null,
executable text not null,
long_description text,
constraint unq_bundle_command
primary key (bundle_name, bundle_version, name),
foreign key (bundle_name, bundle_version) references bundles
on delete cascade
);
alter table bundle_commands
owner to gort;
create unique index unq_bundle_command
on bundle_commands (bundle_name, bundle_version, name);
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'help', 'Provides information about a command', '%2Fbin%2Fgort,hidden,command', 'Provides information about a command.
If no command is specified, this will list all commands installed in Gort.
Usage:
gort:help [flags] [command]');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'schedule', 'Schedules a command to run periodically', '%2Fbin%2Fgort,schedule,create', 'Schedules a command to run periodically.
Usage:
gort:schedule "cron" "command"');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'bundle', 'Perform operations on bundles', '%2Fbin%2Fgort,bundle', 'Allows you to perform bundle administration.
Usage:
gort:bundle [command]
Available Commands:
disable Disable a bundle by name
enable Enable the specified version of the bundle
info Info a bundle
install Install a bundle
list List all bundles installed
uninstall Uninstall bundles
yaml Retrieve the raw YAML for a bundle.
Flags:
-h, --help help for bundle');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'group', 'Manage Cog user groups', '%2Fbin%2Fgort,group', 'Manage Cog user groups.
Usage:
gort:group [command]
Available Commands:
add Add a user to an existing group
create Create a new group
delete Delete an existing group
grant Grant a role to an existing group
info Show info on a specific group
list List all existing groups
remove Remove a user from an existing group
revoke Remove a role from an existing group
Flags:
-h, --help help for group');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'user', 'Allows you to perform user administration', '%2Fbin%2Fgort,user', 'Allows you to perform user administration.
Usage:
gort:user [command]
Available Commands:
create Create a new user
delete Deletes an existing user
info Retrieve information about an existing user
list List all existing users
update Update an existing user
Flags:
-h, --help help for user');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'version', 'Displays version and build information', '%2Fbin%2Fgort,version', 'Displays version and build information.
Usage:
gort:version [flags]
Flags:
-h, --help help for version
-s, --short Print only the version number');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'whoami', 'Provides your basic identity and account information', '%2Fbin%2Fgort,hidden,whoami', 'Provides your basic identity and account information.
Usage:
gort:whoami');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'config', 'Get or set dynamic configurations', '%2Fbin%2Fgort,config', 'Allows you to perform bundle administration.
Usage:
gort:config [command]
Available Commands:
delete Delete an existing dynamic configuration
get Get a dynamic configuration by key
list List configurations for a particular bundle
set Set a dynamic configuration
Flags:
-h, --help help for config');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('gort', '0.0.1', 'role', 'Allows you to perform role administration', '%2Fbin%2Fgort,role', 'Allows you to perform role administration.
Usage:
gort:role [command]
Available Commands:
create Create a role
delete Delete an existing role
grant Grant a permission to an existing role
list List all existing roles
revoke-permission Revoke a permission from a role
Flags:
-h, --help help for role');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'title-color', 'Display the date and time.', '%2Fbin%2Fdate', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'title-nocolor', 'Display the date and time.', '%2Fbin%2Fdate', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'date', 'Display the date and time.', '%2Fbin%2Fdate', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'echo', 'Echos back anything sent to it.', '%2Fbin%2Fecho', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'kubectl', 'This is kubectl. Its help is very long.', '%2Fbin%2Fecho', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'kubectl-small-blocks', 'This is kubectl. Its help is very long.', '%2Fbin%2Fecho', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'noheader', 'Display the date and time.', '%2Fbin%2Fdate', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'notitle-color', 'Display the date and time.', '%2Fbin%2Fdate', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('testing', '0.0.1', 'notitle-nocolor', 'Display the date and time.', '%2Fbin%2Fdate', '');
INSERT INTO public.bundle_commands (bundle_name, bundle_version, name, description, executable, long_description) VALUES ('incidents', '0.0.1', 'bookmark', 'Bookmarks relevant links in a pagerduty incident slack channel.', '%2Fbundle%2Fbookmark', '');
bundle_name bundle_version
gort 0.0.1
testing 0.0.1
incidents 0.0.1
create table bundle_enabled
(
bundle_name text not null
constraint unq_bundle_enabled
primary key,
bundle_version text not null,
foreign key (bundle_name, bundle_version) references bundles
on delete cascade
);
alter table bundle_enabled
owner to gort;
create unique index unq_bundle_enabled
on bundle_enabled (bundle_name);
INSERT INTO public.bundle_enabled (bundle_name, bundle_version) VALUES ('gort', '0.0.1');
INSERT INTO public.bundle_enabled (bundle_name, bundle_version) VALUES ('testing', '0.0.1');
INSERT INTO public.bundle_enabled (bundle_name, bundle_version) VALUES ('incidents', '0.0.1');
bundle_version bundle_name service_account_name env_secret
0.0.1 gort
0.0.1 testing
0.0.1 incidents
create table bundle_kubernetes
(
bundle_version text not null,
bundle_name text not null,
service_account_name text not null,
env_secret text not null
);
alter table bundle_kubernetes
owner to gort;
INSERT INTO public.bundle_kubernetes (bundle_version, bundle_name, service_account_name, env_secret) VALUES ('0.0.1', 'gort', '', '');
INSERT INTO public.bundle_kubernetes (bundle_version, bundle_name, service_account_name, env_secret) VALUES ('0.0.1', 'testing', '', '');
INSERT INTO public.bundle_kubernetes (bundle_version, bundle_name, service_account_name, env_secret) VALUES ('0.0.1', 'incidents', '', '');
bundle_name bundle_version index permission
gort 0.0.1 0 manage_commands
gort 0.0.1 1 manage_configs
gort 0.0.1 2 manage_groups
gort 0.0.1 3 manage_roles
gort 0.0.1 4 manage_users
create table bundle_permissions
(
bundle_name text not null,
bundle_version text not null,
index integer not null
constraint bundle_permissions_index_check
check (index >= 0),
permission text,
constraint unq_bundle_permission
primary key (bundle_name, bundle_version, index),
foreign key (bundle_name, bundle_version) references bundles
on delete cascade
);
alter table bundle_permissions
owner to gort;
create unique index unq_bundle_permission
on bundle_permissions (bundle_name, bundle_version, index);
INSERT INTO public.bundle_permissions (bundle_name, bundle_version, index, permission) VALUES ('gort', '0.0.1', 0, 'manage_commands');
INSERT INTO public.bundle_permissions (bundle_name, bundle_version, index, permission) VALUES ('gort', '0.0.1', 1, 'manage_configs');
INSERT INTO public.bundle_permissions (bundle_name, bundle_version, index, permission) VALUES ('gort', '0.0.1', 2, 'manage_groups');
INSERT INTO public.bundle_permissions (bundle_name, bundle_version, index, permission) VALUES ('gort', '0.0.1', 3, 'manage_roles');
INSERT INTO public.bundle_permissions (bundle_name, bundle_version, index, permission) VALUES ('gort', '0.0.1', 4, 'manage_users');
bundle_name bundle_version command command_error message message_error
gort 0.0.1
testing 0.0.1 :- {{ header | color "#0000CD" | title "This is a header title" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}
incidents 0.0.1
create table bundle_templates
(
bundle_name text not null,
bundle_version text not null,
command text,
command_error text,
message text,
message_error text,
constraint unq_bundle_template
primary key (bundle_name, bundle_version),
foreign key (bundle_name, bundle_version) references bundles
on delete cascade
);
alter table bundle_templates
owner to gort;
create unique index unq_bundle_template
on bundle_templates (bundle_name, bundle_version);
INSERT INTO public.bundle_templates (bundle_name, bundle_version, command, command_error, message, message_error) VALUES ('gort', '0.0.1', '', '', '', '');
INSERT INTO public.bundle_templates (bundle_name, bundle_version, command, command_error, message, message_error) VALUES ('testing', '0.0.1', ':- {{ header | color "#0000CD" | title "This is a header title" }} {{ text | monospace true }}{{ .Response.Out }}{{ endtext }}', '', '', '');
INSERT INTO public.bundle_templates (bundle_name, bundle_version, command, command_error, message, message_error) VALUES ('incidents', '0.0.1', '', '', '', '');
gort_bundle_version name version author homepage description long_description image_repository image_tag install_timestamp install_user
1 gort 0.0.1 Matt Titmus <matthew.titmus@gmail.com> https://guide.getgort.io The default command bundle. The default command bundle, which contains the administrative commands and the permissions required to use them. Don't change or override this unless you know what you're doing. getgort/gort 0.9.3-dev.3 2022-07-28 16:22:03.994059 +00:00
1 testing 0.0.1 Matt Titmus <matthew.titmus@gmail.com> https://guide.getgort.io A test bundle for testing templates. This is test bundle, for testing templates. ubuntu 20.04 2022-07-28 16:23:00.473354 +00:00
1 incidents 0.0.1 Convenience commands for automating more of the incident lifecycle. incidents latest 2022-08-12 13:46:22.561067 +00:00
create table bundles
(
gort_bundle_version integer not null
constraint bundles_gort_bundle_version_check
check (gort_bundle_version > 0),
name text not null
constraint bundles_name_check
check (name <> ''::text),
version text not null
constraint bundles_version_check
check (version <> ''::text),
author text,
homepage text,
description text not null
constraint bundles_description_check
check (description <> ''::text),
long_description text,
image_repository text,
image_tag text,
install_timestamp timestamp with time zone default now(),
install_user text,
constraint unq_bundle
primary key (name, version)
);
alter table bundles
owner to gort;
create unique index unq_bundle
on bundles (name, version);
INSERT INTO public.bundles (gort_bundle_version, name, version, author, homepage, description, long_description, image_repository, image_tag, install_timestamp, install_user) VALUES (1, 'gort', '0.0.1', 'Matt Titmus <matthew.titmus@gmail.com>', 'https://guide.getgort.io', 'The default command bundle.', 'The default command bundle, which contains the administrative commands and
the permissions required to use them.
Don''t change or override this unless you know what you''re doing.', 'getgort/gort', '0.9.3-dev.3', '2022-07-28 16:22:03.994059 +00:00', '');
INSERT INTO public.bundles (gort_bundle_version, name, version, author, homepage, description, long_description, image_repository, image_tag, install_timestamp, install_user) VALUES (1, 'testing', '0.0.1', 'Matt Titmus <matthew.titmus@gmail.com>', 'https://guide.getgort.io', 'A test bundle for testing templates.', 'This is test bundle, for testing templates.', 'ubuntu', '20.04', '2022-07-28 16:23:00.473354 +00:00', '');
INSERT INTO public.bundles (gort_bundle_version, name, version, author, homepage, description, long_description, image_repository, image_tag, install_timestamp, install_user) VALUES (1, 'incidents', '0.0.1', '', '', 'Convenience commands for automating more of the incident lifecycle.', '', 'incidents', 'latest', '2022-08-12 13:46:22.561067 +00:00', '');
request_id timestamp duration bundle_name bundle_version command_name command_executable command_parameters adapter user_id user_email channel_id gort_user_name result_status result_error
1 2022-07-28 16:22:25.631738 +00:00 2432 gort 0.0.1 whoami %2Fbin%2Fgort,hidden,whoami MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
2 2022-07-28 16:22:58.648378 +00:00 2065 gort 0.0.1 bundle %2Fbin%2Fgort,bundle install https://github.com/getgort/bundles.git//testing MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
3 2022-07-28 16:23:25.260037 +00:00 1781 gort 0.0.1 bundle %2Fbin%2Fgort,bundle enable testing MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
4 2022-07-28 16:23:32.049864 +00:00 1354 testing 0.0.1 date %2Fbin%2Fdate MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
5 2022-08-12 13:46:01.066798 +00:00 4729 gort 0.0.1 whoami %2Fbin%2Fgort,hidden,whoami MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
6 2022-08-12 13:46:21.256184 +00:00 1585 gort 0.0.1 bundle %2Fbin%2Fgort,bundle install https://github.com/grebneerg/testadvancedoutput.git//incident MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
7 2022-08-12 13:46:42.180575 +00:00 1281 gort 0.0.1 bundle %2Fbin%2Fgort,bundle enable incidents MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
8 2022-08-12 13:48:15.667635 +00:00 1179 gort 0.0.1 group %2Fbin%2Fgort,group list MySlack U6UT8EH96 C03PJCXG9SL theprogrammerjack 0
create table commands
(
request_id bigint default nextval('commands_request_id_seq'::regclass) not null,
timestamp timestamp with time zone,
duration integer,
bundle_name text not null,
bundle_version text not null,
command_name text not null,
command_executable text not null,
command_parameters text not null,
adapter text not null,
user_id text not null,
user_email text not null,
channel_id text not null,
gort_user_name text not null,
result_status integer,
result_error text
);
alter table commands
owner to gort;
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (1, '2022-07-28 16:22:25.631738 +00:00', 2432, 'gort', '0.0.1', 'whoami', '%2Fbin%2Fgort,hidden,whoami', '', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (2, '2022-07-28 16:22:58.648378 +00:00', 2065, 'gort', '0.0.1', 'bundle', '%2Fbin%2Fgort,bundle', 'install https://github.com/getgort/bundles.git//testing', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (3, '2022-07-28 16:23:25.260037 +00:00', 1781, 'gort', '0.0.1', 'bundle', '%2Fbin%2Fgort,bundle', 'enable testing', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (4, '2022-07-28 16:23:32.049864 +00:00', 1354, 'testing', '0.0.1', 'date', '%2Fbin%2Fdate', '', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (5, '2022-08-12 13:46:01.066798 +00:00', 4729, 'gort', '0.0.1', 'whoami', '%2Fbin%2Fgort,hidden,whoami', '', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (6, '2022-08-12 13:46:21.256184 +00:00', 1585, 'gort', '0.0.1', 'bundle', '%2Fbin%2Fgort,bundle', 'install https://github.com/grebneerg/testadvancedoutput.git//incident', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (7, '2022-08-12 13:46:42.180575 +00:00', 1281, 'gort', '0.0.1', 'bundle', '%2Fbin%2Fgort,bundle', 'enable incidents', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
INSERT INTO public.commands (request_id, timestamp, duration, bundle_name, bundle_version, command_name, command_executable, command_parameters, adapter, user_id, user_email, channel_id, gort_user_name, result_status, result_error) VALUES (8, '2022-08-12 13:48:15.667635 +00:00', 1179, 'gort', '0.0.1', 'group', '%2Fbin%2Fgort,group', 'list', 'MySlack', 'U6UT8EH96', '', 'C03PJCXG9SL', 'theprogrammerjack', 0, '');
bundle_name layer owner key value secret
create table configs
(
bundle_name text not null
constraint configs_bundle_name_check
check (bundle_name <> ''::text),
layer text not null,
owner text not null,
key text not null,
value text not null,
secret boolean not null
);
alter table configs
owner to gort;
group_name role_name
admin admin
create table group_roles
(
group_name text not null
references groups
on delete cascade,
role_name text not null,
constraint unq_group_role
primary key (group_name, role_name)
);
alter table group_roles
owner to gort;
create unique index unq_group_role
on group_roles (group_name, role_name);
INSERT INTO public.group_roles (group_name, role_name) VALUES ('admin', 'admin');
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
groupname
admin
create table groups
(
groupname text not null
primary key
);
alter table groups
owner to gort;
create unique index groups_pkey
on groups (groupname);
INSERT INTO public.groups (groupname) VALUES ('admin');
groupname username
admin admin
admin theprogrammerjack
create table groupusers
(
groupname text not null
references groups,
username text not null
references users,
primary key (groupname, username)
);
alter table groupusers
owner to gort;
create unique index groupusers_pkey
on groupusers (groupname, username);
INSERT INTO public.groupusers (groupname, username) VALUES ('admin', 'admin');
INSERT INTO public.groupusers (groupname, username) VALUES ('admin', 'theprogrammerjack');
role_name bundle_name permission
admin gort manage_commands
admin gort manage_configs
admin gort manage_groups
admin gort manage_roles
admin gort manage_users
create table role_permissions
(
role_name text not null
references roles
on delete cascade,
bundle_name text not null,
permission text not null,
constraint unq_role_permission
primary key (role_name, bundle_name, permission)
);
alter table role_permissions
owner to gort;
create unique index unq_role_permission
on role_permissions (role_name, bundle_name, permission);
INSERT INTO public.role_permissions (role_name, bundle_name, permission) VALUES ('admin', 'gort', 'manage_commands');
INSERT INTO public.role_permissions (role_name, bundle_name, permission) VALUES ('admin', 'gort', 'manage_configs');
INSERT INTO public.role_permissions (role_name, bundle_name, permission) VALUES ('admin', 'gort', 'manage_groups');
INSERT INTO public.role_permissions (role_name, bundle_name, permission) VALUES ('admin', 'gort', 'manage_roles');
INSERT INTO public.role_permissions (role_name, bundle_name, permission) VALUES ('admin', 'gort', 'manage_users');
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
role_name
admin
create table roles
(
role_name text not null
primary key
);
alter table roles
owner to gort;
create unique index roles_pkey
on roles (role_name);
INSERT INTO public.roles (role_name) VALUES ('admin');
schedule_id adapter channel_id user_id username user_email cron command
create table schedules
(
schedule_id bigint default nextval('schedules_schedule_id_seq'::regclass) not null
primary key,
adapter text not null,
channel_id text not null,
user_id text not null,
username text not null,
user_email text not null,
cron text not null,
command text not null
);
alter table schedules
owner to gort;
create unique index schedules_pkey
on schedules (schedule_id);
token username valid_from valid_until
/TLdzqUjz+io/HRkdU82Cm07enwcaAhf+zqd2LQ18dScPtNYhloa1287kyXp0gaP admin 2022-07-28 16:22:32.069832 +00:00 2022-07-28 16:22:42.069832 +00:00
tZZ/rQOucPnzVliQdCFJO9b1cpUsSowLQaIGPgEzGSYiBRmyWsGpuf0rDKFPl2SO theprogrammerjack 2022-08-12 13:48:15.955269 +00:00 2022-08-12 13:48:25.955269 +00:00
create table tokens
(
token text,
username text not null
primary key
references users,
valid_from timestamp with time zone,
valid_until timestamp with time zone
);
alter table tokens
owner to gort;
create unique index tokens_pkey
on tokens (username);
create unique index tokens_token
on tokens (token);
INSERT INTO public.tokens (token, username, valid_from, valid_until) VALUES ('/TLdzqUjz+io/HRkdU82Cm07enwcaAhf+zqd2LQ18dScPtNYhloa1287kyXp0gaP', 'admin', '2022-07-28 16:22:32.069832 +00:00', '2022-07-28 16:22:42.069832 +00:00');
INSERT INTO public.tokens (token, username, valid_from, valid_until) VALUES ('tZZ/rQOucPnzVliQdCFJO9b1cpUsSowLQaIGPgEzGSYiBRmyWsGpuf0rDKFPl2SO', 'theprogrammerjack', '2022-08-12 13:48:15.955269 +00:00', '2022-08-12 13:48:25.955269 +00:00');
username adapter id
theprogrammerjack MySlack U6UT8EH96
create table user_adapter_ids
(
username text not null
references users
on delete cascade,
adapter text not null,
id text not null,
primary key (adapter, id),
constraint unq_adapter_id
unique (username, adapter)
);
alter table user_adapter_ids
owner to gort;
create unique index user_adapter_ids_pkey
on user_adapter_ids (adapter, id);
create unique index unq_adapter_id
on user_adapter_ids (username, adapter);
INSERT INTO public.user_adapter_ids (username, adapter, id) VALUES ('theprogrammerjack', 'MySlack', 'U6UT8EH96');
email full_name password_hash username
gort@localhost Gort Administrator $2a$04$VW29J.Hvo33w0Zv9xRKwXO4y9X6nMe5pt4nYhaAHWW7ugTWEsaQ5e admin
Jack Greenberg $2a$04$ZXxUikipp/SfdfF24zXTkuNoWusbbGBNa2eY29SkjoFp9uNwOVzSi theprogrammerjack
create table users
(
email text,
full_name text,
password_hash text,
username text not null
primary key
);
alter table users
owner to gort;
create unique index users_pkey
on users (username);
INSERT INTO public.users (email, full_name, password_hash, username) VALUES ('gort@localhost', 'Gort Administrator', '$2a$04$VW29J.Hvo33w0Zv9xRKwXO4y9X6nMe5pt4nYhaAHWW7ugTWEsaQ5e', 'admin');
INSERT INTO public.users (email, full_name, password_hash, username) VALUES ('', 'Jack Greenberg', '$2a$04$ZXxUikipp/SfdfF24zXTkuNoWusbbGBNa2eY29SkjoFp9uNwOVzSi', 'theprogrammerjack');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment