Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Abhishek Gupta abhirockzz

:octocat:
Focusing
View GitHub Profile
View deployment-with-config-in-volume.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: testapp
spec:
selector:
matchLabels:
app: testapp
replicas: 1
template:
@abhirockzz
abhirockzz / env-from.yaml
Last active Aug 6, 2019
using envVar in pod spec
View env-from.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: config2
data:
FOO_ENV: bar
HELLO_ENV: world
---
apiVersion: v1
kind: Pod
@abhirockzz
abhirockzz / example.yaml
Last active Aug 5, 2019
simple config map with pod using the its data
View example.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: simpleconfig
data:
foo: bar
hello: world
---
apiVersion: v1
kind: Pod
@abhirockzz
abhirockzz / pod2.yaml
Created Aug 5, 2019
pod using env vars from config map
View pod2.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod2
spec:
containers:
- name: nginx
image: nginx
env:
- name: FOO_ENV_VAR
View pod-using-raw-env-vars.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod1
spec:
containers:
- name: nginx
image: nginx
env:
- name: ENVVAR1
@abhirockzz
abhirockzz / deployment-with-persistent-storage-details.yaml
Last active Aug 5, 2019
deployment-with-persistent-storage-details.yaml
View deployment-with-persistent-storage-details.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
labels:
app: myapp
spec:
replicas: 2
selector:
matchLabels:
View azure-disk-pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: azure-disk-pv
spec:
capacity:
storage: 2Gi
storageClassName: manual
volumeMode: Filesystem
accessModes:
View authrp.java
private ObjectStorage objStoreClient = null;
final ResourcePrincipalAuthenticationDetailsProvider provider
= ResourcePrincipalAuthenticationDetailsProvider.builder().build();
public ObjectStoreListFunction() {
try {
objStoreClient = new ObjectStorageClient(provider);
View kubectl-output-exec.json
{
"tunnels": [
{
"name": "command_line",
"uri": "/api/tunnels/command_line",
"public_url": "https://b42658ec.ngrok.io",
"proto": "https",
"config": {
"addr": "http://nginx-service:80",
"inspect": true
View Dockerfile-fn-oci-compute
FROM fnproject/go:dev as build-stage
WORKDIR /function
RUN go get -u github.com/golang/dep/cmd/dep
ADD . /go/src/func/
RUN cd /go/src/func/ && dep ensure
RUN cd /go/src/func/ && go build -o func
FROM fnproject/go
WORKDIR /function
COPY --from=build-stage /go/src/func/func /function/
You can’t perform that action at this time.