This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oc describe svc app01 | |
Name: app01 | |
Namespace: demo-project | |
Type: ClusterIP | |
IP: 172.30.136.125 | |
Port: https 8443/TCP | |
TargetPort: 8443/TCP | |
Endpoints: 10.129.25.24:8443,10.129.25.25:8443,10.129.25.26:8443,10.129.25.27:8443 | |
Session Affinity: None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-A KUBE-SEP-2UEFXEFY3XXHAVSQ -s 10.129.25.27/32 -m comment --comment "demo-project/app01:https" -j KUBE-MARK-MASQ | |
-A KUBE-SEP-2UEFXEFY3XXHAVSQ -p tcp -m comment --comment "demo-project/app01:https" -m tcp -j DNAT --to-destination 10.129.25.27:8443 | |
-A KUBE-SEP-GLTDMJISNXQTRVXI -s 10.129.25.24/32 -m comment --comment "demo-project/app01:https" -j KUBE-MARK-MASQ | |
-A KUBE-SEP-GLTDMJISNXQTRVXI -p tcp -m comment --comment "demo-project/app01:https" -m tcp -j DNAT --to-destination 10.129.25.24:8443 | |
-A KUBE-SEP-HUQBD2AEIMNUNXEV -s 10.129.25.25/32 -m comment --comment "demo-project/app01:https" -j KUBE-MARK-MASQ | |
-A KUBE-SEP-HUQBD2AEIMNUNXEV -p tcp -m comment --comment "demo-project/app01:https" -m tcp -j DNAT --to-destination 10.129.25.25:8443 | |
-A KUBE-SEP-HUXRJOZCU27DI2SS -s 10.129.25.26/32 -m comment --comment "demo-project/app01:https" -j KUBE-MARK-MASQ | |
-A KUBE-SEP-HUXRJOZCU27DI2SS -p tcp -m comment --comment "demo-project/app01:https" -m tcp -j DNAT --to-destination 10.129.25.26:8443 | |
-A KUBE-SERVICES ! -s 10.128.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/groovy | |
import java.text.SimpleDateFormat | |
import java.util.* | |
import java.text.* | |
import groovy.json.JsonSlurper | |
import java.util.Date | |
def GIT_SOURCE_URL ='https://github.com/ohmrefresh/demo-jenkins-pipeline.git' | |
def API_ENDPOINT = 'https://www.ohmrefresh.club' | |
def DATE_FORMAT = new SimpleDateFormat("yyyyMMdd") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example global gitignore file | |
# | |
# Place a copy if this at ~/.gitignore_global | |
# Run `git config --global core.excludesfile ~/.gitignore_global` | |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for deployment in $(oc get dc -n name-space | awk '{print $1}'| awk 'NR != 1'); do oc scale dc/${deployment} --replicas=0 -n name-space ; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
namespace_arr=(animal fruit) | |
environment_arr=(dev qa) | |
basePath="NetworkPolicy/" | |
rm -rf ${basePath} || true | |
for name in "${namespace_arr[@]}"; do | |
for environment in "${environment_arr[@]}"; do | |
namespace="${name}-${environment}" | |
policy_arr=($(oc get NetworkPolicy --namespace=${namespace} | awk 'FNR > 1 {print $1}')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: NetworkPolicy | |
metadata: | |
labels: | |
appLang: springboot | |
appName: banana-app | |
appScope: POC | |
envName: production | |
svcGroup: fruit | |
name: banana-app-allow-pod-network-policy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Kill pods | |
for pod in $(oc get pods | egrep 'Error|MatchNodeSelector|CrashLoopBackOff' | awk '{print $1}'); do oc delete pod --grace-period=0 "${pod}"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
influxdb: | |
image: influxdb:latest | |
container_name: influxdb | |
ports: | |
- "8083:8083" | |
- "8086:8086" | |
- "8090:8090" | |
environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install -r requirements-to-freeze.txt --upgrade && pip freeze > requirements.txt |