Skip to content

Instantly share code, notes, and snippets.

Avatar

Adrian Wyssmann papanito

View GitHub Profile
@janeczku
janeczku / rancher-argocd.md
Created Jun 10, 2020
How to register Rancher managed Kubernetes clusters in Argo CD
View rancher-argocd.md

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

@papanito
papanito / k8s-metricbeat.values.yaml
Last active Jun 9, 2020
An example `values.yaml` for installing `helm install k8s-metricbeat stable/metricbeat --namespace kube-system -f k8s-metricbeat.values.yaml`. It does not yet include shipping secret
View k8s-metricbeat.values.yaml
# The instances created by daemonset retrieve most metrics from the host
daemonset:
enabled: true
podAnnotations: []
priorityClassName: ""
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
nodeSelector: {}
View zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@xtream1101
xtream1101 / Backup&RestoreRepo.md
Created Jun 29, 2019
Backup and restore a git repo using git bundle
View Backup&RestoreRepo.md

Backup/archive a repo

  1. Clone the repo
git clone --mirror https://github.com/vuejs/vue
  1. cd into the cloned repo
  2. Create a bundle file in the parent directory
git bundle create ../vuejs_vue.bundle --all
@Jachimo
Jachimo / README.md
Created Jun 2, 2018
Using ZeroTier to route between two UniFi USG LANs
View README.md

Routing between two UniFi USG based LANs with ZeroTier

Intro

This is a quick explanation of how to configure both ZeroTier and two Ubiquiti UniFi USGs to allow routing between two IPv4 networks. Both networks are in private (RFC1918) address space and each one has its own DHCP service. There is no need for NAT between them, only IP routing.

The two networks are 192.168.1.0/24 (call this the "left" network) and 192.168.10.0/24 (the "right" network) but they can be anything. Also, you can have multiple CIDR blocks on one side or the other of the ZeroTier route; if you do, you just have to create more routing table entries.

@OCram85
OCram85 / tag-link-snippet.md
Created Jan 16, 2018
Simple Jekyll Tag Linking w/o plugins (beautiful-jekyll jekyll theme)
View tag-link-snippet.md
@tnsasse
tnsasse / Jenkinsfile
Last active Apr 4, 2018
Jenkinsfile for Gitflow Pipeline: different deployments for dev/release/master branch
View Jenkinsfile
node {
checkout scm
stage('Build') {
def mvnHome = tool 'M3'
sh "${mvnHome}/bin/mvn package"
}
stage('Deploy') {
if (env.BRANCH_NAME == 'develop') {
View Get Jenkins GDSL working with IntelliJ IDEA
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@pavlov99
pavlov99 / ansible-galaxy-find-role-id.sh
Created Mar 27, 2017
Find your role's id in ansible-galaxy
View ansible-galaxy-find-role-id.sh
$ ansible-galaxy info YourUser.RoleName | grep -E 'id: [0-9]' | awk {'print $2'}
@rponte
rponte / get-latest-tag-on-git.sh
Last active Dec 2, 2020
Getting latest tag on git repository
View get-latest-tag-on-git.sh
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
You can’t perform that action at this time.