Skip to content

Custom Harbor Usage Example

Anıl Kaynar edited this page Jul 24, 2025 · 2 revisions

Custom Harbor Usage Example

Example Local Harbor deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: minimalnextollamachat
  namespace: development
spec:
  replicas: 1
  selector:
    matchLabels:
      app: minimalnextollamachat
  template:
    metadata:
      labels:
        app: minimalnextollamachat
    spec:
      containers:
      - name: minimalnextollamachat
        image: myharbor.local:8280/library/minimalnextollamachat:latest
        imagePullPolicy: Always

UpdatePod Configuration

apiVersion: apps/v1
kind: Deployment
metadata:
  name: updatepod
  namespace: development
spec:
  replicas: 1
  selector:
    matchLabels:
      app: updatepod
  template:
    metadata:
      labels:
        app: updatepod
    spec:
      serviceAccountName: updatepod-sa
      containers:
        - name: updatepod
          image: aanilkay/updatepod:latest
          env:
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME_PREFIX
              value: minimalnextollamachat
            - name: USE_HARBOR
              value: "true"
            - name: HARBOR_ROBOT_USER
              value: "robotuser$library+robot"
            - name: HARBOR_ROBOT_TOKEN
              value: "token"
            - name: RESTART_INTERVAL_MINUTES
              value: "10"

Clone this wiki locally