3 Commits
5 ... 8

Author SHA1 Message Date
Hermes Agent 72548b798a fix: sourceUrl опциональный (воркер сам строит URL из itemId)
Build Media Mirror API / Build and publish (release) Successful in 29s
2026-08-10 23:29:06 +03:00
Hermes Agent 342ceee28d fix: helm-деплой — ключи секрета S3 (accessKey/secretKey)
Build Media Mirror API / Build and publish (release) Successful in 29s
2026-08-10 22:36:02 +03:00
Hermes Agent ecf82b0e2e helm: ingress для внешнего доступа
Build Media Mirror API / Build and publish (release) Successful in 31s
2026-08-10 22:31:06 +03:00
5 changed files with 37 additions and 4 deletions
+2 -2
View File
@@ -83,12 +83,12 @@ spec:
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ $.Release.Name }}-{{ $.Chart.Name }}-secret name: {{ $.Release.Name }}-{{ $.Chart.Name }}-secret
key: app.s3.accessKey key: accessKey
- name: S3_SECRET_KEY - name: S3_SECRET_KEY
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ $.Release.Name }}-{{ $.Chart.Name }}-secret name: {{ $.Release.Name }}-{{ $.Chart.Name }}-secret
key: app.s3.secretKey key: secretKey
volumeMounts: volumeMounts:
- mountPath: '/opt/app/config' - mountPath: '/opt/app/config'
name: application-properties-volume name: application-properties-volume
+17
View File
@@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{ $.Release.Name }}-{{ $.Chart.Name }}"
annotations: {}
spec:
rules:
- host: {{.Values.ingress.host }}
http:
paths:
- backend:
service:
name: "{{ $.Release.Name }}-{{ $.Chart.Name }}"
port:
number: {{ .Values.port }}
path: /
pathType: Prefix
+2
View File
@@ -37,3 +37,5 @@ app:
securityContext: securityContext:
privileged: false privileged: false
ingress:
host: null
@@ -7,7 +7,6 @@ import kotlinx.serialization.Serializable
data class CreateMirrorRequest( data class CreateMirrorRequest(
@field:NotBlank(message = "itemId must not be blank") @field:NotBlank(message = "itemId must not be blank")
val itemId: String, val itemId: String,
@field:NotBlank(message = "sourceUrl must not be blank") val sourceUrl: String = "",
val sourceUrl: String,
val sourceType: String = "jellyfin", val sourceType: String = "jellyfin",
) )
@@ -83,6 +83,21 @@ class MirrorControllerTest : AbstractIntegrationTest() {
assertEquals(1, count) assertEquals(1, count)
} }
@Test
fun `POST mirror without sourceUrl creates a job`() {
mockMvc.perform(
post("/api/mirror")
.contentType(MediaType.APPLICATION_JSON)
.content("""{"itemId":"no-url-id"}"""),
).andExpect(status().isCreated)
val response = json.decodeFromString<ByItemResponse>(
bodyOf(mockMvc.perform(get("/api/mirror/by-item/no-url-id")).andExpect(status().isOk).andReturn()),
)
assertEquals("no-url-id", response.itemId)
assertEquals("new", response.status)
}
@Test @Test
fun `POST mirror returns 400 on blank itemId`() { fun `POST mirror returns 400 on blank itemId`() {
postCreate("", "https://source.example/stream") postCreate("", "https://source.example/stream")