diff --git a/deploy/artifact-catalog.nc01-v02.json b/deploy/artifact-catalog.nc01-v02.json new file mode 100644 index 0000000..e50e8cf --- /dev/null +++ b/deploy/artifact-catalog.nc01-v02.json @@ -0,0 +1,30 @@ +{ + "lane": "v0.2", + "sourceBranch": "v0.2", + "gitopsBranch": "nc01-v0.2-gitops", + "sourceCommitId": "fb486d8f88ceb530ab338be437656350247f780b", + "summary": "build=1 reuse=0 placeholder=0", + "services": [ + { + "serviceId": "agentrun-mgr", + "artifactKind": "env-reuse", + "status": "reused", + "image": "127.0.0.1:5000/agentrun/agentrun-mgr-env:1e53423bd839491e589343de", + "digest": "sha256:6909b28d87d36ca9e6be70fc5eb64fd26bd552307361a7ece2fa00b5e33f3b4d", + "repositoryDigest": "127.0.0.1:5000/agentrun/agentrun-mgr-env@sha256:6909b28d87d36ca9e6be70fc5eb64fd26bd552307361a7ece2fa00b5e33f3b4d", + "imageTag": "1e53423bd839491e589343de", + "envIdentity": "1e53423bd839491e589343de", + "envImage": "127.0.0.1:5000/agentrun/agentrun-mgr-env:1e53423bd839491e589343de", + "envDigest": "sha256:6909b28d87d36ca9e6be70fc5eb64fd26bd552307361a7ece2fa00b5e33f3b4d", + "envRepositoryDigest": "127.0.0.1:5000/agentrun/agentrun-mgr-env@sha256:6909b28d87d36ca9e6be70fc5eb64fd26bd552307361a7ece2fa00b5e33f3b4d", + "bootCommit": "fb486d8f88ceb530ab338be437656350247f780b", + "bootScript": "deploy/runtime/boot/agentrun-boot.sh", + "provenance": { + "sourceCommitId": "fb486d8f88ceb530ab338be437656350247f780b", + "source": "unidesk-yaml-only", + "configSource": "config/agentrun.yaml", + "valuesPrinted": false + } + } + ] +} diff --git a/deploy/gitops/node/nc01/argocd/application-v02.yaml b/deploy/gitops/node/nc01/argocd/application-v02.yaml new file mode 100644 index 0000000..b6b449d --- /dev/null +++ b/deploy/gitops/node/nc01/argocd/application-v02.yaml @@ -0,0 +1 @@ +{apiVersion: argoproj.io/v1alpha1,kind: Application,metadata: {name: agentrun-nc01-v02,namespace: argocd,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},spec: {project: agentrun-nc01-v02,source: {repoURL: http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-agentrun.git,targetRevision: nc01-v0.2-gitops,path: deploy/gitops/node/nc01/runtime-v02},destination: {server: https://kubernetes.default.svc,namespace: agentrun-v02},syncPolicy: {automated: {prune: false,selfHeal: true},syncOptions: [CreateNamespace=true,ApplyOutOfSyncOnly=true]}}} diff --git a/deploy/gitops/node/nc01/argocd/project.yaml b/deploy/gitops/node/nc01/argocd/project.yaml new file mode 100644 index 0000000..aa4d69d --- /dev/null +++ b/deploy/gitops/node/nc01/argocd/project.yaml @@ -0,0 +1 @@ +{apiVersion: argoproj.io/v1alpha1,kind: AppProject,metadata: {name: agentrun-nc01-v02,namespace: argocd,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},spec: {description: AgentRun v0.2 GitOps lane,sourceRepos: [http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-agentrun.git,http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-agentrun.git],destinations: [{server: https://kubernetes.default.svc,namespace: agentrun-v02}],clusterResourceWhitelist: [{group: "",kind: Namespace}],namespaceResourceWhitelist: [{group: "*",kind: "*"}]}} diff --git a/deploy/gitops/node/nc01/runtime-v02/kustomization.yaml b/deploy/gitops/node/nc01/runtime-v02/kustomization.yaml new file mode 100644 index 0000000..3e846eb --- /dev/null +++ b/deploy/gitops/node/nc01/runtime-v02/kustomization.yaml @@ -0,0 +1 @@ +{apiVersion: kustomize.config.k8s.io/v1beta1,kind: Kustomization,resources: [namespace.yaml,mgr.yaml,runner-rbac.yaml]} diff --git a/deploy/gitops/node/nc01/runtime-v02/mgr.yaml b/deploy/gitops/node/nc01/runtime-v02/mgr.yaml new file mode 100644 index 0000000..ed22dfe --- /dev/null +++ b/deploy/gitops/node/nc01/runtime-v02/mgr.yaml @@ -0,0 +1,13 @@ +{apiVersion: v1,kind: ServiceAccount,metadata: {name: agentrun-nc01-v02-mgr,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}}} +--- +{apiVersion: v1,kind: Service,metadata: {name: agentrun-mgr,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},spec: {selector: {app.kubernetes.io/name: agentrun-mgr},ports: [{name: http,port: 8080,targetPort: http}]}} +--- +{apiVersion: apps/v1,kind: Deployment,metadata: {name: agentrun-mgr,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},spec: {replicas: 1,selector: {matchLabels: {app.kubernetes.io/name: agentrun-mgr}},template: {metadata: {labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01,app.kubernetes.io/name: agentrun-mgr},annotations: {agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/source-commit: fb486d8f88ceb530ab338be437656350247f780b,agentrun.pikastech.local/env-identity: 1e53423bd839491e589343de}},spec: {serviceAccountName: agentrun-nc01-v02-mgr,containers: [{name: mgr,image: 127.0.0.1:5000/agentrun/agentrun-mgr-env@sha256:6909b28d87d36ca9e6be70fc5eb64fd26bd552307361a7ece2fa00b5e33f3b4d,imagePullPolicy: IfNotPresent,ports: [{name: http,containerPort: 8080}],env: [{name: AGENTRUN_LANE,value: v0.2},{name: DATABASE_URL,valueFrom: {secretKeyRef: {name: agentrun-v02-mgr-db,key: DATABASE_URL}}},{name: AGENTRUN_SOURCE_COMMIT,value: fb486d8f88ceb530ab338be437656350247f780b},{name: AGENTRUN_BOOT_COMMIT,value: fb486d8f88ceb530ab338be437656350247f780b},{name: AGENTRUN_BOOT_MODE,value: mgr},{name: AGENTRUN_BOOT_REPO_URL,value: http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-agentrun.git},{name: AGENTRUN_ENV_IDENTITY,value: 1e53423bd839491e589343de},{name: AGENTRUN_RUNTIME_NAMESPACE,value: agentrun-v02},{name: AGENTRUN_INTERNAL_MGR_URL,value: http://agentrun-mgr.agentrun-v02.svc.cluster.local:8080},{name: AGENTRUN_RUNNER_IMAGE,value: 127.0.0.1:5000/agentrun/agentrun-mgr-env@sha256:6909b28d87d36ca9e6be70fc5eb64fd26bd552307361a7ece2fa00b5e33f3b4d},{name: AGENTRUN_RUNNER_SERVICE_ACCOUNT,value: agentrun-nc01-v02-runner},{name: AGENTRUN_RUNNER_JOB_NAME_PREFIX,value: agentrun-nc01-v02-runner},{name: AGENTRUN_RUNNER_API_KEY_SECRET_NAME,value: agentrun-v02-api-key},{name: AGENTRUN_RUNNER_API_KEY_SECRET_KEY,value: HWLAB_API_KEY},{name: AGENTRUN_GIT_MIRROR_BASE_URL,value: http://gitea-http.devops-infra.svc.cluster.local:3000},{name: AGENTRUN_RUNNER_IDLE_TIMEOUT_MS,value: "600000"},{name: AGENTRUN_BACKEND_RETRY_MAX_ATTEMPTS,value: "5"},{name: AGENTRUN_BACKEND_RETRY_INITIAL_BACKOFF_MS,value: "1000"},{name: AGENTRUN_BACKEND_RETRY_MAX_BACKOFF_MS,value: "30000"},{name: AGENTRUN_RUNNER_RETENTION_MAX_RUNNERS,value: "20"},{name: AGENTRUN_RUNNER_RETENTION_CLEANUP_ORDER,value: oldest-inactive-last-active-first},{name: AGENTRUN_RUNNER_RETENTION_ACTIVE_HEARTBEAT_MAX_AGE_MS,value: "900000"},{name: AGENTRUN_RUNNER_RETENTION_STALE_PENDING_MAX_AGE_MS,value: "900000"},{name: AGENTRUN_RUNNER_RETENTION_MATCH_LABELS_JSON,value: "{\"app.kubernetes.io/part-of\":\"agentrun\",\"app.kubernetes.io/name\":\"agentrun-runner\",\"app.kubernetes.io/component\":\"runner\"}"},{name: AGENTRUN_RUNNER_RETENTION_JOB_NAME_PREFIXES,value: "agentrun-nc01-v02-runner,agentrun-v02-runner,agentrun-v01-runner"},{name: AGENTRUN_RUNNER_RETENTION_AGE_BASED_CLEANUP_ENABLED,value: "false"},{name: AGENTRUN_RUNNER_RETENTION_AGE_BASED_MAX_AGE_HOURS,value: "48"},{name: AGENTRUN_CANCEL_DELIVERY_MODE,value: manager-epoch},{name: AGENTRUN_CANCEL_GRACEFUL_ABORT_MS,value: "15000"},{name: AGENTRUN_CANCEL_KILL_ESCALATION_MS,value: "30000"},{name: AGENTRUN_CANCEL_STALE_HEARTBEAT_FENCING_MS,value: "900000"},{name: AGENTRUN_CANCEL_LATE_WRITE_FENCING_ENABLED,value: "true"},{name: AGENTRUN_CANCEL_EVENT_STAGES,value: "accepted,persisted,delivered,aborting,terminalized,fenced,late-write-rejected"},{name: AGENTRUN_RUNNER_EGRESS_PROXY_URL,value: http://10.42.0.1:10808},{name: AGENTRUN_RUNNER_NO_PROXY_EXTRA,value: "localhost,127.0.0.1,::1,.svc,.svc.cluster.local,.cluster.local,hyueapi.com,.hyueapi.com,api.hwpod.com,api.pikapython.com,.pikapython.com"},{name: AGENTRUN_API_KEY,valueFrom: {secretKeyRef: {name: agentrun-v02-api-key,key: HWLAB_API_KEY}}},{name: AGENTRUN_KAFKA_BOOTSTRAP_SERVERS,value: platform-infra-kafka-kafka-bootstrap.platform-infra.svc.cluster.local:9092},{name: AGENTRUN_KAFKA_CLIENT_ID,value: agentrun-v02-manager},{name: AGENTRUN_KAFKA_ENABLED,value: "true"},{name: AGENTRUN_KAFKA_EVENT_TOPIC,value: agentrun.event.v1},{name: AGENTRUN_KAFKA_OUTBOX_BATCH_SIZE,value: "100"},{name: AGENTRUN_KAFKA_OUTBOX_INTERVAL_MS,value: "500"},{name: AGENTRUN_KAFKA_OUTBOX_LEASE_MS,value: "60000"},{name: AGENTRUN_KAFKA_OUTBOX_RETRY_BACKOFF_MS,value: "5000"},{name: AGENTRUN_KAFKA_STDIO_CLIENT_ID,value: agentrun-v02-runner},{name: AGENTRUN_KAFKA_STDIO_PRODUCE_ENABLED,value: "true"},{name: AGENTRUN_KAFKA_STDIO_TOPIC,value: codex-stdio.raw.v1},{name: AGENTRUN_MANAGER_RECONCILER_BATCH_SIZE,value: "20"},{name: AGENTRUN_MANAGER_RECONCILER_ENABLED,value: "true"},{name: AGENTRUN_MANAGER_RECONCILER_INTERVAL_MS,value: "2000"},{name: AGENTRUN_POSTGRES_POOL_MAX,value: "4"},{name: AGENTRUN_RUNNER_DISPATCHER_ATTEMPT_TIMEOUT_MS,value: "90000"},{name: AGENTRUN_RUNNER_DISPATCHER_BATCH_SIZE,value: "10"},{name: AGENTRUN_RUNNER_DISPATCHER_ENABLED,value: "true"},{name: AGENTRUN_RUNNER_DISPATCHER_INTERVAL_MS,value: "1000"},{name: AGENTRUN_RUNNER_DISPATCHER_LEASE_MS,value: "120000"},{name: AGENTRUN_RUNNER_DISPATCHER_MAX_ATTEMPTS,value: "5"},{name: AGENTRUN_RUNNER_DISPATCHER_RETRY_BACKOFF_MS,value: "5000"},{name: AGENTRUN_RUNNER_STARTUP_RETRY_INITIAL_BACKOFF_MS,value: "2000"},{name: AGENTRUN_RUNNER_STARTUP_RETRY_JITTER_RATIO,value: 0.2},{name: AGENTRUN_RUNNER_STARTUP_RETRY_MAX_ATTEMPTS,value: "5"},{name: AGENTRUN_RUNNER_STARTUP_RETRY_MAX_BACKOFF_MS,value: "16000"},{name: AGENTRUN_RUNNER_STARTUP_RETRY_MULTIPLIER,value: "2"},{name: AGENTRUN_RUNNER_STARTUP_RETRY_TOTAL_DEADLINE_MS,value: "60000"},{name: HWLAB_RUNTIME_LANE,value: v0.3},{name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,value: http://otel-collector.platform-infra.svc.cluster.local:4318/v1/traces},{name: OTEL_SERVICE_NAME,value: agentrun-manager},{name: UNIDESK_NODE_ID,value: NC01},{name: UNIDESK_MAIN_SERVER_IP,value: 152.53.229.148}],readinessProbe: {httpGet: {path: /health/readiness,port: http},timeoutSeconds: 2},livenessProbe: {httpGet: {path: /health/live,port: http},timeoutSeconds: 2},startupProbe: {httpGet: {path: /health/live,port: http},periodSeconds: 10,timeoutSeconds: 2,failureThreshold: 90},resources: {requests: {cpu: 100m,memory: 256Mi},limits: {cpu: 800m,memory: 1Gi}}}]}}}} +--- +{apiVersion: rbac.authorization.k8s.io/v1,kind: Role,metadata: {name: agentrun-nc01-v02-mgr-runner-job-controller,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},rules: [{apiGroups: [batch],resources: [jobs],verbs: [create,delete,get,list,watch]},{apiGroups: [""],resources: [pods],verbs: [delete,get,list,watch]},{apiGroups: [""],resources: [events],verbs: [get,list,watch]},{apiGroups: [""],resources: [persistentvolumeclaims],verbs: [create,get,list,watch,delete]}]} +--- +{apiVersion: rbac.authorization.k8s.io/v1,kind: RoleBinding,metadata: {name: agentrun-nc01-v02-mgr-runner-job-controller,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},subjects: [{kind: ServiceAccount,name: agentrun-nc01-v02-mgr}],roleRef: {apiGroup: rbac.authorization.k8s.io,kind: Role,name: agentrun-nc01-v02-mgr-runner-job-controller}} +--- +{apiVersion: rbac.authorization.k8s.io/v1,kind: Role,metadata: {name: agentrun-nc01-v02-mgr-provider-secret-manager,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},rules: [{apiGroups: [""],resources: [secrets],verbs: [create,delete,get,list,patch,update]}]} +--- +{apiVersion: rbac.authorization.k8s.io/v1,kind: RoleBinding,metadata: {name: agentrun-nc01-v02-mgr-provider-secret-manager,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},subjects: [{kind: ServiceAccount,name: agentrun-nc01-v02-mgr}],roleRef: {apiGroup: rbac.authorization.k8s.io,kind: Role,name: agentrun-nc01-v02-mgr-provider-secret-manager}} diff --git a/deploy/gitops/node/nc01/runtime-v02/namespace.yaml b/deploy/gitops/node/nc01/runtime-v02/namespace.yaml new file mode 100644 index 0000000..c2b2db7 --- /dev/null +++ b/deploy/gitops/node/nc01/runtime-v02/namespace.yaml @@ -0,0 +1 @@ +{apiVersion: v1,kind: Namespace,metadata: {name: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}}} diff --git a/deploy/gitops/node/nc01/runtime-v02/runner-rbac.yaml b/deploy/gitops/node/nc01/runtime-v02/runner-rbac.yaml new file mode 100644 index 0000000..e6cf11d --- /dev/null +++ b/deploy/gitops/node/nc01/runtime-v02/runner-rbac.yaml @@ -0,0 +1,5 @@ +{apiVersion: v1,kind: ServiceAccount,metadata: {name: agentrun-nc01-v02-runner,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}}} +--- +{apiVersion: rbac.authorization.k8s.io/v1,kind: Role,metadata: {name: agentrun-nc01-v02-runner-secret-reader,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},rules: [{apiGroups: [""],resources: [secrets],verbs: [get]}]} +--- +{apiVersion: rbac.authorization.k8s.io/v1,kind: RoleBinding,metadata: {name: agentrun-nc01-v02-runner-secret-reader,namespace: agentrun-v02,labels: {app.kubernetes.io/part-of: agentrun,agentrun.pikastech.local/lane: v0.2,agentrun.pikastech.local/node: NC01}},subjects: [{kind: ServiceAccount,name: agentrun-nc01-v02-runner}],roleRef: {apiGroup: rbac.authorization.k8s.io,kind: Role,name: agentrun-nc01-v02-runner-secret-reader}} diff --git a/source.json b/source.json index 7639c08..f5a34c9 100644 --- a/source.json +++ b/source.json @@ -1,6 +1,6 @@ { "lane": "v0.2", - "sourceCommit": "92f78b6a5b0fd244db2548f3bcf5289aea2065d5", + "sourceCommit": "fb486d8f88ceb530ab338be437656350247f780b", "generatedBy": "unidesk config/agentrun.yaml", "configSource": "config/agentrun.yaml" }