Skip to content

Instantly share code, notes, and snippets.

View pranavgaikwad's full-sized avatar
🐻‍❄️

Pranav Gaikwad pranavgaikwad

🐻‍❄️
  • Red Hat
  • Raleigh, NC
View GitHub Profile
apiVersion: v1
kind: List
items:
- kind: Namespace
apiVersion: v1
metadata:
name: mysql-persistent
labels:
app: mysql
- apiVersion: v1
#!/usr/bin/python
from re import search
from json import dumps
from sys import exit, argv
from yaml import safe_load
def _pprint(d: dict):
print(dumps(d, sort_keys=True, indent=4))
def _violations_stats():
@pranavgaikwad
pranavgaikwad / README.md
Last active April 28, 2023 12:28
Analyzer Setup

Generating violations report

./konveyor-analyzer --rules rule-example.yaml --provider-settings provider_settings.json --output-file /tmp/report

Generating dependencies

./konveyor-analyzer-dep --provider-settings provider_settings.json
@pranavgaikwad
pranavgaikwad / README.md
Last active June 24, 2022 18:48
Create non-admin users on OpenShift using HTPasswd provider

This ansible playbook helps create non-admin users on OpenShift using htpasswd. It creates htpasswd users in a file, creates a secret in OpenShift with the htpasswd user data and creates a HTPasswd provider that uses that Secret.

Make sure you have python-kubernetes and python-passlib modules installed in your system

Copy default.yaml and htpasswd-users.yaml in a directory.

Configure following variables in default.yaml file:

# users to add
@pranavgaikwad
pranavgaikwad / cutover-pipeline-run.yaml
Last active March 10, 2022 15:13
MTRHO Stage/Cutover Pipelines
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: cutover-pipeline-xz565q
namespace: rocket-chat
spec:
params:
- name: source-cluster-secret
value: source-cluster-tnh75
- name: source-namespace
@pranavgaikwad
pranavgaikwad / README.md
Last active June 24, 2021 14:38
DVM Spec Genarator Playbook

DVM Spec Generator

Introduction

dvm-spec-generator.yaml is an Ansible Playbook that generates a valid Direct Volume Migration Custom Resource when required input is provided.

Usage

Copy dvm-spec-generator.yaml, default.yaml and dvm.yaml.j2 files in this gist in a directory.

@pranavgaikwad
pranavgaikwad / README.md
Last active April 1, 2021 14:32
DVM Retry Mechanism Tests

DVM Retry Test

Both of these scripts require oc login to the source cluster.

Deploy the test environment

dvmRetryEnvUp.sh script takes a list of comma-separated namespaces as an argument and deploys a test app which can be used to test DVM retry mechanism.

To deploy the test app in dvm-retry-test namespace:

@pranavgaikwad
pranavgaikwad / np.yaml
Created March 24, 2021 16:50
NetworkPolicy
- apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: nw-policy-0
namespace: dvm-retry-test
spec:
podSelector: {}
policyTypes:
- Egress
- Ingress
@pranavgaikwad
pranavgaikwad / README.md
Created February 24, 2021 21:42
PV Resize Demo

To deploy the test app on your source cluster, login to the cluster and run:

./pvResizeEnvUp.sh

The app will be deployed in pv-resize-test namespace.