Skip to content

Instantly share code, notes, and snippets.

Fabian von Feilitzsch fabianvf

Block or report user

Report or block fabianvf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View diff
diff --git a/pkg/ansible/controller/controller.go b/pkg/ansible/controller/controller.go
index 02accab2..28bdeb92 100644
--- a/pkg/ansible/controller/controller.go
+++ b/pkg/ansible/controller/controller.go
@@ -28,6 +28,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
View diff
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..361ea2df
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,26 @@
+FROM openshift/origin-release:golang-1.11 AS builder
+COPY . /go/src/github.com/operator-framework/operator-sdk
+RUN cd /go/src/github.com/operator-framework/operator-sdk \
+ && make build/operator-sdk-dev-x86_64-linux-gnu VERSION=dev
View gist:6c9b22fa8c9a415f3e79c06d5c21f4b1
augroup configgroup
autocmd!
" rst
autocmd BufNewFile,BufRead *.txt setlocal ft=rst
autocmd FileType rst setlocal wrap nolist expandtab lbr shiftwidth=4 tabstop=4 softtabstop=4
\ formatoptions+=nqtl
" markdown
autocmd BufRead,BufNewFile *.md set filetype=markdown
autocmd FileType markdown setlocal wrap nolist expandtab lbr shiftwidth=4 tabstop=4 softtabstop=4
\ formatoptions+=nqtl
View Dockerfile.upstream
FROM openshift/origin-release:golang-1.11 AS builder
WORKDIR /go/src/github.com/operator-framework/operator-sdk
COPY . .
RUN make build/operator-sdk-dev-x86_64-linux-gnu VERSION=dev
ENV GO111MODULE=on
RUN build/operator-sdk-dev-x86_64-linux-gnu new tmp \
--type=ansible \
View Dockerfile.upstream
FROM openshift/origin-release:golang-1.11 AS builder
WORKDIR /go/src/github.com/operator-framework/operator-sdk
COPY . .
RUN make build/operator-sdk-dev-x86_64-linux-gnu VERSION=dev
ENV GO111MODULE=on
RUN build/operator-sdk-dev-x86_64-linux-gnu new tmp \
--type=ansible \
View Dockerfile.upstream
FROM openshift/origin-release:golang-1.11 AS builder
COPY . /go/src/github.com/operator-framework/operator-sdk
RUN cd /go/src/github.com/operator-framework/operator-sdk \
&& make build/operator-sdk-dev-x86_64-linux-gnu VERSION=dev
FROM registry.access.redhat.com/ubi8/python-27
USER 0
RUN mkdir -p /etc/ansible \
View example.py
from openshift.dynamic import DynamicClient
import kubernetes
namespace = 'your-namespace'
name = 'your-name'
client = DynamicClient(kubernetes.config.new_client_from_config())
v1_pods = client.resources.get(api_version='v1', kind='Pod')
v1_events = client.resources.get(api_version='v1', kind='Event')
View gist:5e5e47152f5f95718c8eaf128c57cb99
- name: Retrieve results
k8s_log:
api_version: v1
kind: Pod
name: "{{ item.metadata.name }}"
namespace: "{{ meta.namespace }}"
register: result_log
with_items: "{{ client_pods.resources }}"
View test_cases.yml
---
- actual:
items:
- a
- b
- c
desired:
items:
- d
You can’t perform that action at this time.