Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add organization-id attribute for spec request #3

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,3 @@ app:
watchNamespaces: "JOSDK_WATCH_CURRENT"
----

ACES or comma separated list of namespaces
watchNamespaces: "JOSDK_WATCH_CURRENT"
----

Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ h| Version
| tkit-quarkus-log-cdi

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.23.0

| tkit-quarkus-log-rs

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.23.0

| tkit-quarkus-log-json

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.23.0

| quarkus-arc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,57 @@ endif::add-copy-button-to-env-var[]
|`MD5`


a| [[onecx-data-orchestrator-operator_onecx-data-orchestrator-token-user-name]]`link:#onecx-data-orchestrator-operator_onecx-data-orchestrator-token-user-name[onecx.data-orchestrator.token.user-name]`


[.description]
--
Username for rest call.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_DATA_ORCHESTRATOR_TOKEN_USER_NAME+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_DATA_ORCHESTRATOR_TOKEN_USER_NAME+++`
endif::add-copy-button-to-env-var[]
--|string
|`data-orchestrator-operator`


a| [[onecx-data-orchestrator-operator_onecx-data-orchestrator-token-header-param]]`link:#onecx-data-orchestrator-operator_onecx-data-orchestrator-token-header-param[onecx.data-orchestrator.token.header-param]`


[.description]
--
Token header parameter.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_DATA_ORCHESTRATOR_TOKEN_HEADER_PARAM+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_DATA_ORCHESTRATOR_TOKEN_HEADER_PARAM+++`
endif::add-copy-button-to-env-var[]
--|string
|`apm-principal-token`


a| [[onecx-data-orchestrator-operator_onecx-data-orchestrator-token-claim-organization-param]]`link:#onecx-data-orchestrator-operator_onecx-data-orchestrator-token-claim-organization-param[onecx.data-orchestrator.token.claim-organization-param]`


[.description]
--
Token claim organization parameter.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_DATA_ORCHESTRATOR_TOKEN_CLAIM_ORGANIZATION_PARAM+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_DATA_ORCHESTRATOR_TOKEN_CLAIM_ORGANIZATION_PARAM+++`
endif::add-copy-button-to-env-var[]
--|string
|`orgId`


a| [[onecx-data-orchestrator-operator_onecx-data-orchestrator-client-shared]]`link:#onecx-data-orchestrator-operator_onecx-data-orchestrator-client-shared[onecx.data-orchestrator.client.shared]`


Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.tkit.onecx</groupId>
<artifactId>onecx-quarkus3-parent</artifactId>
<version>0.48.0</version>
<version>0.49.0</version>
</parent>

<artifactId>onecx-data-orchestrator-operator</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions src/main/helm/crds/datas.onecx.tkit.org-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ spec:
type: string
key:
type: string
orgId:
type: string
productName:
type: string
type: object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.tkit.onecx.data.orchestrator.operator;

import java.util.Map;

import io.quarkus.runtime.annotations.*;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;
Expand All @@ -18,4 +20,69 @@ public interface DataConfig {
@WithDefault("MD5")
String digest();

/**
* Token configuration.
*/
@WithDefault("token")
TokenConfig token();

/**
* Client configuration.
*/
@WithDefault("client")
ConfigClient client();

/**
* Client configuration.
*/
interface ConfigClient {

/**
* Set to true to share the HTTP client between REST clients.
*/
@WithName("shared")
@WithDefault("true")
boolean shared();

/**
* The size of the rest client connection pool.
*/
@WithName("connection-pool-size")
@WithDefault("30")
int connectionPoolSize();

/**
* Clients key configuration
*/
@WithName("key")
Map<String, String> keys();
}

/**
* Token configuration.
*/
interface TokenConfig {

/**
* Username for rest call.
*/
@WithName("user-name")
@WithDefault("data-orchestrator-operator")
String userName();

/**
* Token header parameter.
*/
@WithName("header-param")
@WithDefault("apm-principal-token")
String headerParam();

/**
* Token claim organization parameter.
*/
@WithName("claim-organization-param")
@WithDefault("orgId")
String claimOrganizationParam();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DataSpec {

@JsonProperty("orgId")
private String orgId;

@JsonProperty("key")
private String key;

Expand All @@ -21,6 +24,14 @@ public class DataSpec {
@JsonProperty("data")
private String data;

public String getOrgId() {
return orgId;
}

public void setOrgId(String orgId) {
this.orgId = orgId;
}

public String getData() {
return data;
}
Expand Down
Loading
Loading