Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamen Keroack bkeroackdsc

View GitHub Profile
View gist:c282b8473fd35127eee2
apiVersion: v1beta3
kind: ReplicationController
metadata:
name: kube-dns-v2
namespace: default
labels:
k8s-app: kube-dns-v2
kubernetes.io/cluster-service: "true"
spec:
replicas: 1
View example.go
// example of using a txn
import "github.com/pkg/errors"
import "database/sql"
// ...
// UpdateUserEmailAddress updates a user's email address and adds a user event, or returns an error
func (ds *Datastore) UpdateUserEmailAddress(id uint64, emailAddress string) (err error) {
tx, err := ds.db.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable})
View example-optional-deps.yaml
# example acy.yml
# other sections omitted
dependencies:
direct:
- name: db
chart_path: .helm/charts/mysql
optional:
- name: workers
chart_path: .helm/charts/workers
View keybase.md

Keybase proof

I hereby claim:

  • I am bkeroackdsc on github.
  • I am bkeroackdsc (https://keybase.io/bkeroackdsc) on keybase.
  • I have a public key ASBm2nW9KxmvYA7Sb-UaT5Dtk7urcXMjRCE0d1VNZQ-obgo

To claim this, I am signing this object:

View example_checker.go
// Version models a specific version of a software package
type Version struct {
SemVersion string // this could probably be structured if we care about major vs minor vs patchlevel
Released time.Time
}
// VersionChecker describes an object that can check if a version of software is out of date with upstream
type VersionChecker interface {
// Check returns whether currentVersion is out-of-date and returns the newest available version, or error
Check(currentVersion Version) (outdated bool, newestVersion Version, err error)