forked from rook/rook
cmd-reporter runs a command and puts the results of the command into a ConfigMap defined by its `--config-map-name` commandline flag. cmd-reporter is intended to be run as a Kubernetes job where an operator needs to run a single command and get return information back from the command which is more than just success/failure. The ConfigMap returned includes `stdout`, `stderr`, and `retcode` data from the command. The ConfigMap may be preexisting, in which case cmd-reporter will overwrite the return information in the ConfigMap. cmd-reporter labels the ConfigMap with `app=cmd-reporter`, and if the ConfigMap already has an app label which is different, cmd-reporter fails without modifying the ConfigMap so as not to overwrite another application's data in the event of a ConfigMap name+namespace collision. Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
20 lines
736 B
Go
20 lines
736 B
Go
/*
|
|
Copyright 2019 The Rook Authors. All rights reserved.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Package util contains top-level utility commands which are neither storage backends nor
|
|
// associated with a particular storage backend.
|
|
package util
|