Skip to content

Instantly share code, notes, and snippets.

@pweil-
Created October 4, 2018 15:52
Show Gist options
  • Save pweil-/2995c6bf838437be9fd5e3fce7ee2ce4 to your computer and use it in GitHub Desktop.
Save pweil-/2995c6bf838437be9fd5e3fce7ee2ce4 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: namespace-rolebindings
namespace: openshift-infra
spec:
replicas: 1
selector:
matchLabels:
app: namespace-rolebindings
template:
metadata:
labels:
app: namespace-rolebindings
spec:
serviceAccountName: default
containers:
- args:
- |
set -o errexit
set -o nounset
set -o pipefail
cat <<'SCRIPT' >/tmp/dowork
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
name=$1
echo "got ${1} -- do the work here, or in scripts specific to --names or --delete args"
SCRIPT
chmod u+x /tmp/dowork
exec oc observe namespace --maximum-errors=1 --resync-period=10m -- /tmp/dowork
command:
- /bin/bash
- -c
image: openshift/observe
name: reconciler
# TODO: must create a service account that has access to see namespaces
[root@master-000000 cloud-user]# oc logs -f namespace-rolebindings-7745fcdc69-zf4g7
# 2018-10-04T15:50:18Z Sync started
# 2018-10-04T15:50:18Z Sync 1768 /tmp/dowork default
got default -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 715 /tmp/dowork kube-public
got kube-public -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 758 /tmp/dowork kube-service-catalog
got kube-service-catalog -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 788 /tmp/dowork kube-system
got kube-system -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 1597 /tmp/dowork openshift
got openshift -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 853 /tmp/dowork openshift-ansible-service-broker
got openshift-ansible-service-broker -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 882 /tmp/dowork openshift-azure
got openshift-azure -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 907 /tmp/dowork openshift-etcd
got openshift-etcd -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 6262 /tmp/dowork openshift-infra
got openshift-infra -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 965 /tmp/dowork openshift-metrics
got openshift-metrics -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 991 /tmp/dowork openshift-node
got openshift-node -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 1013 /tmp/dowork openshift-sdn
got openshift-sdn -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 1034 /tmp/dowork openshift-template-service-broker
got openshift-template-service-broker -- do the work here, or in scripts specific to --names or --delete args
# 2018-10-04T15:50:18Z Sync 1059 /tmp/dowork openshift-web-console
got openshift-web-console -- do the work here, or in scripts specific to --names or --delete args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment