Categorygithub.com/gravitational/rigging
modulepackage
0.0.0-20210830225907-f519c379c7ff
Repository: https://github.com/gravitational/rigging.git
Documentation: pkg.go.dev

# README

Rig

The Rig tool adds changeset semantics to Kubernetes operations. For example:

# upsert a daemon set (changeset is created automatically)
rig upsert -c change1 -f daemonset.yaml
# delete a service
rig delete -c change1 svc/service1
# update config map
rig delete -c change1 configmaps/cf1
# check status
rig status -c change1
# revert everything
rig revert -c change1
# or freeze changeset, so it can no longer be updated
rig freeze -c change1

Usage

You can view changesets to see what happened:

View all changesets

rig get

Get detailed operations log for a changeset

rig get change1
rig get change1 -o yaml

Delete a changeset

rig cs delete change1

Environment variables can be used to bind rig to particular changeset:

export RIG_CHANGESET=cs1
rig upsert -f daemonset.yaml

Supported Resources

The following resources are supported:

  • ConfigMap
  • DaemonSet
  • ReplicationController
  • Service
  • Secret
  • Deployment

Rolling Updates

Only Deployment updates are rolling, updating of daemon sets or replication controllers simply deletes all the pods

Status checks

As a precondition to declaring Deployment, DaemonSet or ReplicatonController as ready, rig requires all pods must be in Running state.

Contributing

Rig is developed by Teleport. If you'd like to contribute to Rig, check out our contributing guidelines and Code of Conduct.

# Packages

No description provided by the author

# Functions

CollectPods collects pods matched by fn.
No description provided by the author
No description provided by the author
FromFile performs action on the Kubernetes resources specified in the path supplied as an argument.
FromStdin performs action on the Kubernetes resources specified in the string supplied as an argument.
GenerateConfigMap returns a configMap using the specified parameters.
No description provided by the author
GetOperationInfo returns operation information.
No description provided by the author
No description provided by the author
KubeCommand returns an exec.Command for kubectl with the supplied arguments.
No description provided by the author
Namespace returns a default namespace if the specified namespace is empty.
NewAlertmanagerControl returns new instance of Alertmanager updater.
NewAPIServiceControl returns new instance of APIService updater.
No description provided by the author
NewClusterRoleBindingControl returns a new instance of the ClusterRoleBinding controller.
NewClusterRoleControl returns a new instance of the ClusterRole controller.
NewConfigMapControl returns new instance of ConfigMap updater.
NewCustomResourceDefinitionControl returns new instance of CustomResourceDefinition updater.
NewDaemonSetControl returns new instance of DaemonSet controller.
NewDeploymentControl returns new instance of Deployment updater.
No description provided by the author
NewMutatingWebhookConfigurationControl creates control service for MutatingWebhookConfiguration resouces.
NewNamespaceControl returns new instance of Namespace updater.
NewPodSecurityPolicyControl returns a new instance of the PodSecurityPolicy controller.
NewPriorityClassControl returns new instance of PriorityClass updater.
NewPrometheusControl returns new instance of Prometheus updater.
NewPrometheusRuleControl returns new instance of PrometheusRule updater.
NewReplicationControllerControl returns new instance of ReplicationController control.
NewRoleBindingControl returns a new instance of the RoleBinding controller.
NewRoleControl returns a new instance of the Role controller.
NewSecretControl returns new instance of Secret updater.
NewServiceAccountControl returns a new instance of the ServiceAccount controller.
NewServiceControl returns new instance of Service updater.
NewServiceMonitorControl returns new instance of ServiceMonitor updater.
NewStatefulSetControl returns new instance of the StatefulSet controller.
NewValidatingWebhookConfigurationControl creates control service for ValidatingWebhookConfiguration resouces.
No description provided by the author
ParseAlertmanager parses a Alertmanager resource from the provided data.
ParseAPIService parses a APIService resource from the provided data.
ParseClusterRole parses an rbac cluster role from the specified stream.
ParseClusterRoleBinding parses an rbac cluster role binding from the specified stream.
ParseConfigMap parses Config Map.
ParseCustomResourceDefinition parses a Custom Resource Definition.
ParseDaemonSet parses daemon set from reader.
ParseDeployment parses deployment.
ParseJob parses the specified reader as a Job resource.
ParseMutatingWebhookConfiguration parses a MutatingWebhookConfiguration resources from the provided data stream.
ParseNamespace parses a namespace object from the specified stream.
ParsePodSecurityPolicy parses a pod security policy from the specified stream.
ParsePriorityClass parses a PriorityClass object from the specified stream.
ParsePrometheus parses a Prometheus resource from the provided data.
ParsePrometheusRule parses a PrometheusRule resource from the provided data.
ParseRef parses resource reference eg daemonsets/ds1.
ParseReplicationController parses replication controller.
ParseResourceHeader parses resource header information.
ParseRole parses an rbac role from the specified stream.
ParseRoleBinding parses an rbac role binding from the specified stream.
ParseSecret parses a secret from the specified stream.
ParseService parses service.
ParseServiceAccount parses a service account from the specified stream.
ParseServiceMonitor parses a ServiceMonitor resource from the provided data.
No description provided by the author
ParseStatefulSet parses statefulset resource from reader.
ParseValidatingWebhookConfiguration parses a ValidatingWebhookConfiguration resources from the provided data stream.
PollStatus polls status periodically.
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CustomerManagedAnnotation specifies an annotation that a customer can use to take control of a kubernetes object that is normally managed via gravity/rigging.
No description provided by the author
No description provided by the author
DefaultRetryAttempts specifies amount of retry attempts for checks.
RetryPeriod is a period between Retries.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

