Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeff McCormick jmccormick2001

  • Red Hat
  • Boerne, TX
View GitHub Profile
@jmccormick2001
jmccormick2001 / gist:6913157f86619e6a43cbd16690d18d34
Created Dec 7, 2020
channel.yaml and subscription.yaml with labels/selectors
View gist:6913157f86619e6a43cbd16690d18d34
--- channel.yaml found in each bundle
apiVersion: operators.coreos.com/v1alpha1
kind: Channel
metadata:
  name: my-operator
  maturity: stable
  operand-version: 12
  operator-version: 1.2.3
--- subscription.yaml
View gist:5f046e3b1a14c220f666ae3cd5de7f42
which: no controller-gen in (/home/jeffmc/operator-sdk/build:/home/jeffmc/operator-sdk/tools/bin:/usr/local/go/bin:/home/jeffmc/.local/bin:/home/jeffmc/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/go/bin)
podman --log-level=debug build -f bundle.Dockerfile -t controller-bundle:0.0.1 .
time="2020-11-24T08:11:41-06:00" level=info msg="podman filtering at log level debug"
time="2020-11-24T08:11:41-06:00" level=debug msg="Called build.PersistentPreRunE(podman --log-level=debug build -f bundle.Dockerfile -t controller-bundle:0.0.1 .)"
time="2020-11-24T08:11:41-06:00" level=debug msg="Reading configuration file \"/usr/share/containers/containers.conf\""
time="2020-11-24T08:11:41-06:00" level=debug msg="Merged system config \"/usr/share/containers/containers.conf\": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.22.0 Annotations:[] CgroupNS:host Cgroups:enabled DefaultCapabilities:[CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_MKNOD CAP_NE
View gist:edd804ae18767e1db2a232f33349b3ab
[
{
"Id": "9686ed62cccd417134bf8a66dd620499ae7aa9852e4912e896d97dd065d80392",
"Digest": "sha256:16942961a4d198b0cd3dd5a5ba0f668cb9456a709fedd818705fa18930483d44",
"RepoTags": [
"quay.io/jemccorm/doo-operator:v0.0.1"
],
"RepoDigests": [
"quay.io/jemccorm/doo-operator@sha256:16942961a4d198b0cd3dd5a5ba0f668cb9456a709fedd818705fa18930483d44"
],
View gist:c014a6836f5127694b465fef221f4d81
mojo:[~/projects/doo] podman push quay.io/jemccorm/doo-operator:v0.0.1 --log-level=debug
INFO[0000] podman filtering at log level debug
DEBU[0000] Called push.PersistentPreRunE(podman push quay.io/jemccorm/doo-operator:v0.0.1 --log-level=debug)
DEBU[0000] Reading configuration file "/usr/share/containers/containers.conf"
DEBU[0000] Merged system config "/usr/share/containers/containers.conf": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.22.0 Annotations:[] CgroupNS:private Cgroups:enabled DefaultCapabilities:[AUDIT_WRITE CHOWN DAC_OVERRIDE FOWNER FSETID KILL NET_BIND_SERVICE SETFCAP SETGID SETPCAP SETUID SYS_CHROOT] DefaultSysctls:[net.ipv4.ping_group_range=0 1] DefaultUlimits:[] DefaultMountsFile: DNSServers:[] DNSOptions:[] DNSSearches:[] EnableLabeling:true Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm] EnvHost:false HTTPProxy:false Init:false InitPath: IPCNS:private LogDriver:k8s-file LogSizeMax:-1 NetNS:slirp4netns NoHosts:false
View gist:83454ebe6e326f1b30c5f8aaabff6bca
servicemeshoperator app-registry PROD
-------------------------------------
1.0.0 1.0.2 1.0.6 1.1.0 1.1.2.3 1.1.5 1.1.8
1.0.1 1.0.3 1.0.7 1.1.1 1.1.3 1.1.5.2 1.1.9
1.0.10 1.0.4 1.0.8 1.1.2 1.1.4 1.1.6
1.0.11 1.0.5 1.0.9 1.1.2.2 1.1.4.2 1.1.7
servicemeshoperator app-registry STAGE
-------------------------------------
1.0.0 1.0.3 1.0.7 1.1.1 1.1.2+3 1.1.5 1.1.8
View gist:d242f52d9a710a804ff0a56a8aa80d09
This gist shows the steps I took to run the 'alpha' scorecard against
the Windows Machine Config Operator using SDK 0.18.1
1) create a bundle that complies with the alpha scorecard as follows:
cd windows-machine-config-operator/deploy/olm-catalog/windows-machine-config-operator
mkdir bundle
Copy the CSV and annotations manifests into the following bundle locations:
@jmccormick2001
jmccormick2001 / *.sh
Created Oct 10, 2018
bashing a badger
View *.sh
#!/bin/bash
set -x
rm /tmp/fragment
MYVAR=' %t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h'
echo -n "/bin/pgbadger -f stderr --prefix " >> /tmp/fragment
echo -n "'"$MYVAR"'" >> /tmp/fragment
echo -n " -o /tmp/index.html /pgdata/badger/pg_log/*.log" >> /tmp/fragment
View gist:4e40ce39824b02e830e9bee74649fa37
default
* demo-project
kube-public
kube-system
logging
management-infra
openshift
openshift-infra
openshift-node
View scc.restricted
jeffrhelly jeffmc~/cdev/src/github.com/crunchydata/crunchy-containers/examples/openshift/pgadmin4-http]: oc get scc restricted -o yaml
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegedContainer: false
allowedCapabilities: []
allowedFlexVolumes: []
apiVersion: v1
View gist:a386f25cfe93802bd7a7e5b0efbb24eb
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "slave-dc",
"labels": {
"app": "slave-dc"
}
},
"spec": {