[TIL] 2024-08-19

pipiolo·2024년 8월 19일
0

Today I Learned

목록 보기
2/2

What I Did?

  • Certified Kubernetes Application Developer (CKAD) 자격증 준비
  • Scala SBT Plugin

What I Learned?

Kubernetes ReplicaSet 복제 개수 변경 방법

kubectl scale --replicas=5 -f replicaset-definition.yaml

Kubernetes Deployment - ReplicaSet - Pod 관계

kubectl namespace 변경

kubectl config set-context $(kubectl config current-context) --namespace=dev

Namespace 자원 할당

apiVersion: v1
kinf: ResourceQuota
metadata:
	name: DevNamespace-Quota
    namespace: dev

Scala SBT Plugin

sbtPlugin := true

build.sbt 에 Plugin 을 명시한다.

AutoPlugin 을 상속한다.

import sbt._
import sbt.Keys._

object MyPlugin extends AutoPlugin {
  // 플러그인 자동 활성황 여부
  override def trigger = allRequirements // or noTrigger
  
  // 다른 플러그인에 대한 의존성
  override def requires = plugins.JvmPlugin

  // 모든 빌드와 프로젝트에 적용된다. 전역 설정
  override lazy val globalSettings = Seq(
    onLoadMessage := "Welcome to SBT!"
  )
  
  // ScalaVersion, Organization 등 빌드 전체 영역
  override lazy val buildSettings = Seq(
  	ThisBuild / scalaVersion := "2.12.18"
    ThisBuild / organization := "com.example.organization"
  )

  // 개별 프로젝트 (모듈) 적용
  override lazy val projectSettings = Seq(
  	...
  )
}

0개의 댓글