Skip to content

Instantly share code, notes, and snippets.

View ruo91's full-sized avatar

Yongbok Kim ruo91

View GitHub Profile
@ruo91
ruo91 / ms-azure-ocp4-role.json
Created March 8, 2025 06:54
OpenShift 4.x - Required Azure permissions for installer-provisioned infrastructure
{
"Name": "ocp4-role",
"IsCustom": true,
"Description": "Custom role with specified permissions",
"Actions": [
"Microsoft.Authorization/policies/audit/action",
"Microsoft.Authorization/policies/auditIfNotExists/action",
"Microsoft.Authorization/roleAssignments/read",
"Microsoft.Authorization/roleAssignments/write",
"Microsoft.Authorization/roleAssignments/delete",
@ruo91
ruo91 / paloalto-firewall-basic-setup-and-upgrade-guide.md
Last active March 2, 2025 03:47
Palo Alto Firewall - Basic Setup and Upgrade Guide

Palo Alto Firewall - Basic Setup and Upgrade Guide

Palo Alto Networks의 방화벽에 대한 기본 설정 및 업그레이드 방법에 대해서 정리한다.
기본적인 사항은 모두 CLI 또는 GUI로 진행하며, Serial Console 접근은 LAN to USB를 통해 Rocky Linux에서 진행한다.

1. Serial Console 접근

1.1. 패키지 설치

[root@rockylinux ~]# dnf install -y minicom
@ruo91
ruo91 / ocp4-nginx-ingress-controller-operator.yaml
Last active February 28, 2025 10:11
OpenShift 4x - Example: Nginx Ingress Controller
kind: Secret
apiVersion: v1
metadata:
name: default-tls
namespace: nginx-ingress
data:
tls.crt: base64-encode
tls.key: base64-encode
type: kubernetes.io/tls
---
@ruo91
ruo91 / ocp4-cluster-monitoring-config.yaml
Created February 26, 2025 14:34
OpenShift 4.x - cluster-monitoring-config
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-monitoring-config
namespace: openshift-monitoring
data:
config.yaml: |
alertmanagerMain:
# topologySpreadConstraints
topologySpreadConstraints:
@ruo91
ruo91 / openshift-multus.md
Last active March 5, 2025 13:28
OpenShift 4.x - Multus CNI plugin configuration

OpenShift 4.x - Multus CNI plugin configuration

OpenShift 4 버전에서 Multus를 사용하여 CNI 네트워크를 생성하는 방법에 대해서 정리한다.

1. Bridge

Multus의 Bridge CNI는 Linux Bridge를 사용하여 Pod 간 네트워크를 연결하는 방식으로,
Pod들이 공유된 브릿지 인터페이스를 통해 L2 네트워크에서 직접 통신할 수 있도록 지원한다.
즉, Pod to Pod 간 네트워크가 동일한 브릿지를 통해 연결되며, 추가적인 L3 라우팅 없이 직접 통신이 가능하다.

1.1. 인터페이스

Pod 간 통신을 위해 가상의 브릿지 인터페이스를 추가하여 사용하는 형태이며, 별도의 인터페이스가 필요하지 않다.

@ruo91
ruo91 / ocp-redis-operator.md
Last active January 31, 2025 15:02
OpenShift v4.x - Redis Operator 구성

OpenShift v4.x - Redis Operator

OpsTree에서 제공하는 Redis Operator community v1.15.1 버전을 기준으로 작성 되었으며,
Operator에서는 Standalone, Cluster, Replication, Sentinel 방식을 지원한다.

Operator 설치부터 Namespace, Cluster Role, 각각의 Instance를 생성하고 구성하는 방법에 대해서 작성한다.

1. Project(namespace) 생성

Redis Operator가 설치되고 사용될 namespace를 생성한다.

$ oc new-project redis
@ruo91
ruo91 / redis-standalone-crd.yaml
Created January 31, 2025 01:24
Redis Operator - Redis Standalone
apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: Redis
metadata:
name: redis-instance
namespace: default
spec:
TLS:
ca: {}
cert: {}
key: {}
@ruo91
ruo91 / convert-crd-to-yaml.py
Last active March 17, 2025 00:58
OpenShift - Convert Custom Resource Definitions(CRD) to YAML
#!/usr/bin/env python3
# Usage:
# ./convert-crd-to-yaml.py [input-crd.yaml] [output-clean-crd.yaml]
import yaml
import sys
import argparse
import os
import logging
# Setup logging
@ruo91
ruo91 / f5-big-ip-block-ips.md
Last active October 21, 2024 07:35
F5 BIG-IP - Block Specific IPs in an Environment Using Cloudflare in Proxied Mode

1. iRules 생성

when HTTP_REQUEST {
    # Set a default empty client_ip variable
    set client_ip ""

    # Check if X-Forwarded-For header exists and use the first IP in the list (if it exists)
    if { [HTTP::header exists "X-Forwarded-For"] } {
        set xff_header [HTTP::header "X-Forwarded-For"]
        set client_ip [getfield $xff_header "," 1]  ;# X-Forwarded-For may contain multiple IPs, so take the first one
@ruo91
ruo91 / f5-big-ip-blocking-dynamic-files-brute-force-attacks.md
Last active October 6, 2024 03:15
F5 BIG-IP - Automatic blocking script for dynamic files brute force attacks

1. iRules

when HTTP_REQUEST {
    # Define the list of domains to block
    set blocked_domains { "your-domain01" "your-domain02" }

    # Get the Host header value
    set host_header [HTTP::host]

    # Define the list of dynamic page extensions to block