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
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: default-view | |
subjects: | |
- kind: ServiceAccount | |
name: kubernetes-dashboard | |
namespace: default | |
- kind: ServiceAccount | |
name: kubernetes-dashboard |
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
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: default-view | |
subjects: | |
- kind: ServiceAccount | |
name: default | |
namespace: default | |
- kind: ServiceAccount | |
name: default |
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
gcloud config set container/use_v1_api_client false | |
gcloud beta container clusters get-credentials cluster-1 --region us-central1 |
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
const Foobar = () => ( | |
<Map | |
{...viewport} | |
mapStyle="mapbox://styles/mapbox/dark-v9" | |
onViewportChange={onChangeViewport}> | |
<div className="map-navigation-control"> | |
<NavigationControl onViewportChange={onChangeViewport} /> | |
</div> | |
<Line | |
coords={[ |
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
import PropTypes from 'prop-types'; | |
import React from 'react'; | |
import MapGL from 'react-map-gl'; | |
// Note: this is pretty much identical to react-map-gl/utils/automount. Because | |
// we are subclassing InteractiveMap (and how property inheritance works), | |
// we need to pass the parent in for autobinding along with the current instance. | |
const PREDEFINED = [ | |
'constructor', 'render', 'componentWillMount', 'componentDidMount', | |
'componentWillReceiveProps', 'shouldComponentUpdate', 'componentWillUpdate', |
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
setInterval(function() { | |
$("iframe").each(function(i, elem) { $(elem).attr('src', $(elem).attr('src')) }) | |
}, 5000); |
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
# Convert resources.requests.memory into JVM heap sizes. | |
{{- define "memoryRequest" -}}{{ include "_memoryRequest" . | trim | trimSuffix "i" | lower }}{{- end -}} | |
{{- define "_memoryRequest" -}} | |
{{- $default := "256m" -}} | |
{{ if .Values.resources }} | |
{{ if (hasKey .Values.resources "requests") }} | |
{{ if (hasKey .Values.resources.requests "memory") }} | |
{{ .Values.resources.requests.memory }} | |
{{ 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
# zookeeper connection string | |
{{- define "zookeepers" -}}{{ include "_zookeepers" . | trim | replace "\n\n" "," | nospace }}{{- end -}} | |
{{- define "_zookeepers" -}} | |
{{ $values := . }} | |
{{ range $i, $e := until (int .Values.zookeeper.replicaCount) }} | |
{{ template "zookeeperName" $values }}-{{ $i }}.{{ template "headlessZookeeper" $values }} | |
{{ end }} | |
{{- end -}} |
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
# zookeeper connection string | |
{{- define "zookeepers" -}}{{ include "_zookeepers" . | trim | replace "\n\n" "," | nospace }}{{- end -}} | |
{{- define "_zookeepers" -}} | |
{{ $values := . }} | |
{{ range $i, $e := until (int .Values.zookeeper.replicaCount) }} | |
{{ template "zookeeperName" $values }}-{{ $i }}.{{ template "headlessZookeeper" $values }} | |
{{ end }} | |
{{- end -}} |
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
{{ $quorum := (add1 (div (int .Values.bookkeeper.replicaCount) 2)) }} | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
{{ include "labels" . | indent 4 }} | |
annotations: | |
"helm.sh/hook": post-install |