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
name: workflow-dispatch-with-environment | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice |
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
name: workflow-dispatch-with-environment | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice |
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
name: release-with-environment | |
on: | |
release: | |
types: [released] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
environment: production |
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
resource "google_bigquery_dataset" "test_dataset" { | |
dataset_id = "test_dataset" | |
friendly_name = "test_dataset" | |
description = "This is a test dataset" | |
location = "asia-northeast1" | |
labels = { | |
terraform = "true" | |
} |
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
resource "google_service_account" "workbench-default" { | |
account_id = "workbench-default" | |
display_name = "Default service account for AI workbench" | |
} | |
resource "google_project_iam_binding" "workbench-default-bigquery-data-viwer" { | |
project = var.project | |
role = "roles/bigquery.dataViewer" | |
members = ["serviceAccount:${google_service_account.workbench-default.email}"] | |
} |
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
resource "google_notebooks_instance" "test-notebook" { | |
name = "test-notebook" | |
project = "naka-test-notebook" | |
location = "asia-northeast1-b" | |
machine_type = "n1-standard-1" // n1-standard-1 $41.01 monthly estimate | |
install_gpu_driver = false | |
instance_owners = ["naka@gmail.com"] | |
vm_image { // https://cloud.google.com/vertex-ai/docs/workbench/user-managed/images | |
project = "deeplearning-platform-release" | |
image_family = "common-cpu-notebooks" |
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
resource "google_project_iam_audit_config" "all-services" { | |
project = "<your project>" | |
service = "allServices" | |
audit_log_config { | |
log_type = "ADMIN_READ" | |
} | |
audit_log_config { | |
log_type = "DATA_READ" | |
} | |
audit_log_config { |
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 ( | |
appsv1 "k8s.io/api/apps/v1" // added | |
corev1 "k8s.io/api/core/v1" // added | |
"k8s.io/apimachinery/pkg/api/errors" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // added | |
"k8s.io/apimachinery/pkg/types" // added | |
"context" |
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
func (r *MemcachedReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { | |
log := r.Log.WithValues("memcached", req.NamespacedName) | |
// 1. Fetch the Memcached instance | |
memcached := &cachev1alpha1.Memcached{} | |
err := r.Get(ctx, req.NamespacedName, memcached) | |
if err != nil { | |
if errors.IsNotFound(err) { | |
log.Info("1. Fetch the Memcached instance. Memcached resource not found. Ignoring since object must be deleted") | |
return ctrl.Result{}, nil |
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 ( | |
appsv1 "k8s.io/api/apps/v1" | |
corev1 "k8s.io/api/core/v1" | |
"k8s.io/apimachinery/pkg/api/errors" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
"k8s.io/apimachinery/pkg/types" | |
"reflect" //added | |
"context" |
NewerOlder