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
apiVersion: serving.knative.dev/v1 | |
kind: Service | |
metadata: | |
name: cloudrun-sample | |
spec: | |
template: | |
spec: | |
containers: | |
- image: clouddeploy-cloudrun-app-image |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: hello-skaffold-gke-deployment | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hello-skaffold-gke |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: hello-skaffold-gke-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hello-skaffold-gke | |
template: |
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
apiVersion: skaffold/v2beta16 | |
kind: Config | |
metadata: | |
name: hello-skaffold-gke | |
build: | |
artifacts: | |
- image: hello-skaffold-gke | |
jib: {} | |
deploy: | |
kubectl: |
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
package org.bk.samples.cache; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.Matchers.equalTo; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
import org.junit.Test; |
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
plugins{ | |
id 'java' | |
id "io.github.bijukunjummen.cloudfunction" | |
} | |
dependencies { | |
... | |
} | |
cloudFunction { |
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
configurations { | |
invoker | |
} | |
dependencies { | |
... | |
invoker("com.google.cloud.functions.invoker:java-function-invoker:1.1.0") | |
... | |
} |
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 com.google.cloud.functions.HttpFunction; | |
import com.google.cloud.functions.HttpRequest; | |
import com.google.cloud.functions.HttpResponse; | |
public class HelloHttp implements HttpFunction { | |
@Override | |
public void service(HttpRequest request, HttpResponse response) throws IOException { | |
final BufferedWriter writer = response.getWriter(); | |
response.setContentType("application/html"); |
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
package org.bk.logback.custom; | |
import ch.qos.logback.classic.Level; | |
import ch.qos.logback.classic.spi.ILoggingEvent; | |
import ch.qos.logback.contrib.json.classic.JsonLayout; | |
import com.google.cloud.logging.Severity; | |
import java.util.Map; | |
public class GcpJsonLayout extends JsonLayout { |
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
export PROJECT=$(gcloud config get-value project) | |
export PROJECT_1=${PROJECT} | |
export LOCATION_1=us-west1-a | |
export CLUSTER_1=cluster1 | |
export CTX_1="gke_${PROJECT_1}_${LOCATION_1}_${CLUSTER_1}" | |
export PROJECT_2=${PROJECT} | |
export LOCATION_2=us-central1-a | |
export CLUSTER_2=cluster2 | |
export CTX_2="gke_${PROJECT_2}_${LOCATION_2}_${CLUSTER_2}" |