Skip to content

Instantly share code, notes, and snippets.

View mjudeikis's full-sized avatar
👽
Brewing something new...

Mangirdas Judeikis mjudeikis

👽
Brewing something new...
View GitHub Profile
apiVersion: "etcd.database.coreos.com/v1beta2"
kind: "EtcdBackup"
metadata:
name: master-etcd-cluster-backup
namespace: default
spec:
etcdEndpoints:
- "https://master-000000:2379"
- "https://master-000001:2379"
- "https://master-000002:2379"
cs.Properties.AuthProfile = &AuthProfile{}
cs.Properties.AuthProfile.IdentityProviders = make([]IdentityProvider, len(oc.Properties.AuthProfile.IdentityProviders))
for i, ip := range oc.Properties.AuthProfile.IdentityProviders {
cs.Properties.AuthProfile.IdentityProviders[i].Name = ip.Name
switch provider := ip.Provider.(type) {
case (*v1.AADIdentityProvider):
cs.Properties.AuthProfile.IdentityProviders[i].Provider = &AADIdentityProvider{
ClientID: provider.ClientID,
Secret: provider.Secret,
Kind: provider.Kind,
type AuthProfile struct {
IdentityProviders []IdentityProvider `json:"identityProviders,omitempty"`
}
// IdentityProvider is heavily cut down equivalent to IdentityProvider in the
// OpenShift master config. We can add fields to match as we need to.
type IdentityProvider struct {
Name string `json:"name,omitempty"`
Provider runtime.Object `json:"provider,omityempty"`
}
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
func CheckDNS(ctx context.Context, eipc network.PublicIPAddressesClient, lbc network.LoadBalancerFrontendIPConfigurationsClient, cs *acsapi.ContainerService) error {
// get master fqdn from ip-apiserver loadbalancer
ip, err := eipc.Get(ctx, cs.Properties.AzProfile.ResourceGroup, "ip-apiserver", "")
if err != nil {
return err
}
if *ip.DNSSettings.Fqdn != cs.Properties.MasterProfile.FQDN {
return fmt.Errorf("ip-address fqdn %s do not match configuration %s", ip.DNSSettings.Fqdn, cs.Properties.MasterProfile.FQDN)
[root@vm ~]# yum list *origin-docker* --show-duplicates
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: linux.cc.lehigh.edu
* extras: mirror.cs.pitt.edu
* updates: mirror.es.its.nyu.edu
Available Packages
origin-docker-excluder.noarch 3.6.0-1.0.c4dd4cf openshift-origin
origin-docker-excluder.noarch 3.6.1-1.0.008f2d5 openshift-origin
origin-docker-excluder.noarch 3.7.0-1.0.7ed6862 openshift-origin
- name: "SCORED | 1.1.1.1 | PATCH | Ensure mounting of cramfs filesystems is disabled"
lineinfile:
dest: /etc/modprobe.d/CIS.conf
regexp: "^(#)?install cramfs(\\s|$)"
line: "install cramfs /bin/true"
create: yes
when:
- rhel7cis_rule_1_1_1_1
tags:
- level1
@mjudeikis
mjudeikis / compute-postrestart
Created June 5, 2018 14:16
debug azure 3070
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
KUBE-SERVICES all -- anywhere anywhere /* kubernetes service portals */
KUBE-PORTALS-CONTAINER all -- anywhere anywhere /* handle ClusterIPs; NOTE: this must be before the NodePort rules */
DOCKER all -- anywhere anywhere ADDRTYPE match dst-type LOCAL
KUBE-NODEPORT-CONTAINER all -- anywhere anywhere ADDRTYPE match dst-type LOCAL /* handle service NodePorts; NOTE: this must be the last rule in the chain */
KUBE-HOSTPORTS all -- anywhere anywhere /* kube hostport portals */ ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
@mjudeikis
mjudeikis / gist:b47558817620dac7f39e818c8da2a306
Last active June 5, 2018 13:39
check pod status and waits openshift
sleep 30
#we can start deploying only when SDN is converged and ready
finished=false
while [ ${finished} == false ] ; do
PODS=$(oc get pod -o name)
echo $finished
finished=true
while read -r po; do
ready=$(oc get $po -o jsonpath='{.status.containerStatuses[0].ready}')
echo $ready

Keybase proof

I hereby claim:

  • I am mjudeikis on github.
  • I am mjudeikis (https://keybase.io/mjudeikis) on keybase.
  • I have a public key ASCqbYzBH2r9nB7W85XsAVZz7pFHh8hiaJJWhP9ozSnBtAo

To claim this, I am signing this object: