Skip to content

Instantly share code, notes, and snippets.

View vutkin's full-sized avatar

Viktor Utkin vutkin

  • EPAM Systems
  • Earth
View GitHub Profile
@vutkin
vutkin / expand_k8s_pvc.sh
Created September 8, 2021 10:17 — forked from adamrushuk/expand_k8s_pvc.sh
Testing process to expand k8s PVCs without losing data
# Testing process to expand k8s PVCs without losing data
#region Install
# Check the current cluster
kubectl config current-context
# Add bitnami repo
helm repo list
helm repo add bitnami https://charts.bitnami.com/bitnami
@vutkin
vutkin / rancher-argocd.md
Created August 10, 2021 20:19 — forked from janeczku/rancher-argocd.md
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy

@vutkin
vutkin / pom.xml
Created September 4, 2020 09:07 — forked from fatroom/pom.xml
Maven exclude transitive dependencies by wildcard
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>*</artifactId>
</exclusion>
@vutkin
vutkin / Jenkinsfile
Created June 15, 2020 21:06 — forked from letsrokk/Jenkinsfile
Allure Summary Email using Email-ext Jenkins Plugin
node {
stage('Test') {
//... test execution steps
}
stage('Build report'){
allure includeProperties: false, jdk: '', results: [[path: 'target/allure-results']]
}
stage('Send Summary'){
emailext body: '''${SCRIPT, template="allure-report.groovy"}''',
subject: "[Jenkins] Test Execution Summary",
@vutkin
vutkin / gist:15280c97ed669419b62c7ac47c618d98
Created January 30, 2020 20:33 — forked from sumardi/gist:5559896
Subdirectory checkouts with Git sparse-checkout
# New repository
mkdir <repo> && cd <repo>
git init
git remote add –f <name> <url>
git config core.sparsecheckout true
echo some/dir/ >> .git/info/sparse-checkout
echo another/sub/tree >> .git/info/sparse-checkout
git pull <remote> <branch>
# Existing repository
@vutkin
vutkin / kubectl.md
Created June 26, 2019 15:12 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@vutkin
vutkin / nginx.conf
Created June 22, 2019 22:26 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@vutkin
vutkin / config.ini
Created June 11, 2019 20:50 — forked from terryoy/config.ini
Python example to show usage of command line arguments, configurations, and exceptions
[helloworld]
name = Terry
@vutkin
vutkin / shared_folder_centos_virtualbox.txt
Created May 31, 2019 15:57 — forked from larsar/shared_folder_centos_virtualbox.txt
Mount shared folder on CentOS in VirtualBox
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@vutkin
vutkin / gcsettings.sh
Created May 5, 2019 10:08 — forked from svanoort/gcsettings.sh
Blessed GC settings for big servers
# Base settings and GC logging
-server -XX:+AlwaysPreTouch # First should be default, but we make it explicit, second pre-zeroes memory mapped pages on JVM startup -- improves runtime performance
# -Xloggc:gc-%t.log # CUSTOMIZE LOCATION HERE - $path/gc-%t.log -- the %t in the gc log file path is so we get a new file with each JVM restart
-XX:NumberOfGCLogFiles=5 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=20m # Limits the number of files, logs to folder
-XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause
-XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy # gather info on object age & reference GC time for further tuning if needed.
# G1 specific settings -- probably should be default for multi-core systems with >2 GB of heap (below that, default is probably fine)
-XX:+UseG1GC
-XX:+UseStringDeduplication