Skip to content

Commit

Permalink
feat: migration org.tkit
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Feb 1, 2024
1 parent 2d2a0ee commit 444a801
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 54 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/create-new-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Create new build

on:
workflow_dispatch:

jobs:
build:
uses: onecx/ci-common/.github/workflows/create-new-build.yml@v1
secrets: inherit
12 changes: 10 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.onecx</groupId>
<groupId>org.tkit.onecx</groupId>
<artifactId>onecx-quarkus3-parent</artifactId>
<version>0.29.0</version>
<version>0.31.0</version>
</parent>

<artifactId>onecx-product-store-mfe-operator</artifactId>
Expand Down Expand Up @@ -62,6 +62,14 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-reactive-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc-client-reactive-filter</artifactId>
</dependency>

<!-- OTHER -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: microfrontends.onecx.github.io
name: microfrontends.onecx.tkit.org
spec:
group: onecx.github.io
group: onecx.tkit.org
names:
kind: Microfrontend
plural: microfrontends
Expand Down
2 changes: 1 addition & 1 deletion src/main/helm/templates/product-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ .Release.Name }}-{{ .Values.app.name }}-cluster-role
rules:
- apiGroups:
- "onecx.github.io"
- "onecx.tkit.org"
resources:
- "microfrontends"
- "microfrontends/status"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.github.onecx.product.store.mfe.operator;
package org.tkit.onecx.product.store.mfe.operator;

import io.fabric8.kubernetes.api.model.Namespaced;
import io.fabric8.kubernetes.client.CustomResource;
import io.fabric8.kubernetes.model.annotation.Group;
import io.fabric8.kubernetes.model.annotation.Version;

@Version("v1")
@Group("onecx.github.io")
@Group("onecx.tkit.org")
public class Microfrontend extends CustomResource<MicrofrontendSpec, MicrofrontendStatus> implements Namespaced {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.product.store.mfe.operator;
package org.tkit.onecx.product.store.mfe.operator;

import static io.javaoperatorsdk.operator.api.reconciler.Constants.WATCH_CURRENT_NAMESPACE;

Expand All @@ -7,8 +7,8 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tkit.onecx.product.store.mfe.operator.client.ProductStoreService;

import io.github.onecx.product.store.mfe.operator.client.ProductStoreService;
import io.javaoperatorsdk.operator.api.reconciler.*;
import io.javaoperatorsdk.operator.processing.event.source.filter.OnAddFilter;
import io.javaoperatorsdk.operator.processing.event.source.filter.OnUpdateFilter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.product.store.mfe.operator;
package org.tkit.onecx.product.store.mfe.operator;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.product.store.mfe.operator;
package org.tkit.onecx.product.store.mfe.operator;

import java.util.List;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.product.store.mfe.operator;
package org.tkit.onecx.product.store.mfe.operator;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package io.github.onecx.product.store.mfe.operator.client;
package org.tkit.onecx.product.store.mfe.operator.client;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tkit.onecx.product.store.mfe.operator.Microfrontend;
import org.tkit.onecx.product.store.mfe.operator.MicrofrontendSpec;
import org.tkit.onecx.product.store.mfe.operator.client.mappers.ProductStoreMapper;

import gen.io.github.onecx.product.store.mfe.v1.api.OperatorMfeApi;
import gen.io.github.onecx.product.store.mfe.v1.model.UpdateMfeRequest;
import io.github.onecx.product.store.mfe.operator.Microfrontend;
import io.github.onecx.product.store.mfe.operator.MicrofrontendSpec;
import io.github.onecx.product.store.mfe.operator.client.mappers.ProductStoreMapper;
import gen.org.tkit.onecx.product.store.mfe.v1.api.OperatorMfeApi;
import gen.org.tkit.onecx.product.store.mfe.v1.model.UpdateMfeRequest;

@ApplicationScoped
public class ProductStoreService {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.tkit.onecx.product.store.mfe.operator.client.mappers;

import org.mapstruct.Mapper;
import org.tkit.onecx.product.store.mfe.operator.MicrofrontendSpec;

import gen.org.tkit.onecx.product.store.mfe.v1.model.UpdateMfeRequest;

@Mapper
public interface ProductStoreMapper {

UpdateMfeRequest map(MicrofrontendSpec spec);

}
9 changes: 8 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# PROD
%prod.quarkus.rest-client.product_store_client.url=http://onecx-product-store-svc:8080

# OIDC
#quarkus.rest-client.product_store_client.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
#quarkus.oidc-client.client-id=${quarkus.application.name}
#quarkus.oidc-client.credentials.secret=
#quarkus.oidc-client.auth-server-url=

# BUILD
quarkus.operator-sdk.helm.enabled=true
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi
quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.config-key=product_store_client
quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.base-package=gen.io.github.onecx.product.store.mfe.v1
quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.base-package=gen.org.tkit.onecx.product.store.mfe.v1
quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.return-response=true

# CONFIG
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.product.store.mfe.operator;
package org.tkit.onecx.product.store.mfe.operator;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
Expand All @@ -8,9 +8,9 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.tkit.onecx.product.store.mfe.operator.client.ProductStoreService;
import org.tkit.onecx.product.store.mfe.test.AbstractTest;

import io.github.onecx.product.store.mfe.operator.client.ProductStoreService;
import io.github.onecx.product.store.mfe.test.AbstractTest;
import io.javaoperatorsdk.operator.api.reconciler.UpdateControl;
import io.quarkus.test.InjectMock;
import io.quarkus.test.junit.QuarkusTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.product.store.mfe.operator;
package org.tkit.onecx.product.store.mfe.operator;

import static java.util.concurrent.TimeUnit.SECONDS;
import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -18,10 +18,10 @@
import org.junit.jupiter.params.provider.MethodSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tkit.onecx.product.store.mfe.test.AbstractTest;

import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.github.onecx.product.store.mfe.test.AbstractTest;
import io.javaoperatorsdk.operator.Operator;
import io.quarkus.test.junit.QuarkusTest;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.tkit.onecx.product.store.mfe.test;

public abstract class AbstractTest {
}

0 comments on commit 444a801

Please sign in to comment.