AlertmanagerConfig is a Alertmanager control configuration.
AlertmanagerControl a controller for Alertmanager resources.
APIServiceConfig is a APIService control configuration.
APIServiceControl a controller for APIService resources.
Changeset is a is a collection changeset log that can revert a series of changes to the system.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ClusterRoleBindingConfig defines controller configuration.
ClusterRoleBindingControl is a cluster role bindings controller, adds various operations, like delete, status check and update.
ClusterRoleConfig defines controller configuration.
ClusterRoleControl is a cluster roles controller, adds various operations, like delete, status check and update.
ConfigMapConfig is a ConfigMap control configuration.
ConfigMapControl is a daemon set controller, adds various operations, like delete, status check and update.
CustomResourceDefinitionConfig is a CustomResourceDefinition control configuration.
CustomResourceDefinitionControl is a daemon set controller, adds various operations, like delete, status check and update.
DeploymentConfig is a Deployment control configuration.
DeploymentControl is a deployment controller, adds various operations, like delete, status check and update.
DSConfig is a DaemonSet control configuration.
DSControl is a daemon set controller, adds various operations, like delete, status check and update.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MutatingWebhookConfigurationConfig is the control configuration.
MutatingWebhookConfigurationControl is the control service for MutatingWebhookConfiguration resources.
NamespaceConfig is a Namespace control configuration.
NamespaceControl is a daemon set controller, adds various operations, like delete, status check and update.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PodSecurityPolicyConfig defines controller configuration.
PodSecurityPolicyControl is a pod security policy controller, adds various operations, like delete, status check and update.
No description provided by the author
PriorityClassConfig is a PriorityClass control configuration.
PriorityClassControl is a daemon set controller, adds various operations, like delete, status check and update.
PrometheusConfig is a Prometheus control configuration.
PrometheusControl a controller for Prometheus resources.
PrometheusRuleConfig is a PrometheusRule control configuration.
PrometheusRuleControl a controller for PrometheusRule resources.
RCConfig is a ReplicationController control configuration.
RCControl is a daemon set controller, adds various operations, like delete, status check and update.
Ref is a resource refernece.
No description provided by the author
No description provided by the author
No description provided by the author
RoleBindingConfig defines controller configuration.
RoleBindingControl is a role bindings controller, adds various operations, like delete, status check and update.
RoleConfig defines controller configuration.
RoleControl is a roles controller, adds various operations, like delete, status check and update.
SecretConfig is a Secret control configuration.
SecretControl is a daemon set controller, adds various operations, like delete, status check and update.
ServiceAccountConfig defines controller configuration.
ServiceAccountControl is a service accounts controller, adds various operations, like delete, status check and update.
ServiceConfig is a Service control configuration.
ServiceControl is a daemon set controller, adds various operations, like delete, status check and update.
ServiceMonitorConfig is a ServiceMonitor control configuration.
ServiceMonitorControl a controller for ServiceMonitor resources.
StatefulSetConfig is a StatefulSet control configuration.
StatefulSetControl is a statefulset controller, adds various operations, like delete, status check and update.
ValidatingWebhookConfigurationConfig is the control configuration.
ValidatingWebhookConfigurationControl is the control service for ValidatingWebhookConfiguration resources.

# Interfaces

StatusReporter reports the status of the resource.