Dashboard:
Knowledgebase/wiki:
Document management:
| 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 \ |
Dashboard:
Knowledgebase/wiki:
Document management:
| 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') |
| - 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 }}" |
| --- | |
| - actual: | |
| items: | |
| - a | |
| - b | |
| - c | |
| desired: | |
| items: | |
| - d |
| from __future__ import print_function | |
| import os | |
| import re | |
| import yaml | |
| base_dirs = { | |
| 'build': 'scaffold.BuildDir', | |
| 'build/test-framework': 'scaffold.BuildTestDir', |
| Server [https://localhost:8443]: I1218 13:39:00.356890 1821 round_trippers.go:383] HEAD https://master.example.org:8443/ | |
| I1218 13:39:00.357019 1821 round_trippers.go:390] Request Headers: | |
| I1218 13:39:00.393071 1821 round_trippers.go:408] Response Status: in 36 milliseconds | |
| I1218 13:39:00.393112 1821 round_trippers.go:411] Response Headers: | |
| The server uses a certificate signed by an unknown authority. | |
| You can bypass the certificate check, but any data you send to the server could be intercepted by others. | |
| Use insecure connections? (y/n): | |
| I1218 13:39:01.832955 1821 round_trippers.go:383] GET https://master.example.org:8443/.well-known/oauth-authorization-server | |
| I1218 13:39:01.832976 1821 round_trippers.go:390] Request Headers: | |
| I1218 13:39:01.832987 1821 round_trippers.go:393] X-Csrf-Token: 1 |
| import kubernetes | |
| from openshift.dynamic import DynamicClient | |
| import urllib3 | |
| urllib3.disable_warnings() | |
| def get_client(**kwargs): | |
| configuration = kubernetes.client.Configuration() |
| import kubernetes | |
| from openshift.dynamic import DynamicClient | |
| import urllib3 | |
| urllib3.disable_warnings() | |
| def get_client(**kwargs): | |
| configuration = kubernetes.client.Configuration() |
| from openshift import client | |
| configuration = client.Configuration() | |
| configuration.api_key = {'authorization': 'Bearer {0}'.format(api_key)} | |
| configuration.host = host | |
| client.Configuration.set_default(configuration) | |
| api = client.OapiApi() | |
| res = api.list_project() | |
| print(res) |