Skip to content

Instantly share code, notes, and snippets.

View ruo91's full-sized avatar

Yongbok Kim ruo91

View GitHub Profile
@ruo91
ruo91 / ocp46-etcd-manual-runing.md
Created February 1, 2024 14:25
Manual Method for Running ETCD Version 3.4.9 Based in an OpenShift 4.6 Environment

- Cluster Node #1

$ etcd \
--data-dir '/var/lib/etcd' \
--wal-dir '/var/lib/etcd/member/wal' \
--initial-advertise-peer-urls=https://192.168.0.81:2380 \
--cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-master01.ocp46.local.crt \
--key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-master01.ocp46.local.key \
--trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
--client-cert-auth=true \
@ruo91
ruo91 / gist:a062b1956c5e76d8ebf0557b527cd4d6
Created October 22, 2023 08:01
CustomResourceDefinition - AgentServiceConfig
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
creationTimestamp: "2023-10-21T15:18:54Z"
generation: 1
name: agentserviceconfigs.agent-install.openshift.io
resourceVersion: "49197"
uid: 5364102b-9370-4f0e-96ce-3bf3ffa24207
@ruo91
ruo91 / openshift-vcenter-role.ps1
Last active September 26, 2023 04:01
OpenShift on vSphere - Create vCenter Role (PowerShell)
<#
.SYNOPSIS
openshift-vcenter-role.ps1 - PowerShell Script to create a new vCenter Roles algined with the prereqs for the OpenShift Container Platform Install.
.DESCRIPTION
This script is used to create a new roles on your vCenter server.
The newly created role will be filled with the needed permissions for installing OpenShift Container Platform using the IPI Method.
The permissions are based on the documentation found here: https://docs.openshift.com/container-platform/4.13/installing/installing_vsphere/installing-vsphere-installer-provisioned.html
.OUTPUTS
Results are printed to the console.
.NOTES
@ruo91
ruo91 / systemd-utils-253.8.ebuild
Created August 13, 2023 02:46
Gentoo Linux - GCC -Ofast 최적화 옵션 사용시 sys-apps/systemd-utils 관련 meson 빌드 에러 해결
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
QA_PKGCONFIG_VERSION=$(ver_cut 1)
inherit bash-completion-r1 flag-o-matic linux-info meson-multilib python-any-r1
inherit secureboot toolchain-funcs udev usr-ldscript
@ruo91
ruo91 / gentoo-meson.txt
Created July 30, 2023 16:32
Gentoo - NetworkManager meson build error
>>> Emerging (26 of 31) net-libs/libmbim-1.28.4::gentoo
* libmbim-1.28.4.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ]
* Checking whether python3_12 is suitable ...
* dev-lang/python:3.12 ... [ ok ]
* Using python3.12 to build (via PYTHON_COMPAT iteration)
>>> Unpacking source...
>>> Unpacking libmbim-1.28.4.tar.bz2 to /var/tmp/portage/net-libs/libmbim-1.28.4/work
>>> Source unpacked in /var/tmp/portage/net-libs/libmbim-1.28.4/work
>>> Preparing source in /var/tmp/portage/net-libs/libmbim-1.28.4/work/libmbim-1.28.4 ...
>>> Source prepared.
@ruo91
ruo91 / haproxy-quic.md
Last active June 11, 2023 06:03
How to Install and Configure HAProxy+QUIC on Rocky Linux 9

How to Install and Configure HAProxy+QUIC on Rocky Linux 9

RockyLinux 9 버전에서 HAProxy+QUIC 조합을 사용하여 구성하는 방법에 대해서 설명한다.

1. HAProxy란?

HAProxy는 C 언어로 개발된 TCP 및 HTTP 기반 애플리케이션을 위해 고가용성 로드밸런서와 리버스 프록시를 제공하는 오픈소스 소프트웨어다.

TCP 및 HTTP 애플리케이션을 로드 밸런싱하고 고가용성을 제공하는데 주로 사용되며 로드밸런싱은 여러 서버 사이에 트래픽을 분산하여 서버의 성능을 향상시키고 가용성을 높이는 기술이다.
여러 서버로 들어오는 요청을 분산하여 부하를 공정하게 분배하고, 각 서버의 상태를 모니터링하며 문제가 있는 서버를 제외시킴으로써 신뢰성을 높일수 있다.

또한, 프록시 서버로 사용될 수 있어 클라이언트와 서버 간의 통신을 중개하는 역할을 수행할 수 있어서, 보안, 로깅, SSL 종단 감시 등 다양한 기능을 제공할 수 있다.

@ruo91
ruo91 / ocp4-ImagePrunerDegraded.md
Last active May 26, 2023 14:41
OpenShift v4.x - ImagePrunerDegraded: Job has reached the specified backoff limit

OpenShift v4.x - ImagePrunerDegraded: Job has reached the specified backoff limit

본 이슈는 내부 레지스트리인 image-registry의 Operator 상태가 Degraded로 발생하는 이슈이다.

해당 버그 리포트를 살펴보면 OCP v4.4 버전에서도 발생했던 사항으로,
이슈가 발생하는 시점은 image-registry operator의 managementState를 Removed 상태에서 pruner job이 생성이 될때까지 기다리면 발생한다. (현재 OCP v4.6은 managementState는 Removed가 기본)

1. 이슈

[root@bastion ~]# oc describe clusteroperators image-registry | grep 'ImagePrunerDegraded'

@ruo91
ruo91 / apache2_add_http_status_code_444_http_protocol.patch
Created May 24, 2023 15:56
Apache2 - Apply HTTP Status Code 444
# usage: patch -p0 < apache2_add_http_status_code_444_http_protocol.patch
# vi httpd.conf
# ErrorDocument 444 "No Response"
# apachectl graceful
--- httpd-2.4.57/modules/http/http_protocol.c.orig 2023-05-24 22:50:23.905088004 +0900
+++ httpd-2.4.57/modules/http/http_protocol.c 2023-05-24 22:51:10.275677091 +0900
@@ -158,7 +158,7 @@
NULL, /* 441 */
NULL, /* 442 */
NULL, /* 443 */
@ruo91
ruo91 / python3-urldecode.py
Created May 16, 2023 04:15
Python3 - URL Decode
# - Usage
# ex1)
# python3 url_decode.py "Blah%7E%20Blah%7E~"
#
# ex2)
# python3 url_decode.py "/path/to/directory/example-url-encode.txt"
#
# - RefURL
# https://gist.github.com/Paradoxis/733af9516af9022d2d4ca7432ff15a96
#
@ruo91
ruo91 / python3-urlencode.py
Created May 16, 2023 04:13
Python3 - URL Encode
# - Usage
# ex1)
# python3 url_encode.py "Blah~ Blah~"
#
# ex2)
# python3 url_encode.py "/path/to/directory/example.txt"
#
# - RefURL
# https://gist.github.com/Paradoxis/6336c2eaea20a591dd36bb1f5e227da2
#