Skip to content

Instantly share code, notes, and snippets.

View ruo91's full-sized avatar

Yongbok Kim ruo91

View GitHub Profile
@ruo91
ruo91 / ocp4-ingress-operator-crd.yaml
Created February 6, 2022 12:07
OpenShift v4.x - Ingress Operator Custom Resource Definition
[root@bastion ~]# oc get crd -o yaml ingresscontrollers.operator.openshift.io
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/616
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
name: ingresscontrollers.operator.openshift.io
@ruo91
ruo91 / intel-e1000e-driver-build-fail.txt
Created January 24, 2022 06:29
Linux Kernel v5.x - intel e1000e driver build fail
ruo91-home /usr/local/src/e1000e-3.8.4/src # make
make[1]: Entering directory '/usr/src/linux-5.15.16-gentoo'
CC [M] /usr/local/src/e1000e-3.8.4/src/netdev.o
In file included from /usr/local/src/e1000e-3.8.4/src/e1000.h:14,
from /usr/local/src/e1000e-3.8.4/src/netdev.c:30:
/usr/local/src/e1000e-3.8.4/src/kcompat.h: In function '__kc_xdp_umem_get_data':
/usr/local/src/e1000e-3.8.4/src/kcompat.h:6696:22: error: 'struct xdp_umem' has no member named 'pages'; did you mean 'pgs'?
6696 | return umem->pages[addr >> PAGE_SHIFT].addr + (addr & (PAGE_SIZE - 1));
| ^~~~~
| pgs
@ruo91
ruo91 / ocp4-log4j2-cve-2021-44228.md
Last active December 13, 2021 13:51
OpenShift v4.x - Apache Log4j2 (CVE-2021-44228) 보안 취약점 조치 방법

OpenShift v4.x - Apache Log4j2 (CVE-2021-44228) 보안 취약점 조치 방법

OpenShift v3.11, v4.x 버전에서 Apache Log4j2 (CVE-2021-44228)에 대한 보안 취약점 조치 방법에 대해서 정리한다.
이번 보안 취약점에 영향이 있는 컴포넌트는 OpenShift Logging(EFK Stack)의 ElasticSearch에 영향을 받는다.

1. OpenShift v3.11 버전

1.1. Deployment Config 확인

ElasticSearch의 Deployment Config을 확인 한다.

[root@bastion ~]# for i in {es,es-ops}; do oc get dc -l component=$i --no-headers -n openshift-logging | awk '{print $1}'; done

@ruo91
ruo91 / ocp4-on-aws-bootstrap-ignition-forbidden.txt
Created November 29, 2021 05:50
OpenShift v4.x on AWS - GET result: Forbidden (Bootstrap instance)
[?25lUse the ^ and v keys to change the selection.
Press 'e' to edit the selected item, or 'c' for a command prompt.   Red Hat Enterprise Linux CoreOS 46.82.202106161040-0 (Ootpa) (ostree:0)        
@ruo91
ruo91 / gentoo-kernel-config.txt
Last active April 3, 2022 12:54
Gentoo Kernel Config - ASUS ZenBook Pro 15 UX550GEX_UX580GE
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.17.1-gentoo-r1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110201
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23800
@ruo91
ruo91 / ocp4-disable-insight-operator.md
Last active November 6, 2021 02:25
OpenShift v4.x - Disable Insight Operator

OpenShift v4.x - Disable Insight Operator

OpenShift v4.7 버전부터 Insight Operator 기능이 추가 되었다.
이것은 기존의 클러스터 환경에 대한 정보를 수집하고 cloud.redhat.com에서
Insigt Report 기반으로 클러스터에 대한 정보를 진단하는 기능을 가지고 있다.

이 기능이 Disconnected 환경에서는 외부로 수집될 이유가 없으므로, 이를 비활성화 한다.

1. 구성 확인

openshift-insight operator에서 서버로 사용하는 server.yaml 파일을 확인 해본다.

@ruo91
ruo91 / ocp4-insights-operator-custom-configmap-deployment.yaml
Created November 6, 2021 02:15
OpenShift 4.x - Insights Operator Deployment
kind: Deployment
apiVersion: apps/v1
metadata:
name: insights-operator
namespace: openshift-insights
spec:
replicas: 1
selector:
matchLabels:
app: insights-operator
@ruo91
ruo91 / ocp4-3scale-v2.9-apimanage-instance-crd.yaml
Last active October 31, 2021 10:39
OpenShift v4.x - 3Scale Custom Resource Definition
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
operators.coreos.com/3scale-operator.3scale: ""
name: apimanagers.apps.3scale.net
spec:
conversion:
strategy: None
group: apps.3scale.net
@ruo91
ruo91 / ocp4-3scale-operator-v2.9-image-stream.md
Last active October 31, 2021 03:55
OpenShift v4x - 3Scale Operator ImageStream

- 3scale-operator pod logs

$ oc logs -f 3scale-operator-549b969b79-fbjwr -n 3scale
{"level":"info","ts":1635608682.9609578,"logger":"controller_apimanager","msg":"Deployment status will be updated"}
{"level":"info","ts":1635608682.9825118,"logger":"controller_apimanager","msg":"ReconcileAPIManager","Request.Namespace":"3scale","Request.Name":"api-manager","Operator version":"0.6.0","3scale release":"2.9"}
{"level":"info","ts":1635608768.0079806,"logger":"olm","msg":"Found deployments with status ","stopped":["apicast-production","apicast-staging","backend-cron","backend-listener","backend-redis","backend-worker","system-app","system-memcache","system-mysql","system-redis","system-sidekiq","system-sphinx","zync","zync-database","zync-que"],"starting":[],"ready":[]}

- amp-apicast

$ oc import-image amp-apicast:2.9 --insecure -n 3scale --confirm \

--from=registry.redhat.io/3scale-amp2/apicast-gateway-rhel8@sha256:a3a841ce413b2e050fe44a30f3b3fd82256d91e0daa81f13ecd40f97a95e68ab

@ruo91
ruo91 / ocp4-data-collection-tools.md
Last active October 26, 2021 13:48
OpenShift v4.x - 데이터 수집 도구 사용