This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import Foundation | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
var request = URLRequest(url: URL(string: "https://api.github.com/")!) | |
request.httpMethod = "GET" | |
let task = URLSession.shared.dataTask(with: request) { data, response, error in | |
guard let data = data, error == nil else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import Foundation | |
let now = Date() | |
let future = Date(timeIntervalSinceNow: TimeInterval(1000000)) | |
let currentCalendar = Calendar.current | |
let calendarScale: Set<Calendar.Component> = [.day, .hour, .minute] | |
let difference = currentCalendar.dateComponents(calendarScale, from: now, to: future) | |
print("Days: \(difference.day!) Hours: \(difference.hour!) Seconds: \(difference.minute!)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{ .Chart.Name }} | |
labels: | |
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | |
spec: | |
replicas: {{ .Values.api.replicas }} | |
template: | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "affinity_notation" }} | |
affinity: | |
nodeAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
nodeSelectorTerms: | |
- matchExpressions: | |
- key: {{ .Values.nodeAffinity.key }} | |
operator: In | |
values: | |
- {{ .Values.nodeAffinity.value }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "ruby_api_deployment" }} | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{ .Values.rubyApi.name }}-api | |
labels: | |
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | |
annotations: | |
"helm/created": {{ .Release.Time.Seconds | quote }} | |
spec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment: integration | |
nodeAffinity: | |
key: cloud.google.com/gke-nodepool | |
value: default | |
rubyApi: | |
name: guest | |
replicas: 1 | |
livenessProbe: | |
type: livenessProbe | |
path: /health.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "affinity_notation" }} | |
affinity: | |
nodeAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
nodeSelectorTerms: | |
- matchExpressions: | |
- key: {{ .Values.nodeAffinity.key }} | |
operator: In | |
values: | |
- {{ .Values.nodeAffinity.value }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
- name: shared-helm-templates | |
version: 1.0.0 | |
#repository: https://github.com/raw/martincalvert/helms/master | |
repository: file://../shared-helm-templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: {{ .Values.app.name }}-nginx-config | |
labels: | |
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | |
app: matterhorn-{{ .Values.app.name }} | |
tier: nginx | |
data: | |
nginx.conf: |- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{ .Values.ruby.app.name }}-api | |
labels: | |
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | |
annotations: | |
"helm/created": {{ .Release.Time.Seconds | quote }} | |
spec: | |
replicas: {{ .Values.ruby.app.replicas }} |
OlderNewer