IMPORTANT: metrics-server is included by default in custom clusters in Rancher v2.0.7 and higher, these steps are not needed when clusters are created using Rancher v2.0.7 or higher.
kube_api:
pod_security_policy: false
extra_args:
IMPORTANT: metrics-server is included by default in custom clusters in Rancher v2.0.7 and higher, these steps are not needed when clusters are created using Rancher v2.0.7 or higher.
kube_api:
pod_security_policy: false
extra_args:
#/bin/sh | |
# | |
# Reasonably sets OS X defaults. My sources: | |
# - https://ss64.com/osx/syntax-defaults.html | |
# - https://github.com/nicksp/dotfiles/blob/master/osx/set-defaults.sh | |
# - https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
# | |
# ########################################################## # | |
# Makefile for Golang Project | |
# Includes cross-compiling, installation, cleanup | |
# ########################################################## # | |
# Check for required command tools to build or stop immediately | |
EXECUTABLES = git go find pwd | |
K := $(foreach exec,$(EXECUTABLES),\ | |
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH))) |
// For all the confusing Prometheus configuration and | |
// regular expressions, | |
// explained in examples. | |
// Remember, there are default values for each item if it's missing. | |
// regex is (.*), | |
// replacement is $1, | |
// separator is ; | |
// ,and action is replace |
#cloud-config | |
# Upgrade the instance on first boot | |
# (ie run apt-get upgrade) | |
# | |
# Default: false | |
# Aliases: apt_upgrade | |
package_upgrade: true | |
# Install additional packages on first boot |
#cloud-config | |
ssh_authorized_keys: | |
- ssh-rsa PutYourKeysHere | |
coreos: | |
locksmith: | |
endpoint: "https://127.0.0.1:2379" | |
etcd_cafile: /etc/ssl/certs/ca.pem | |
etcd_certfile: /etc/ssl/client/client.pem | |
etcd_keyfile: /etc/ssl/client/client.key |
#!/usr/bin/env groovy | |
// https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy | |
// http://stackoverflow.com/a/40294220 | |
// https://JENKINS_HOST/scriptApproval/ - for script approval | |
import java.util.Date | |
def isMaster = env.BRANCH_NAME == 'master' | |
def isDevelop = env.BRANCH_NAME == 'develop' |
{ | |
"ignition": { "version": "2.0.0" }, | |
"systemd": { | |
"units": [ | |
{ | |
"name": "auto-update-kmods.service", | |
"enable": true, | |
"contents": "[Unit]\nDescription=Install custom kernel modules\nAfter=lib-modules.mount network-online.target\nRequires=lib-modules.mount network-online.target\nConditionPathExists=!/opt/modules/%v\nConditionPathExistsGlob=/lib/modules/auto-update-kmods.d/*.sh\n\n[Service]\nType=oneshot\nExecStart=/bin/bash -ex /lib/modules/auto-update-kmods.sh\n\n[Install]\nWantedBy=multi-user.target\n" | |
}, | |
{ |
// MARK: - Adding a header to a single request | |
func doRequestWithHeaders1() { | |
let headers: HTTPHeaders = [ | |
"X-Mashape-Key": MY_API_KEY, | |
"Accept": "application/json" | |
] | |
Alamofire.request("https://mashape-community-urban-dictionary.p.mashape.com/define?term=smh", headers: headers) | |
.responseJSON { response in | |
debugPrint(response) |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |