Skip to content

Commit 28ae632

Browse files
authored
fix: remove custom_repos (#283)
1 parent 9043fa8 commit 28ae632

File tree

2 files changed

+6
-220
lines changed

2 files changed

+6
-220
lines changed

internal/gen/gen.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package gen
44
import (
55
"encoding/json"
66
"fmt"
7+
"log"
78
"os"
89
"path/filepath"
910
"regexp"
@@ -114,6 +115,11 @@ func fromFile(fileName string) (types.GenerationResult, error) {
114115
return nil, fmt.Errorf("failed to convert %s %s: %w", match[1], match[2], err)
115116
}
116117

118+
if kind == types.KeyServiceTypes && name == "opensearch" {
119+
delete(uc.Properties, "custom_repos")
120+
log.Printf("Removed `custom_repos` from opensearch, because of `one_of`")
121+
}
122+
117123
result[kind][name] = *uc
118124
}
119125

pkg/dist/service_types.yml

Lines changed: 0 additions & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -4348,226 +4348,6 @@ opensearch:
43484348
type: string
43494349
max_length: 255
43504350
example: grafana.example.org
4351-
custom_repos:
4352-
title: OpenSearch custom repositories
4353-
description: Allow to register object storage repositories in OpenSearch
4354-
type: array
4355-
items:
4356-
type: object
4357-
required:
4358-
- name
4359-
- type
4360-
- settings
4361-
properties:
4362-
name:
4363-
type: string
4364-
pattern: ^[^\r\n]*$
4365-
settings:
4366-
one_of:
4367-
- type: object
4368-
required:
4369-
- account
4370-
- base_path
4371-
- container
4372-
properties:
4373-
account:
4374-
title: Account name
4375-
type: string
4376-
pattern: ^[^\r\n]*$
4377-
base_path:
4378-
title: The path to the repository data within its container
4379-
description: The path to the repository data within its container. The value of this setting should not start or end with a /
4380-
type: string
4381-
pattern: ^[^\r\n]*$
4382-
chunk_size:
4383-
title: Chunk size
4384-
description: Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository
4385-
type: string
4386-
pattern: ^[^\r\n]*$
4387-
compress:
4388-
title: Metadata files are stored in compressed format
4389-
description: when set to true metadata files are stored in compressed format
4390-
type: boolean
4391-
container:
4392-
title: Azure container name
4393-
description: Azure container name
4394-
type: string
4395-
pattern: ^[^\r\n]*$
4396-
endpoint_suffix:
4397-
title: Endpoint suffix
4398-
description: Defines the DNS suffix for Azure Storage endpoints.
4399-
type: string
4400-
pattern: ^[^\r\n]*$
4401-
key:
4402-
title: Account secret key
4403-
description: Azure account secret key. One of key or sas_token should be specified
4404-
type: string
4405-
pattern: ^[^\r\n]*$
4406-
_secure: true
4407-
readonly:
4408-
title: Whether the repository is read-only.
4409-
type: boolean
4410-
default: false
4411-
sas_token:
4412-
title: SAS token
4413-
description: A shared access signatures (SAS) token. One of key or sas_token should be specified
4414-
type: string
4415-
pattern: ^[^\r\n]*$
4416-
_secure: true
4417-
- type: object
4418-
required:
4419-
- base_path
4420-
- bucket
4421-
- credentials
4422-
properties:
4423-
base_path:
4424-
title: The path to the repository data within its container
4425-
description: The path to the repository data within its container. The value of this setting should not start or end with a /
4426-
type: string
4427-
pattern: ^[^\r\n]*$
4428-
bucket:
4429-
title: Google Cloud Storage bucket name
4430-
description: The path to the repository data within its container
4431-
type: string
4432-
pattern: ^[^\r\n]*$
4433-
chunk_size:
4434-
title: Chunk size
4435-
description: Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository
4436-
type: string
4437-
pattern: ^[^\r\n]*$
4438-
compress:
4439-
title: Metadata files are stored in compressed format
4440-
description: when set to true metadata files are stored in compressed format
4441-
type: boolean
4442-
credentials:
4443-
title: Google service account credentials map
4444-
type: object
4445-
required:
4446-
- private_key_id
4447-
- private_key
4448-
- client_email
4449-
- client_id
4450-
properties:
4451-
auth_provider_x509_cert_url:
4452-
title: The certificate service of Google
4453-
type: string
4454-
example: https://www.googleapis.com/oauth2/v1/certs
4455-
auth_uri:
4456-
title: The authentication endpoint of Google
4457-
type: string
4458-
example: https://accounts.google.com/o/oauth2/auth
4459-
client_email:
4460-
title: Email of the service account
4461-
type: string
4462-
4463-
client_id:
4464-
title: Numeric client id for this service account
4465-
type: string
4466-
example: "103654484443722885992"
4467-
client_x509_cert_url:
4468-
title: Certificate URL for your service account
4469-
type: string
4470-
example: https://www.googleapis.com/robot/v1/metadata/x509/my-service-account%40some-my-project.iam.gserviceaccount.com
4471-
hmac_access_id:
4472-
description: The access ID for HMAC authentication with Google Cloud Storage
4473-
type: string
4474-
hmac_secret:
4475-
description: The secret key for HMAC authentication with Google Cloud Storage
4476-
type: string
4477-
private_key:
4478-
title: PEM-encoded private key
4479-
type: string
4480-
example: |
4481-
-----BEGIN PRIVATE KEY-----
4482-
...
4483-
-----END PRIVATE KEY-----
4484-
private_key_id:
4485-
title: Hexadecimal ID number of your private key
4486-
type: string
4487-
example: 5fdeb02a11ddf081930ac3ac60bf376a0aef8fad
4488-
project_id:
4489-
title: Gcloud project id
4490-
type: string
4491-
example: some-my-project
4492-
token_uri:
4493-
title: The token lease endpoint of Google
4494-
type: string
4495-
example: https://accounts.google.com/o/oauth2/token
4496-
type:
4497-
title: Credentials type
4498-
description: Always service_account for credentials created in Gcloud console or CLI
4499-
type: string
4500-
example: service_account
4501-
universe_domain:
4502-
title: The universe domain
4503-
description: The universe domain. The default universe domain is googleapis.com.
4504-
type: string
4505-
example: '{"universe_domain": "googleapis.com", ...'
4506-
_secure: true
4507-
readonly:
4508-
title: Whether the repository is read-only.
4509-
type: boolean
4510-
default: false
4511-
- type: object
4512-
required:
4513-
- base_path
4514-
- bucket
4515-
- region
4516-
- access_key
4517-
- secret_key
4518-
properties:
4519-
access_key:
4520-
title: AWS Access key
4521-
type: string
4522-
pattern: ^[^\r\n]*$
4523-
base_path:
4524-
title: The path to the repository data within its container
4525-
description: The path to the repository data within its container. The value of this setting should not start or end with a /
4526-
type: string
4527-
pattern: ^[^\r\n]*$
4528-
bucket:
4529-
title: S3 bucket name
4530-
type: string
4531-
pattern: ^[^\r\n]*$
4532-
chunk_size:
4533-
title: Chunk size
4534-
description: Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository
4535-
type: string
4536-
pattern: ^[^\r\n]*$
4537-
compress:
4538-
title: Metadata files are stored in compressed format
4539-
description: when set to true metadata files are stored in compressed format
4540-
type: boolean
4541-
endpoint:
4542-
title: The S3 service endpoint to connect
4543-
description: The S3 service endpoint to connect to. If you are using an S3-compatible service then you should set this to the service’s endpoint
4544-
type: string
4545-
pattern: ^[^\r\n]*$
4546-
readonly:
4547-
title: Whether the repository is read-only.
4548-
type: boolean
4549-
default: false
4550-
region:
4551-
title: S3 region
4552-
type: string
4553-
pattern: ^[^\r\n]*$
4554-
secret_key:
4555-
title: AWS secret key
4556-
description: AWS secret key
4557-
type: string
4558-
pattern: ^[^\r\n]*$
4559-
_secure: true
4560-
server_side_encryption:
4561-
title: Server side encryption
4562-
description: When set to true files are encrypted on server side
4563-
type: boolean
4564-
type:
4565-
type: string
4566-
enum:
4567-
- value: azure
4568-
- value: gcs
4569-
- value: s3
4570-
max_items: 10
45714351
disable_replication_factor_adjustment:
45724352
title: Disable replication factor adjustment
45734353
description: 'Disable automatic replication factor adjustment for multi-node services. By default, Aiven ensures all indexes are replicated at least to two nodes. Note: Due to potential data loss in case of losing a service node, this setting can not be activated unless specifically allowed for the project.'

0 commit comments

Comments
 (0)