Skip to content

Instantly share code, notes, and snippets.

View harshavardhana's full-sized avatar
🌚
I may be slow to respond.

Harshavardhana harshavardhana

🌚
I may be slow to respond.
View GitHub Profile

Creating PersistentVolumes

Slack Docker Pulls

We recommend using local Persistent Volumes as the backing storage for MinIO StatefulSets. MinIO creates a distributed, resilient, failure tolerant storage system on local PVs. There is no explicit dependency on external distributed file systems or CSI vendors.

This document explains how to create local PVs. Once you create these PVs, MinIOInstance PVCs should automatically bind to these PVs.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,

Start Dex

~ ./bin/dex serve dex.yaml
time="2020-07-12T20:45:50Z" level=info msg="config issuer: http://127.0.0.1:5556/dex"
time="2020-07-12T20:45:50Z" level=info msg="config storage: sqlite3"
time="2020-07-12T20:45:50Z" level=info msg="config static client: Example App"
time="2020-07-12T20:45:50Z" level=info msg="config connector: mock"
time="2020-07-12T20:45:50Z" level=info msg="config connector: local passwords enabled"
time="2020-07-12T20:45:50Z" level=info msg="config response types accepted: [code token id_token]"
// +build ignore
/*
* MinIO Go Library for Amazon S3 Compatible Cloud Storage
* Copyright 2015-2017 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
## Create headless service to StatefulSet to work.
apiVersion: v1
kind: Service
metadata:
name: minio-headless
labels:
app: minio-headless
spec:
ports:
- port: 9000
## Create service of minio dist xl StatefulSet.
apiVersion: v1
kind: Service
metadata:
name: minio
spec:
type: NodePort
ports:
- port: 9000
selector:
apiVersion: networking.k8s.io/v1beta1 # for versions before 1.14 use extensions/v1beta1
kind: Ingress
metadata:
name: minio-ingress
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/proxy-body-size: 0
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/configuration-snippet: |
package main
import (
"fmt"
"log"
"net"
"os"
"github.com/minio/minio-go/v6/pkg/set"
)
---
# Source: calico/templates/calico-config.yaml
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
# Typha is disabled.
@harshavardhana
harshavardhana / hash-set.py
Last active March 3, 2020 22:25
Shows given key name and set count, what is the set index used.
#!/usr/bin/env python3
import argparse
import binascii, sys
parser = argparse.ArgumentParser(description='Set indexer')
parser.add_argument('key', metavar='KEY', type=str, help='key name for the hash index')
parser.add_argument('setcount', metavar='SET', type=int, help='total set counts')
args = parser.parse_args()