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

PR for Building sm-integration Branch #822

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
349cd3b
Get Secrets for Service Manager (#655)
szwedm Apr 17, 2024
ec4ddcf
Prepare main func for running multiple components (#685)
szwedm May 9, 2024
f531026
Service Manager client (#674)
szwedm May 15, 2024
07b5b3c
Service Manager client ServiceOfferings test (#703)
szwedm May 17, 2024
85cdcf9
Service Manager UI (#649)
ukff May 29, 2024
90871c1
Fix not responding api after remove gorilla mux by go http (#714)
ukff Jun 4, 2024
e6ca07c
Service Manager client - get Service Offering details and plans (#717)
szwedm Jun 6, 2024
8346fc4
SM UI (#711)
ukff Jun 12, 2024
2bd18ef
Run frontend from go binary (#720)
szwedm Jun 17, 2024
83f9b57
SM UI 2 (#728)
ukff Jun 21, 2024
6b7687f
SM UI 3 (#734)
ukff Jun 21, 2024
2f3e94d
Handle Service Instances in SM client (#742)
szwedm Jun 28, 2024
1714b66
Handle Service Bindings in SM client and get Service Instances in API…
ukff Jul 16, 2024
81d1116
Loading Service Instances in BTP Manager UI Backend - API (#746)
ralikio Jul 17, 2024
d3ef25b
Service Bindings API (#757)
KsaweryZietara Jul 18, 2024
8a73cd1
Possibility to Load Test Data Based on Env Variable (#763)
ralikio Jul 19, 2024
097bb6a
Removal of Recursive Invocation (#766)
ralikio Jul 22, 2024
5cb8926
Removal of Unnecessary Body Elemenet (#767)
ralikio Jul 22, 2024
17c811b
ServiceInstanceDetailsView - UI Dialog Mechanics (#768)
ralikio Jul 22, 2024
0a5639f
Service Instances API (#758)
szwedm Jul 23, 2024
8c8c0ee
Rename fields and tags in API structs according to Service Manager ob…
szwedm Jul 24, 2024
18b0fc5
Simple Create Instance Form (#770)
ralikio Jul 25, 2024
eed23cf
UI Corrections (#774)
ralikio Jul 29, 2024
c2a949a
Simple Service Bindings List (#775)
ralikio Jul 30, 2024
e768272
Add secrets operations related to Service Bindings in API (#772)
szwedm Aug 1, 2024
3adb39d
React Router (#778)
ralikio Aug 1, 2024
13bfec6
Polishing List Instances View (#780)
ralikio Aug 6, 2024
efc25a7
Create Binding Form (#781)
ralikio Aug 6, 2024
5c7439a
Addition of Labels and Parameters Consumption in Create Instance Form…
ralikio Aug 6, 2024
cf9606e
Bindings Removal (#784)
ralikio Aug 6, 2024
de1d103
Nil Check when Removing Secrets (#786)
ralikio Aug 6, 2024
f8c260f
Update of SM Integration Docs to the Newest PR (#785)
ralikio Aug 6, 2024
b6332cb
BTP Manager API - error handling (#779)
szwedm Aug 6, 2024
2efe6ec
Corrected Export Command Placement (#787)
ralikio Aug 7, 2024
dc671d2
New Subpaths for UI (#792)
ralikio Aug 8, 2024
beec1ef
Set secret name and namespace from create Service Binding request (#794)
szwedm Aug 8, 2024
d26fe48
ShellBar Corrections (#797)
ralikio Aug 8, 2024
0014c36
Secret Name and Namespace in CreateBindingForm (#798)
ralikio Aug 8, 2024
4df9f97
Dialog and StatusMessage Mechanics Corrections (#799)
ralikio Aug 8, 2024
5bac4da
Updated Docs to PR-799 (#800)
ralikio Aug 8, 2024
2a1f3e1
Secret availability in Service Binding (#802)
szwedm Aug 12, 2024
b59672d
Missing FormItems for Status Messages, API Model Naming Conventions a…
ralikio Aug 12, 2024
91c50af
Set isOpen to false after closing the menu (#810)
MarekMichali Aug 14, 2024
70d0b0b
Fix secret operations in Service Binding related requests (#812)
szwedm Aug 14, 2024
6b560ad
Load secrets onClick (#809)
MarekMichali Aug 19, 2024
6bf830a
Default Bindings Value if No Content API Response (#816)
ralikio Aug 19, 2024
69e9798
Page Title (#817)
ralikio Aug 19, 2024
aeb6d1f
Broken Connectivity Error Page (#820)
ralikio Aug 20, 2024
e7b8fbb
Illustrated Message Placement and Size Corrections (#821)
ralikio Aug 20, 2024
969e453
Corrected Bindings List Refresh (#824)
ralikio Aug 21, 2024
d9d46ce
Fix create Service Binding when secret exists (#826)
szwedm Aug 21, 2024
a3ffa82
Show secret connection status to SM (#825)
MarekMichali Aug 21, 2024
057e88e
404 on Refresh Fix (#830)
ralikio Aug 21, 2024
aa8cfce
Update Dockerfile (#838)
KsaweryZietara Aug 22, 2024
07bfb99
Add hint to press Enter when adding labels to SI (#840)
MarekMichali Aug 22, 2024
00b7eed
Update codeowners (#842)
MarekMichali Aug 22, 2024
db098d1
Fix Markdown (#841)
KsaweryZietara Aug 22, 2024
b9c92d5
Removal of Unnecessary Error Banner (#846)
ralikio Aug 23, 2024
8b9ac16
Unnecessary Error (#847)
ralikio Aug 23, 2024
416902c
Restore missing Secret for existing Service Binding (#843)
szwedm Aug 26, 2024
31125e5
Api State Removal - UI Passing Secret Name and Namespace Params (#845)
ralikio Aug 26, 2024
e275dc7
Corrected Secret Name and Namespace Params (#849)
ralikio Aug 26, 2024
c45c9a2
Api State Removal - backend (#844)
MarekMichali Aug 28, 2024
fa5711a
Flexible Column Layout for Offerings and Instances Views (#850)
ralikio Aug 29, 2024
bbb315a
Corrected Error Rendering (#853)
ralikio Aug 29, 2024
ac22cb1
UI Secret restore (#854)
szwedm Sep 2, 2024
97d84cd
Fix suffix generating and secret recreate UI state changes (#856)
MarekMichali Sep 3, 2024
0725906
Closing Message Strip (#857)
ralikio Sep 3, 2024
21b63d7
Rebuild image (#886)
MarekMichali Oct 25, 2024
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
203 changes: 202 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,205 @@ vendor/**

/vendor

debug.sh
debug.sh


/fake
/node_modules

.DS_STORE
node_modules
scripts/flow/*/.flowconfig
.flowconfig
*~
*.pyc
.grunt
_SpecRunner.html
__benchmarks__
build/
remote-repo/
coverage/
.module-cache
fixtures/dom/public/react-dom.js
fixtures/dom/public/react.js
test/the-files-to-test.generated.js
*.log*
chrome-user-data
*.sublime-project
*.sublime-workspace
.idea
*.iml
.vscode
*.swp
*.swo

packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/chrome/*.crx
packages/react-devtools-extensions/chrome/*.pem
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/firefox/*.xpi
packages/react-devtools-extensions/firefox/*.pem
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/.tempUserDataDir
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
packages/react-devtools-timeline/dist


# compiled output
/dist
/tmp
/out-tsc

# Runtime vm
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# IDEs and editors
.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
.sass-cache
connect.lock
typings

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*


# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# Lerna
lerna-debug.log

# System Files
.DS_Store
Thumbs.db

node_modules/
.node_modules/
built/*
tests/cases/rwc/*
tests/cases/perf/*
!tests/cases/webharness/compilerToString.js
test-args.txt
~*.docx
\#*\#
.\#*
tests/baselines/local/*
tests/baselines/local.old/*
tests/services/baselines/local/*
tests/baselines/prototyping/local/*
tests/baselines/rwc/*
tests/baselines/reference/projectOutput/*
tests/baselines/local/projectOutput/*
tests/baselines/reference/testresults.tap
tests/services/baselines/prototyping/local/*
tests/services/browser/typescriptServices.js
src/harness/*.js
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.generated.json
src/parser/diagnosticInformationMap.generated.ts
src/parser/diagnosticMessages.generated.json
rwc-report.html
*.swp
build.json
*.actual
tests/webTestServer.js
tests/webTestServer.js.map
tests/webhost/*.d.ts
tests/webhost/webtsc.js
tests/cases/**/*.js
tests/cases/**/*.js.map
*.config
scripts/eslint/built/
scripts/debug.bat
scripts/run.bat
scripts/**/*.js
scripts/**/*.js.map
coverage/
**/.DS_Store
.settings
**/.vs
**/.vscode/*
!**/.vscode/tasks.json
!**/.vscode/settings.template.json
!**/.vscode/launch.template.json
!**/.vscode/extensions.json
!tests/cases/projects/projectOption/**/node_modules
!tests/cases/projects/NodeModulesSearch/**/*
!tests/baselines/reference/project/nodeModules*/**/*
.idea
yarn.lock
yarn-error.log
.parallelperf.*
tests/baselines/reference/dt
.failed-tests
TEST-results.xml
package-lock.json
.eslintcache
*v8.log
/lib/

/node_modules/
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

# Owners of all .md files in the repository
*.md @kyma-project/technical-writers

# Temporary owners of 09-10-ui.md
/docs/contributor/09-10-ui.md @kyma-project/gopher
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Build UI static files
FROM node:22.3.0 as ui-builder

WORKDIR /btp-manager-workspace

COPY ui/package.json ./
RUN npm install

COPY ui/ ./
RUN npm run build

# Build the manager binary
FROM golang:1.23.0-alpine3.20 as builder

Expand All @@ -12,6 +23,9 @@ RUN go mod download
# Copy the go source
COPY . ./

# Copy UI static files
COPY --from=ui-builder /btp-manager-workspace/build ui/build

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
Expand Down
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."

.PHONY: test
test: manifests kustomize generate fmt vet envtest ginkgo test-docs ## Run tests.
test: manifests kustomize generate ui-build fmt vet envtest ginkgo test-docs ## Run tests.
@. ./scripts/testing/set-env-vars.sh; \
go test -skip=TestAPIs ./... -timeout $(SUITE_TIMEOUT) -coverprofile cover.out -v; \
if [ "$(USE_EXISTING_CLUSTER)" == "true" ]; then $(GINKGO) controllers; else $(GINKGO) $(GINKGO_PARALLEL_FLAG) controllers; fi
Expand Down Expand Up @@ -192,10 +192,26 @@ go-lint-install: ## linter config in file at root of project -> '.golangci.yaml'
fi;

.PHONY: go-lint
go-lint: go-lint-install ## linter config in file at root of project -> '.golangci.yaml'
go-lint: ui-build go-lint-install ## linter config in file at root of project -> '.golangci.yaml'
golangci-lint run --timeout=$(GOLINT_TIMEOUT)

.PHONY: fix
fix: go-lint-install ## try to fix automatically issues
go mod tidy
golangci-lint run --fix

.PHONE: app
app: ## Run the app
go run main.go

.PHONY: ui
ui: ## Run the ui
cd ui && npm install && npm start

.PHONE: webapp
webapp: ## Run App and UI
@$(MAKE) -j ui app

.PHONY: ui-build
ui-build: ## Build the UI
cd ui && npm install && npm run build
11 changes: 11 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,20 @@ spec:
- --leader-elect
image: controller:latest
name: manager
env:
- name: API_PORT
value: "8080"
- name: API_READ_TIMEOUT
value: "30s"
- name: API_WRITE_TIMEOUT
value: "90s"
- name: API_IDLE_TIMEOUT
value: "120s"
ports:
- name: http
containerPort: 8080
- name: metrics
containerPort: 9090
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
22 changes: 11 additions & 11 deletions controllers/btpoperator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var (
Version: btpOperatorApiVer,
Kind: btpOperatorServiceBinding,
}
instanceGvk = schema.GroupVersionKind{
InstanceGvk = schema.GroupVersionKind{
Group: btpOperatorGroup,
Version: btpOperatorApiVer,
Kind: btpOperatorServiceInstance,
Expand Down Expand Up @@ -749,7 +749,7 @@ func (r *BtpOperatorReconciler) handleDeleting(ctx context.Context, cr *v1alpha1
if err != nil {
return err
}
numberOfInstances, err := r.numberOfResources(ctx, instanceGvk)
numberOfInstances, err := r.numberOfResources(ctx, InstanceGvk)
if err != nil {
return err
}
Expand Down Expand Up @@ -797,7 +797,7 @@ func (r *BtpOperatorReconciler) handleDeprovisioning(ctx context.Context, cr *v1
if err != nil {
return err
}
numberOfInstances, err := r.numberOfResources(ctx, instanceGvk)
numberOfInstances, err := r.numberOfResources(ctx, InstanceGvk)
if err != nil {
return err
}
Expand Down Expand Up @@ -894,13 +894,13 @@ func (r *BtpOperatorReconciler) handleHardDelete(ctx context.Context, namespaces
}
}

siCrdExists, err := r.crdExists(ctx, instanceGvk)
siCrdExists, err := r.crdExists(ctx, InstanceGvk)
if err != nil {
logger.Error(err, "while checking CRD existence", "GVK", instanceGvk.String())
logger.Error(err, "while checking CRD existence", "GVK", InstanceGvk.String())
errs = append(errs, err)
}
if siCrdExists {
if err := r.hardDelete(ctx, instanceGvk, namespaces); err != nil {
if err := r.hardDelete(ctx, InstanceGvk, namespaces); err != nil {
logger.Error(err, "while deleting Service Instances")
if !errors.Is(err, context.DeadlineExceeded) {
errs = append(errs, err)
Expand Down Expand Up @@ -931,7 +931,7 @@ func (r *BtpOperatorReconciler) handleHardDelete(ctx context.Context, namespaces
}

if siCrdExists {
siResourcesLeft, err = r.resourcesExist(ctx, namespaces, instanceGvk)
siResourcesLeft, err = r.resourcesExist(ctx, namespaces, InstanceGvk)
if err != nil {
logger.Error(err, "ServiceInstance leftover resources check failed")
hardDeleteSucceededCh <- false
Expand Down Expand Up @@ -1087,9 +1087,9 @@ func (r *BtpOperatorReconciler) handleSoftDelete(ctx context.Context, namespaces
return err
}

siCrdExists, err := r.crdExists(ctx, instanceGvk)
siCrdExists, err := r.crdExists(ctx, InstanceGvk)
if err != nil {
logger.Error(err, "while checking CRD existence", "GVK", instanceGvk.String())
logger.Error(err, "while checking CRD existence", "GVK", InstanceGvk.String())
return err
}

Expand All @@ -1107,11 +1107,11 @@ func (r *BtpOperatorReconciler) handleSoftDelete(ctx context.Context, namespaces

if siCrdExists {
logger.Info("Removing finalizers in Service Instances")
if err := r.softDelete(ctx, instanceGvk); err != nil {
if err := r.softDelete(ctx, InstanceGvk); err != nil {
logger.Error(err, "while deleting Service Instances")
return err
}
if err := r.ensureResourcesDontExist(ctx, instanceGvk); err != nil {
if err := r.ensureResourcesDontExist(ctx, InstanceGvk); err != nil {
logger.Error(err, "Service Instances still exist")
return err
}
Expand Down
4 changes: 2 additions & 2 deletions controllers/btpoperator_controller_cr_rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ var _ = Describe("BTP Operator CR leader replacement", func() {
Eventually(func() error { return k8sClient.Create(ctx, btpOperator1) }).WithTimeout(k8sOpsTimeout).WithPolling(k8sOpsPollingInterval).Should(Succeed())
Eventually(updateCh).Should(Receive(matchState(v1alpha1.StateReady)))

siUnstructured := createResource(instanceGvk, kymaNamespace, instanceName)
ensureResourceExists(instanceGvk)
siUnstructured := createResource(InstanceGvk, kymaNamespace, instanceName)
ensureResourceExists(InstanceGvk)

sbUnstructured := createResource(bindingGvk, kymaNamespace, bindingName)
ensureResourceExists(bindingGvk)
Expand Down
Loading
Loading