Skip to content

Instantly share code, notes, and snippets.

View fawix's full-sized avatar
🐱
Seeking wonders

Fatima Silveira fawix

🐱
Seeking wonders
View GitHub Profile
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: nginx-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: nginx-deployment
minReplicas: 1
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
# this value goes away - we don't need to explicitly set the number of replicas anymore!
# replicas: 3
selector:
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- name: http
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:stable-alpine
ports:
- containerPort: 80
apiVersion: v1
kind: Node
metadata:
annotations:
[LIST OF ANNOTATIONS]
creationTimestamp: "2021-10-27T04:26:00Z"
Labels:
[LIST OF LABELS]
name: gke-sample-default-pool-0b1e04f1-msit
resourceVersion: "27591622"
apiVersion: [api version]
kind: [object type]
metadata:
annotations:
[LIST OF ANNOTATIONS]
labels:
[LIST OF LABELS]
name: [name of entity]
spec:
[describe desired state]
steps:
- id: 'obtain connection information'
name: 'gcr.io/cloud-builders/gcloud'
waitFor: ['-']
dir: db
entrypoint: 'bash'
args:
- -c
- >
gcloud secrets versions access latest --secret "${_CREDS}" --format='get(payload.data)' | base64 -d >> credentials.json &&
@fawix
fawix / cicd-hana-Dockerfile
Last active August 29, 2020 23:45
Dockerfile for HANA build container
# Licensing CC BY-SA 4.0
FROM ubuntu
WORKDIR /usr/src/app
RUN apt-get update && \
apt-get install -y apt-utils && \
apt-get install -y openjdk-8-jre && \
apt-get install -y git && \
@fawix
fawix / cicd-translate-cloudbuild.yaml
Last active January 11, 2022 09:29
translate/cloudbuild.yaml
# Licensing CC BY-SA 4.0
Steps:
# CI Pipeline: static tests
- id: 'app-hana-be: static tests'
name: 'gcr.io/$PROJECTID/be-build-env'
waitFor: ['-']
dir: translate
args:
- -c
- >