Skip to content

Commit

Permalink
Added changes for 3.0.0-beta8 ChaosCenter Release (#4009)
Browse files Browse the repository at this point in the history
* Added changes for 3.0.0-beta8 ChaosCenter

Signed-off-by: Jonsy13 <vedant.shrotria@harness.io>

* Fixed file_handlers test

Signed-off-by: Jonsy13 <vedant.shrotria@harness.io>

* Added changes for 3.0.0-beta8

Signed-off-by: Jonsy13 <vedant.shrotria@harness.io>

* Added changes for 3.0.0-beta8

Signed-off-by: Jonsy13 <vedant.shrotria@harness.io>

* Added changes for 3.0.0-beta8

Signed-off-by: Jonsy13 <vedant.shrotria@harness.io>

---------

Signed-off-by: Jonsy13 <vedant.shrotria@harness.io>
  • Loading branch information
Jonsy13 committed Jun 20, 2023
1 parent f11a23b commit 1d15a8f
Show file tree
Hide file tree
Showing 11 changed files with 6,109 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/BUILD_IMAGE.md
Expand Up @@ -107,13 +107,13 @@ OR
```bash
cd ${DIRECTORY}
docker buildx build -f Dockerfile --progress plane --push --no-cache --platform ${PLATFORMS} -t ${REPONAME}/$(IMAGE_NAME):$(IMG_TAG} .
docker buildx build -f Dockerfile --progress plain --push --no-cache --platform ${PLATFORMS} -t ${REPONAME}/$(IMAGE_NAME):$(IMG_TAG} .
```
For frontend image:
```bash
cd ${DIRECTORY}
docker buildx build . -f Dockerfile --progress plane --push --no-cache --platform ${PLATFORMS} -t ${REPONAME}/${IMAGE_NAME}:${IMG_TAG} \
docker buildx build . -f Dockerfile --progress plain --push --no-cache --platform ${PLATFORMS} -t ${REPONAME}/${IMAGE_NAME}:${IMG_TAG} \
--build-arg REACT_APP_KB_CHAOS_VERSION=${IMG_TAG} --build-arg REACT_APP_BUILD_TIME="${timestamp}" --build-arg REACT_APP_HUB_BRANCH_NAME="v1.13.x"
```
4 changes: 2 additions & 2 deletions litmus-portal/Makefile
Expand Up @@ -120,7 +120,7 @@ docker.buildx:

buildx.push.image:
@cd $(DIRECTORY) && \
docker buildx build -f Dockerfile --progress plane --push --no-cache --platform $(PLATFORMS) -t $(REPONAME)/$(IMAGE_NAME):$(IMG_TAG) .
docker buildx build -f Dockerfile --progress plain --push --no-cache --platform $(PLATFORMS) -t $(REPONAME)/$(IMAGE_NAME):$(IMG_TAG) .

.PHONY: push-portal-component
push-portal-component: docker.buildx buildx.push.image
Expand All @@ -134,7 +134,7 @@ buildx.push.frontend:
docker build . -f Dockerfile -t $(REPONAME)/$(FRONTEND_IMAGE):$(IMG_TAG) --build-arg REACT_APP_KB_CHAOS_VERSION=$(IMG_TAG) --build-arg REACT_APP_BUILD_TIME="$(timestamp)" --build-arg REACT_APP_HUB_BRANCH_NAME="v1.13.x" --build-arg PUBLIC_URL="$(PUBLIC_URL)" --build-arg TARGETARCH=amd64;\
docker push $(REPONAME)/$(FRONTEND_IMAGE):$(IMG_TAG);\
else \
docker buildx build . -f Dockerfile --progress plane --push --no-cache --platform $(PLATFORMS) -t $(REPONAME)/$(FRONTEND_IMAGE):$(IMG_TAG) --build-arg REACT_APP_KB_CHAOS_VERSION=$(IMG_TAG) --build-arg PUBLIC_URL="$(PUBLIC_URL)" \
docker buildx build . -f Dockerfile --progress plain --push --no-cache --platform $(PLATFORMS) -t $(REPONAME)/$(FRONTEND_IMAGE):$(IMG_TAG) --build-arg REACT_APP_KB_CHAOS_VERSION=$(IMG_TAG) --build-arg PUBLIC_URL="$(PUBLIC_URL)" \
--build-arg REACT_APP_BUILD_TIME="$(timestamp)" --build-arg REACT_APP_HUB_BRANCH_NAME="v1.13.x";\
fi

Expand Down
12 changes: 6 additions & 6 deletions litmus-portal/README.md
Expand Up @@ -22,23 +22,23 @@ ChaosCenter provides console and UI experience for managing, monitoring, and eve

#### Applying k8s manifest

> Litmus-3.0.0-beta7 Cluster Scope manifest
> Litmus-3.0.0-beta8 Cluster Scope manifest
```bash
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/3.0.0-beta7/litmus-3.0.0-beta7.yaml
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/3.0.0-beta8/litmus-3.0.0-beta8.yaml
```

Or

> Litmus-3.0.0-beta7 Namespaced Scope manifest.
> Litmus-3.0.0-beta8 Namespaced Scope manifest.
```bash
#Create a namespace eg: litmus
kubectl create ns litmus
#Install CRDs, if SELF_AGENT env is set to TRUE
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/3.0.0-beta7/litmus-portal-crds-3.0.0-beta7.yml
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/3.0.0-beta8/litmus-portal-crds-3.0.0-beta8.yml
#Install ChaosCenter
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/3.0.0-beta7/litmus-namespaced-3.0.0-beta7.yaml -n litmus
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/3.0.0-beta8/litmus-namespaced-3.0.0-beta8.yaml -n litmus
```

Or
Expand Down Expand Up @@ -99,7 +99,7 @@ View the User Guide <b>[here](https://docs.litmuschaos.io/)</b>
### **Local Development Guide for ChaosCenter**
Local Development Guide for ChaosCenter can be found <b>[here](https://github.com/litmuschaos/litmus/wiki/ChaosCenter-Development-Guide)</b>

### **Upgrade from 3.0.0-beta6 to 3.0.0-beta7**
### **Upgrade from 3.0.0-beta7 to 3.0.0-beta8**

You can upgrade using the steps from [section here](https://docs.litmuschaos.io/docs/user-guides/upgrade)

Expand Down
14 changes: 14 additions & 0 deletions litmus-portal/graphql-server/pkg/cluster/model/mocks/service.go
Expand Up @@ -7,15 +7,29 @@ import (
"github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/model"
store "github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/data-store"
dbSchemaCluster "github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/database/mongodb/cluster"
"github.com/litmuschaos/litmus/litmus-portal/graphql-server/utils"
"github.com/stretchr/testify/mock"
"go.mongodb.org/mongo-driver/bson"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

// ClusterService is a mock type for model.ClusterService
type ClusterService struct {
mock.Mock
}

// GetEndpoint mocks the GetEndpoint of ClusterService
func (c *ClusterService) GetEndpoint(agentType utils.AgentType) (string, error) {
args := c.Called(agentType)
return args.String(0), args.Error(1)
}

// GetClusterResource mocks the GetClusterResource of ClusterService
func (c *ClusterService) GetClusterResource(manifest string, namespace string) (*unstructured.Unstructured, error) {
args := c.Called(manifest, namespace)
return args.Get(0).(*unstructured.Unstructured), args.Error(1)
}

// RegisterCluster mocks the RegisterCluster of ClusterService
func (c *ClusterService) RegisterCluster(request model.RegisterClusterRequest) (*model.RegisterClusterResponse, error) {
args := c.Called(request)
Expand Down
Expand Up @@ -36,7 +36,7 @@ func TestFileHandler(t *testing.T) {
given: func() {
w = httptest.NewRecorder()
clusterID := uuid.NewString()
accessKey, _ := cluster.ClusterCreateJWT(clusterID)
accessKey, _ := cluster.CreateClusterJWT(clusterID)
ctx, _ = gin.CreateTestContext(w)
ctx.Params = []gin.Param{
{
Expand Down
Expand Up @@ -148,8 +148,13 @@ func (m *UpgradeManager) getUpgradePath() map[string]UpgradeExecutor {
VersionManager: nil,
},

// latest version, no more upgrades available
"3.0.0-beta7": {
NextVersion: "3.0.0-beta8",
VersionManager: nil,
},

// latest version, no more upgrades available
"3.0.0-beta8": {
NextVersion: "",
VersionManager: nil,
},
Expand Down

0 comments on commit 1d15a8f

Please sign in to comment.