Skip to content

Instantly share code, notes, and snippets.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-landing-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-landing
spec:
selector:
matchLabels:
app: my-landing
template:
metadata:
FROM nginx:stable-alpine
COPY ./landing/index.html /usr/share/nginx/html
COPY ./landing/assets /usr/share/nginx/html/assets
stages:
- name: Publish - Landing
when:
branch: master
steps:
- publishImageConfig:
dockerfilePath: ./Dockerfile
buildContext: .
tag: my-landing:${CICD_EXECUTION_SEQUENCE}
pushRemote: true
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: micro-api-ingress
namespace: micro
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/issuer: "micro-prod"
spec:
rules:
apiVersion: apps/v1
kind: Deployment
metadata:
name: helloworld
namespace: micro
labels:
project: micro
micro: service
name: helloworld
version: latest
FROM alpine
ADD helloworld /helloworld
ENTRYPOINT [ "/helloworld" ]
package handler
import (
"context"
log "github.com/micro/micro/v3/service/logger"
helloworld "helloworld/proto"
)
syntax = "proto3";
package helloworld;
service Helloworld {
rpc Call(Request) returns (Response) {}
}
message Request {
string name = 1;
package main
import (
"helloworld/handler"
pb "helloworld/proto"
"github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger"
)