Skip to content

Instantly share code, notes, and snippets.

View michalpenka's full-sized avatar

Michal Pěnka michalpenka

View GitHub Profile
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
type: LoadBalancer
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ing-helloworld
namespace: helloworld
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: www.helloworld.local
apiVersion: v1
kind: Namespace
metadata:
name: cert-manager
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
spec:
acme:
server: https://acme-staging-v02.api.letsencrypt.org/directory
email: michal@helloworld.com
privateKeySecretRef:
name: letsencrypt-staging
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: michal@helloworld.com
privateKeySecretRef:
name: letsencrypt-prod
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ing-helloworld
namespace: helloworld
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-staging"
spec:
tls:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ing-helloworld
namespace: helloworld
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
apiVersion: v1
kind: ServiceAccount
metadata:
name: sa-azdo-helloworld-sc
namespace: helloworld
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: rle-azdo-helloworld-sc
trigger:
- master
resources:
- repo: self
variables:
tagBuild: '$(Build.BuildId)'
stages:
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-helloworld
namespace: helloworld
spec:
replicas: ${APP_REPLICAS}
selector:
matchLabels:
app: app-helloworld