+
+
+
+
+
diff --git a/plugins/kubernetes/html/buildConfigs.html b/plugins/kubernetes/html/buildConfigs.html
index 49d746e..b3c7559 100644
--- a/plugins/kubernetes/html/buildConfigs.html
+++ b/plugins/kubernetes/html/buildConfigs.html
@@ -1,122 +1,122 @@
-
+
diff --git a/plugins/kubernetes/html/buildLogs.html b/plugins/kubernetes/html/buildLogs.html
index 183788d..265c6d8 100644
--- a/plugins/kubernetes/html/buildLogs.html
+++ b/plugins/kubernetes/html/buildLogs.html
@@ -1,45 +1,45 @@
-
-
-
-
-
-
-
-
-
-
-
logs for {{entity.$configId}}
-
-
-
-
- {{logsText}}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
logs for {{entity.$configId}}
+
+
+
+
+ {{logsText}}
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/builds.html b/plugins/kubernetes/html/builds.html
index c2249e0..bce3441 100644
--- a/plugins/kubernetes/html/builds.html
+++ b/plugins/kubernetes/html/builds.html
@@ -1,111 +1,111 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
There are no builds currently running.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
There are no builds currently running.
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/deploymentConfig.html b/plugins/kubernetes/html/deploymentConfig.html
index 860acea..d148483 100644
--- a/plugins/kubernetes/html/deploymentConfig.html
+++ b/plugins/kubernetes/html/deploymentConfig.html
@@ -1,21 +1,21 @@
-
+
diff --git a/plugins/kubernetes/html/deploymentConfigs.html b/plugins/kubernetes/html/deploymentConfigs.html
index 7cbfd24..614250c 100644
--- a/plugins/kubernetes/html/deploymentConfigs.html
+++ b/plugins/kubernetes/html/deploymentConfigs.html
@@ -1,67 +1,67 @@
-
+
diff --git a/plugins/kubernetes/html/events.html b/plugins/kubernetes/html/events.html
index cd06da2..5641a53 100644
--- a/plugins/kubernetes/html/events.html
+++ b/plugins/kubernetes/html/events.html
@@ -1,72 +1,72 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
There are no events currently available.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
There are no events currently available.
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/host.html b/plugins/kubernetes/html/host.html
index 5e9b2c6..8568e3e 100644
--- a/plugins/kubernetes/html/host.html
+++ b/plugins/kubernetes/html/host.html
@@ -1,61 +1,61 @@
-
+
diff --git a/plugins/kubernetes/html/hosts.html b/plugins/kubernetes/html/hosts.html
index 7860fcd..c5f1df8 100644
--- a/plugins/kubernetes/html/hosts.html
+++ b/plugins/kubernetes/html/hosts.html
@@ -1,43 +1,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
There are no hosts currently running.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
There are no hosts currently running.
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/imageRepositories.html b/plugins/kubernetes/html/imageRepositories.html
index fe31642..cbe3cd8 100644
--- a/plugins/kubernetes/html/imageRepositories.html
+++ b/plugins/kubernetes/html/imageRepositories.html
@@ -1,51 +1,51 @@
-
+
diff --git a/plugins/kubernetes/html/importProject.html b/plugins/kubernetes/html/importProject.html
index c874c84..0e89d6e 100644
--- a/plugins/kubernetes/html/importProject.html
+++ b/plugins/kubernetes/html/importProject.html
@@ -1,58 +1,58 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create a project by entering or copy/pasting the Git URL for a repository, and give the project a name. By default the name will be based on the repository name.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a project by entering or copy/pasting the Git URL for a repository, and give the project a name. By default the name will be based on the repository name.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/kubernetesJsonDirective.html b/plugins/kubernetes/html/kubernetesJsonDirective.html
index a33a6b7..62de229 100644
--- a/plugins/kubernetes/html/kubernetesJsonDirective.html
+++ b/plugins/kubernetes/html/kubernetesJsonDirective.html
@@ -1,32 +1,32 @@
-
+
diff --git a/plugins/kubernetes/html/layoutKubernetes.html b/plugins/kubernetes/html/layoutKubernetes.html
index a08176f..2c4b23f 100644
--- a/plugins/kubernetes/html/layoutKubernetes.html
+++ b/plugins/kubernetes/html/layoutKubernetes.html
@@ -1,244 +1,244 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/logShell.html b/plugins/kubernetes/html/logShell.html
index 5255d5c..517d7e7 100644
--- a/plugins/kubernetes/html/logShell.html
+++ b/plugins/kubernetes/html/logShell.html
@@ -1,15 +1,15 @@
-
-
-
-
-
-
-
{{containerName}}的汇总日志
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
{{containerName}}的汇总日志
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/overview.html b/plugins/kubernetes/html/overview.html
index fe77e1c..738725a 100644
--- a/plugins/kubernetes/html/overview.html
+++ b/plugins/kubernetes/html/overview.html
@@ -1,117 +1,117 @@
-
+
diff --git a/plugins/kubernetes/html/pendingPipelines.html b/plugins/kubernetes/html/pendingPipelines.html
index 3724708..2085445 100644
--- a/plugins/kubernetes/html/pendingPipelines.html
+++ b/plugins/kubernetes/html/pendingPipelines.html
@@ -1,20 +1,20 @@
-
-
-
-
-
-
No Pipeline Available
-
Pipeline is a kind of build which uses Jenkins Workflow internally which has multiple Stages. You will see the active pipelines here after you add a build to this project
-
-
-
-
-
+
+
+
+
+
+
No Pipeline Available
+
Pipeline is a kind of build which uses Jenkins Workflow internally which has multiple Stages. You will see the active pipelines here after you add a build to this project
+
+
+
+
+
diff --git a/plugins/kubernetes/html/pipelines.html b/plugins/kubernetes/html/pipelines.html
index 7e05ba7..933abc4 100644
--- a/plugins/kubernetes/html/pipelines.html
+++ b/plugins/kubernetes/html/pipelines.html
@@ -1,131 +1,131 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{step.buildConfig.metadata.name}}
-
-
-
-
-
-
- build
-
-
-
-
-
-
- new: {{step.buildConfig.$lastBuild.$creationDate.relative()}}
-
-
- pending: {{step.buildConfig.$lastBuild.$creationDate.relative()}}
-
-
- running {{step.buildConfig.$lastBuild.$creationDate.relative()}}
-
-
- completed {{step.buildConfig.$lastBuild.$creationDate.relative()}}
-
-
- failed {{step.buildConfig.$lastBuild.$creationDate.relative()}}
-
-
- {{step.buildConfig.$lastBuild.status}}: {{step.buildConfig.$lastBuild.$creationDate.relative()}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{step.buildConfig.metadata.name}}
+
+
+
+
+
+
+ build
+
+
+
+
+
+
+ new: {{step.buildConfig.$lastBuild.$creationDate.relative()}}
+
+
+ pending: {{step.buildConfig.$lastBuild.$creationDate.relative()}}
+
+
+ running {{step.buildConfig.$lastBuild.$creationDate.relative()}}
+
+
+ completed {{step.buildConfig.$lastBuild.$creationDate.relative()}}
+
+
+ failed {{step.buildConfig.$lastBuild.$creationDate.relative()}}
+
+
+ {{step.buildConfig.$lastBuild.status}}: {{step.buildConfig.$lastBuild.$creationDate.relative()}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/pod.html b/plugins/kubernetes/html/pod.html
index 2dc30c9..84df57a 100644
--- a/plugins/kubernetes/html/pod.html
+++ b/plugins/kubernetes/html/pod.html
@@ -1,88 +1,88 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/podCreate.html b/plugins/kubernetes/html/podCreate.html
index dee5c90..3c41af5 100644
--- a/plugins/kubernetes/html/podCreate.html
+++ b/plugins/kubernetes/html/podCreate.html
@@ -1,27 +1,27 @@
-
+
diff --git a/plugins/kubernetes/html/podEdit.html b/plugins/kubernetes/html/podEdit.html
index f28688c..fc9ca4b 100644
--- a/plugins/kubernetes/html/podEdit.html
+++ b/plugins/kubernetes/html/podEdit.html
@@ -1,27 +1,27 @@
-
+
diff --git a/plugins/kubernetes/html/pods.html b/plugins/kubernetes/html/pods.html
index 061d9dc..ae6ceaa 100644
--- a/plugins/kubernetes/html/pods.html
+++ b/plugins/kubernetes/html/pods.html
@@ -1,87 +1,87 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
There are no pods currently running.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
There are no pods currently running.
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/replicationController.html b/plugins/kubernetes/html/replicationController.html
index c28210c..20c740c 100644
--- a/plugins/kubernetes/html/replicationController.html
+++ b/plugins/kubernetes/html/replicationController.html
@@ -1,89 +1,89 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/replicationControllerCreate.html b/plugins/kubernetes/html/replicationControllerCreate.html
index 1e1d48a..c928be9 100644
--- a/plugins/kubernetes/html/replicationControllerCreate.html
+++ b/plugins/kubernetes/html/replicationControllerCreate.html
@@ -1,27 +1,27 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/replicationControllerEdit.html b/plugins/kubernetes/html/replicationControllerEdit.html
index 6b89264..9615dce 100644
--- a/plugins/kubernetes/html/replicationControllerEdit.html
+++ b/plugins/kubernetes/html/replicationControllerEdit.html
@@ -1,27 +1,27 @@
-
+
diff --git a/plugins/kubernetes/html/replicationControllers.html b/plugins/kubernetes/html/replicationControllers.html
index 6a970d0..4922cca 100644
--- a/plugins/kubernetes/html/replicationControllers.html
+++ b/plugins/kubernetes/html/replicationControllers.html
@@ -1,144 +1,144 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/secret.html b/plugins/kubernetes/html/secret.html
index 8d01f93..fef7ed4 100644
--- a/plugins/kubernetes/html/secret.html
+++ b/plugins/kubernetes/html/secret.html
@@ -1,157 +1,157 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/secrets.html b/plugins/kubernetes/html/secrets.html
index d372756..9f4588d 100644
--- a/plugins/kubernetes/html/secrets.html
+++ b/plugins/kubernetes/html/secrets.html
@@ -1,52 +1,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
There are no secrets currently available.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
There are no secrets currently available.
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/service.html b/plugins/kubernetes/html/service.html
index 923085d..1f4bbd7 100644
--- a/plugins/kubernetes/html/service.html
+++ b/plugins/kubernetes/html/service.html
@@ -1,68 +1,68 @@
-
+
diff --git a/plugins/kubernetes/html/serviceApps.html b/plugins/kubernetes/html/serviceApps.html
index 0384b7c..7abde55 100644
--- a/plugins/kubernetes/html/serviceApps.html
+++ b/plugins/kubernetes/html/serviceApps.html
@@ -1,16 +1,16 @@
-
+
diff --git a/plugins/kubernetes/html/serviceCreate.html b/plugins/kubernetes/html/serviceCreate.html
index 9c3a01d..e135f6b 100644
--- a/plugins/kubernetes/html/serviceCreate.html
+++ b/plugins/kubernetes/html/serviceCreate.html
@@ -1,27 +1,27 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/serviceEdit.html b/plugins/kubernetes/html/serviceEdit.html
index cf3f2a2..356f072 100644
--- a/plugins/kubernetes/html/serviceEdit.html
+++ b/plugins/kubernetes/html/serviceEdit.html
@@ -1,27 +1,27 @@
-
+
diff --git a/plugins/kubernetes/html/services.html b/plugins/kubernetes/html/services.html
index 8e07006..56b62b5 100644
--- a/plugins/kubernetes/html/services.html
+++ b/plugins/kubernetes/html/services.html
@@ -1,93 +1,93 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
There are no services currently available.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
There are no services currently available.
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/tabs.html b/plugins/kubernetes/html/tabs.html
index 0574b08..b851491 100644
--- a/plugins/kubernetes/html/tabs.html
+++ b/plugins/kubernetes/html/tabs.html
@@ -1,13 +1,13 @@
-
+
diff --git a/plugins/kubernetes/html/templateDescription.html b/plugins/kubernetes/html/templateDescription.html
index 883c580..8b52b66 100644
--- a/plugins/kubernetes/html/templateDescription.html
+++ b/plugins/kubernetes/html/templateDescription.html
@@ -1,9 +1,9 @@
-
-
-
+
+
+
diff --git a/plugins/kubernetes/html/templates.html b/plugins/kubernetes/html/templates.html
index efcc1b3..4b6f346 100644
--- a/plugins/kubernetes/html/templates.html
+++ b/plugins/kubernetes/html/templates.html
@@ -1,90 +1,90 @@
-
-
-
-
-
-
-
-
-
-
-
-
- There are no templates currently available. Add templates by dragging and dropping template files into this area.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ There are no templates currently available. Add templates by dragging and dropping template files into this area.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/kubernetes/html/termShell.html b/plugins/kubernetes/html/termShell.html
index c7d5553..dab5076 100644
--- a/plugins/kubernetes/html/termShell.html
+++ b/plugins/kubernetes/html/termShell.html
@@ -1,9 +1,9 @@
-
+
diff --git a/plugins/kubernetes/less/appView.less b/plugins/kubernetes/less/appView.less
index 6bf9c85..b52c0ac 100644
--- a/plugins/kubernetes/less/appView.less
+++ b/plugins/kubernetes/less/appView.less
@@ -1,108 +1,108 @@
-/* This is for the 'Overview' page with all the rows of boxes */
-.service-view-rectangle {
- position: relative;
- margin-left: 0;
- margin-right: 0px;
- margin-bottom: 15px;
- margin-top: 0;
- background-color: #fafafa;
-
- border-width: 1px;
- border-style: solid;
- border-color: #eeeeee;
-
- .service-view-header {
- margin-top: 5px;
- margin-bottom: 5px;
- line-height: 20px;
- vertical-align: middle;
- }
- .service-view-detail-pod-box {
- background-color: #eeeeee;
- display: inline-block;
- font-size: smaller;
- }
- .service-view-header-delete .red {
- opacity: 0.5;
- transition: opacity 1s;
- font-size: larger;
- }
- .service-view-header-delete:hover .red {
- opacity: 1;
- }
- .service-view-icon img {
- width: 32px;
- height: 32px;
- margin-right: 6px;
- }
- .service-view-name {
- font-size: larger;
- font-weight: bold;
- }
- .service-view-detail-header {
- padding-top: 5px;
- padding-bottom: 5px;
- line-height: 20px;
- }
- .service-view-detail-rectangle {
- background-color: #eeeeee;
- padding-left: 10px;
- padding-right: 10px;
- }
- .service-view-detail-rectangle .value {
- font-weight: bold;
- }
- .service-view-detail-pod-summary,
- .service-view-detail-pod-summary-expand {
- display: inline-block;
-
- padding-top: 2px;
- padding-bottom: 2px;
- padding-left: 20px;
- padding-right: 20px;
-
- margin-right: 8px;
- margin-bottom: 8px;
-
- background-color: #ffffff;
- }
-
- .service-view-detail-pod-summary table td,
- .service-view-detail-pod-summary-expand table td {
- padding-left: 10px;
- padding-right: 10px;
- }
-
- .service-view-detail-pod-template {
- }
-
- .service-view-detail-pod-counts {
- }
-
- .service-view-detail-pod-status, .service-view-detail-pod-connect {
- line-height: 36px;
- padding-right: 20px;
- }
-
- .service-view-detail-pod-status i, .service-view-detail-pod-connect i {
- font-size: 36px;
- display: inline-block;
- vertical-align: middle;
- }
-
- .service-view-detail-pod-expand {
- color: #a0a0a0;
- font-size: 18px;
- padding-right: 0px;
- }
-
- .service-view-detail-pod-id {
- }
-
-
-}
-
-.kubernetes-view .filter-header {
- margin-bottom: 1em;
-}
-
+/* This is for the 'Overview' page with all the rows of boxes */
+.service-view-rectangle {
+ position: relative;
+ margin-left: 0;
+ margin-right: 0px;
+ margin-bottom: 15px;
+ margin-top: 0;
+ background-color: #fafafa;
+
+ border-width: 1px;
+ border-style: solid;
+ border-color: #eeeeee;
+
+ .service-view-header {
+ margin-top: 5px;
+ margin-bottom: 5px;
+ line-height: 20px;
+ vertical-align: middle;
+ }
+ .service-view-detail-pod-box {
+ background-color: #eeeeee;
+ display: inline-block;
+ font-size: smaller;
+ }
+ .service-view-header-delete .red {
+ opacity: 0.5;
+ transition: opacity 1s;
+ font-size: larger;
+ }
+ .service-view-header-delete:hover .red {
+ opacity: 1;
+ }
+ .service-view-icon img {
+ width: 32px;
+ height: 32px;
+ margin-right: 6px;
+ }
+ .service-view-name {
+ font-size: larger;
+ font-weight: bold;
+ }
+ .service-view-detail-header {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ line-height: 20px;
+ }
+ .service-view-detail-rectangle {
+ background-color: #eeeeee;
+ padding-left: 10px;
+ padding-right: 10px;
+ }
+ .service-view-detail-rectangle .value {
+ font-weight: bold;
+ }
+ .service-view-detail-pod-summary,
+ .service-view-detail-pod-summary-expand {
+ display: inline-block;
+
+ padding-top: 2px;
+ padding-bottom: 2px;
+ padding-left: 20px;
+ padding-right: 20px;
+
+ margin-right: 8px;
+ margin-bottom: 8px;
+
+ background-color: #ffffff;
+ }
+
+ .service-view-detail-pod-summary table td,
+ .service-view-detail-pod-summary-expand table td {
+ padding-left: 10px;
+ padding-right: 10px;
+ }
+
+ .service-view-detail-pod-template {
+ }
+
+ .service-view-detail-pod-counts {
+ }
+
+ .service-view-detail-pod-status, .service-view-detail-pod-connect {
+ line-height: 36px;
+ padding-right: 20px;
+ }
+
+ .service-view-detail-pod-status i, .service-view-detail-pod-connect i {
+ font-size: 36px;
+ display: inline-block;
+ vertical-align: middle;
+ }
+
+ .service-view-detail-pod-expand {
+ color: #a0a0a0;
+ font-size: 18px;
+ padding-right: 0px;
+ }
+
+ .service-view-detail-pod-id {
+ }
+
+
+}
+
+.kubernetes-view .filter-header {
+ margin-bottom: 1em;
+}
+
diff --git a/plugins/kubernetes/less/overview.less b/plugins/kubernetes/less/overview.less
index 60bb7f2..6991f08 100644
--- a/plugins/kubernetes/less/overview.less
+++ b/plugins/kubernetes/less/overview.less
@@ -1,173 +1,173 @@
-/* This is all for the diagram, not the 'Overview' page */
-.kubernetes-overview {
- width: 100%;
- height: 100%;
- display: table;
- table-layout: fixed;
-}
-.kubernetes-overview-row {
- display: table-row;
-}
-.kubernetes-overview-cell {
- display: table-cell;
- text-align: center;
- vertical-align: middle;
- padding: 0;
-}
-.service-wrapper {
- display: block;
- vertical-align: middle;
-}
-.kubernetes-node {
- margin-left: auto;
- margin-right: auto;
- cursor: pointer;
- text-align: center;
- vertical-align: middle;
- border: 1px solid #d4d4d4;
- background: white;
- box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
- border-radius: 4px;
- transition: background 0.5s;
- z-index: 1000;
-}
-
-.kubernetes-host-container {
- margin-top: 5px;
- margin-bottom: 5px;
- margin-left: auto;
- margin-right: auto;
- text-align: center;
- max-width: 600px;
- min-width: 300px;
- padding: 0;
- border: 1px solid #d4d4d4;
- background: white;
- box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
- border-radius: 4px;
-}
-
-.kubernetes-pod-node {
- display: block;
- margin: 0;
- padding: 0;
- min-height: 48px;
- line-height: 48px;
- border-radius: 0;
- border: 1px solid transparent;
- border-top: 1px solid #d4d4d4;
- box-shadow: none;
- vertical-align: middle;
-}
-
-.css-table {
- display: table;
- width: 100%;
- height: 100%;
-}
-
-.css-table-row {
- display: table-row;
-
- .pod-status-cell {
- // width: 30%;
- text-align: left;
- padding-left: 5px;
- padding-right: 5px;
-
- i {
- margin-left: 3px;
- margin-right: 3px;
- }
- .clickable {
- width: auto !important;
- }
- }
- // height: inherit;
-}
-
-.css-table-cell {
- display: table-cell;
- vertical-align: middle;
-}
-
-.kubernetes-pod-node i {
- font-size: 24px;
-}
-
-.kubernetes-overview-services {
- width: 200px;
-}
-
-.kubernetes-service-node {
- display: block;
- margin-bottom: 10px;
- width: 200px;
- min-height: 66px;
- padding: 0;
- line-height: 48px;
-
- .node-body {
- display: inline;
- padding-left: 10px;
- line-height: 64px;
- font-size: 20px;
- float: left;
- }
-
- .node-header {
- display: inline;
- float: right;
- }
-
-}
-
-.node-header {
- padding-right: 10px;
- white-space: nowrap;
- line-height: 64px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.kubernetes-replicationController-node {
- border-radius: 64px;
- display: block;
- width: 64px;
- height: 64px;
- padding: 7px;
- font-weight: bold;
- vertical-align: middle;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.kubernetes-overview-cell .app-icon-medium {
- width: 48px;
- height: 48px;
-}
-
-.kubernetes-replicationController-node img {
- width: 64px;
-}
-
-.kubernetes-node:hover,
-.kubernetes-node.hovered {
- background: #ddddff;
-}
-
-.pod-status-cell {
- width: 80px;
- line-height: 20px;
-}
-
-.pod-label-cell {
- float: right;
- text-align: right;
- min-height: 48px;
-}
-
-.pod-label-cell .ngCellText {
- white-space: normal;
-}
-
+/* This is all for the diagram, not the 'Overview' page */
+.kubernetes-overview {
+ width: 100%;
+ height: 100%;
+ display: table;
+ table-layout: fixed;
+}
+.kubernetes-overview-row {
+ display: table-row;
+}
+.kubernetes-overview-cell {
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ padding: 0;
+}
+.service-wrapper {
+ display: block;
+ vertical-align: middle;
+}
+.kubernetes-node {
+ margin-left: auto;
+ margin-right: auto;
+ cursor: pointer;
+ text-align: center;
+ vertical-align: middle;
+ border: 1px solid #d4d4d4;
+ background: white;
+ box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
+ border-radius: 4px;
+ transition: background 0.5s;
+ z-index: 1000;
+}
+
+.kubernetes-host-container {
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-left: auto;
+ margin-right: auto;
+ text-align: center;
+ max-width: 600px;
+ min-width: 300px;
+ padding: 0;
+ border: 1px solid #d4d4d4;
+ background: white;
+ box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
+ border-radius: 4px;
+}
+
+.kubernetes-pod-node {
+ display: block;
+ margin: 0;
+ padding: 0;
+ min-height: 48px;
+ line-height: 48px;
+ border-radius: 0;
+ border: 1px solid transparent;
+ border-top: 1px solid #d4d4d4;
+ box-shadow: none;
+ vertical-align: middle;
+}
+
+.css-table {
+ display: table;
+ width: 100%;
+ height: 100%;
+}
+
+.css-table-row {
+ display: table-row;
+
+ .pod-status-cell {
+ // width: 30%;
+ text-align: left;
+ padding-left: 5px;
+ padding-right: 5px;
+
+ i {
+ margin-left: 3px;
+ margin-right: 3px;
+ }
+ .clickable {
+ width: auto !important;
+ }
+ }
+ // height: inherit;
+}
+
+.css-table-cell {
+ display: table-cell;
+ vertical-align: middle;
+}
+
+.kubernetes-pod-node i {
+ font-size: 24px;
+}
+
+.kubernetes-overview-services {
+ width: 200px;
+}
+
+.kubernetes-service-node {
+ display: block;
+ margin-bottom: 10px;
+ width: 200px;
+ min-height: 66px;
+ padding: 0;
+ line-height: 48px;
+
+ .node-body {
+ display: inline;
+ padding-left: 10px;
+ line-height: 64px;
+ font-size: 20px;
+ float: left;
+ }
+
+ .node-header {
+ display: inline;
+ float: right;
+ }
+
+}
+
+.node-header {
+ padding-right: 10px;
+ white-space: nowrap;
+ line-height: 64px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.kubernetes-replicationController-node {
+ border-radius: 64px;
+ display: block;
+ width: 64px;
+ height: 64px;
+ padding: 7px;
+ font-weight: bold;
+ vertical-align: middle;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.kubernetes-overview-cell .app-icon-medium {
+ width: 48px;
+ height: 48px;
+}
+
+.kubernetes-replicationController-node img {
+ width: 64px;
+}
+
+.kubernetes-node:hover,
+.kubernetes-node.hovered {
+ background: #ddddff;
+}
+
+.pod-status-cell {
+ width: 80px;
+ line-height: 20px;
+}
+
+.pod-label-cell {
+ float: right;
+ text-align: right;
+ min-height: 48px;
+}
+
+.pod-label-cell .ngCellText {
+ white-space: normal;
+}
+
diff --git a/plugins/kubernetes/less/podLog.less b/plugins/kubernetes/less/podLog.less
index a85eb4f..41a850e 100644
--- a/plugins/kubernetes/less/podLog.less
+++ b/plugins/kubernetes/less/podLog.less
@@ -1,35 +1,35 @@
-.pod-log-lines * {
- padding-left: 5px;
- padding-right: 5px;
- font-family: monospace;
- margin: 0;
- line-height: 14px;
- .black {
- color: #222;
- }
- .red {
- color: #f22;
- }
- .green {
- color: #2f2;
- }
- .yellow {
- color: #ff2;
- }
- .blue {
- color: #22f;
- }
- .purple {
- color: #f2f;
- }
- .cyan {
- color: #2dd;
- }
- .white {
- color: #ddd;
- }
-}
-
-.top-bottom-middle{
- line-height: 34px;
-}
+.pod-log-lines * {
+ padding-left: 5px;
+ padding-right: 5px;
+ font-family: monospace;
+ margin: 0;
+ line-height: 14px;
+ .black {
+ color: #222;
+ }
+ .red {
+ color: #f22;
+ }
+ .green {
+ color: #2f2;
+ }
+ .yellow {
+ color: #ff2;
+ }
+ .blue {
+ color: #22f;
+ }
+ .purple {
+ color: #f2f;
+ }
+ .cyan {
+ color: #2dd;
+ }
+ .white {
+ color: #ddd;
+ }
+}
+
+.top-bottom-middle{
+ line-height: 34px;
+}
diff --git a/plugins/kubernetes/less/terminalWindow.less b/plugins/kubernetes/less/terminalWindow.less
index 2ff9d6b..7a5d804 100644
--- a/plugins/kubernetes/less/terminalWindow.less
+++ b/plugins/kubernetes/less/terminalWindow.less
@@ -1,84 +1,84 @@
-.terminal-window {
- position: fixed;
- bottom: 0;
- background: white;
- border: 1px solid #d4d4d4;
- overflow: hidden;
- z-index: 1040;
-
- .resize-dot {
- width: 16px;
- height: 16px;
- border: 1px solid #d4d4d4;
- background: white;
- position: absolute;
- bottom: 10px;
- right: 10px;
- cursor: nwse-resize;
- border-radius: 8px;
- z-index: 10000;
- }
-
- &.minimized .resize-dot,
- &.maximized .resize-dot {
- display: none;
- }
-
- &.minimized .terminal-title,
- &.maximized .terminal-title {
- cursor: inherit;
- }
-
- .terminal-body {
- overflow: auto;
- .terminal-wrapper > .terminal * {
- font-family: 'DroidSansMonoRegular';
- }
- }
- .terminal-title {
- cursor: move;
- border-bottom: 1px solid #d4d4d4;
- > h5 {
- display: inline-block;
- margin-left: 5px;
- }
-
- > i {
- font-size: 16px;
- margin-right: 5px;
- margin-top: 7px;
- }
- }
-}
-
-kubernetes-container-terminal .terminal-wrapper {
- display: block !important;
-}
-
-kubernetes-container-terminal .terminal-actions {
- position: absolute !important;
-}
-
-.pod-log-window {
- .scroll-indicator {
- position: absolute;
- bottom: 0;
- line-height: 32px;
- left: 20px;
- right: 20px;
- background-color: #ffffff;
- border-top: 1px solid #d4d4d4;
- border-left: 1px solid #d4d4d4;
- border-right: 1px solid #d4d4d4;
- border-radius: 4px 4px 0 0;
- cursor: pointer;
- z-index: 10000;
- opacity: 0.7;
-
- }
- .terminal-body {
- overflow-y: auto;
- overflow-x: hidden;
- }
-}
-
+.terminal-window {
+ position: fixed;
+ bottom: 0;
+ background: white;
+ border: 1px solid #d4d4d4;
+ overflow: hidden;
+ z-index: 1040;
+
+ .resize-dot {
+ width: 16px;
+ height: 16px;
+ border: 1px solid #d4d4d4;
+ background: white;
+ position: absolute;
+ bottom: 10px;
+ right: 10px;
+ cursor: nwse-resize;
+ border-radius: 8px;
+ z-index: 10000;
+ }
+
+ &.minimized .resize-dot,
+ &.maximized .resize-dot {
+ display: none;
+ }
+
+ &.minimized .terminal-title,
+ &.maximized .terminal-title {
+ cursor: inherit;
+ }
+
+ .terminal-body {
+ overflow: auto;
+ .terminal-wrapper > .terminal * {
+ font-family: 'DroidSansMonoRegular';
+ }
+ }
+ .terminal-title {
+ cursor: move;
+ border-bottom: 1px solid #d4d4d4;
+ > h5 {
+ display: inline-block;
+ margin-left: 5px;
+ }
+
+ > i {
+ font-size: 16px;
+ margin-right: 5px;
+ margin-top: 7px;
+ }
+ }
+}
+
+kubernetes-container-terminal .terminal-wrapper {
+ display: block !important;
+}
+
+kubernetes-container-terminal .terminal-actions {
+ position: absolute !important;
+}
+
+.pod-log-window {
+ .scroll-indicator {
+ position: absolute;
+ bottom: 0;
+ line-height: 32px;
+ left: 20px;
+ right: 20px;
+ background-color: #ffffff;
+ border-top: 1px solid #d4d4d4;
+ border-left: 1px solid #d4d4d4;
+ border-right: 1px solid #d4d4d4;
+ border-radius: 4px 4px 0 0;
+ cursor: pointer;
+ z-index: 10000;
+ opacity: 0.7;
+
+ }
+ .terminal-body {
+ overflow-y: auto;
+ overflow-x: hidden;
+ }
+}
+
diff --git a/plugins/kubernetes/ts/apps.ts b/plugins/kubernetes/ts/apps.ts
index f7f09c0..b01ae02 100644
--- a/plugins/kubernetes/ts/apps.ts
+++ b/plugins/kubernetes/ts/apps.ts
@@ -1,298 +1,298 @@
-///
-///
-
-module Kubernetes {
-
- export var Apps = controller("Apps",
- ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesReplicationControllers", "KubernetesPods", "KubernetesState", "KubernetesApiURL", "$templateCache", "$location", "$routeParams", "$http", "$dialog", "$timeout",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesServices:ng.resource.IResourceClass
, KubernetesReplicationControllers:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState, KubernetesApiURL,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $dialog, $timeout) => {
-
- $scope.model = KubernetesModel;
-
- $scope.apps = [];
- $scope.allApps = [];
- $scope.kubernetes = KubernetesState;
- $scope.fetched = false;
- $scope.json = '';
- ControllerHelpers.bindModelToSearchParam($scope, $location, 'id', '_id', undefined);
- ControllerHelpers.bindModelToSearchParam($scope, $location, 'appSelectorShow', 'openApp', undefined);
- ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'detail');
-
- var branch = $scope.branch || "master";
- var namespace = null;
-
- function appMatches(app) {
- var filterText = $scope.appSelector.filterText;
- if (filterText) {
- return Core.matchFilterIgnoreCase(app.groupId, filterText) ||
- Core.matchFilterIgnoreCase(app.artifactId, filterText) ||
- Core.matchFilterIgnoreCase(app.name, filterText) ||
- Core.matchFilterIgnoreCase(app.description, filterText);
- } else {
- return true;
- }
- }
-
- function appRunning(app) {
- return $scope.model.apps.any((running) => running.appPath === app.appPath);
- }
-
- $scope.tableConfig = {
- data: 'model.apps',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- { field: '$name', displayName: 'App', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appIconTemlate.html")) },
- { field: '$servicesText', displayName: 'Services', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appServicesTemplate.html")) },
- { field: '$replicationControllersText', displayName: 'Controllers', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appReplicationControllerTemplate.html")) },
- { field: '$podCount', displayName: 'Pods', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appPodCountsAndLinkTemplate.html")) },
- { field: '$creationDate', displayName: 'Deployed', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appDeployedTemplate.html")) }
- ]
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
-
- $scope.expandedPods = [];
-
- $scope.$on('do-resize', ($event, controller) => {
- $scope.resizeDialog.open(controller);
- });
-
-
- $scope.podExpanded = (pod) => {
- var id = getName(pod)
- return id && ($scope.expandedPods || []).indexOf(id) >= 0;
- };
-
- $scope.expandPod = (pod) => {
- var id = getName(pod);
- if (id) {
- $scope.expandedPods.push(id);
- }
- };
-
- $scope.collapsePod = (pod) => {
- var id = getName(pod);
- if (id) {
- _.remove($scope.expandedPods, (v) => id === v);
- }
- };
-
- $scope.$on('$routeUpdate', ($event) => {
- Kubernetes.setJson($scope, $location.search()['_id'], $scope.model.apps);
- });
-
- function deleteApp(app, onCompleteFn) {
- function deleteServices(services, service, onCompletedFn) {
- if (!service || !services) {
- return onCompletedFn();
- }
- var id = getName(service);
- if (!id) {
- log.warn("No ID for service " + angular.toJson(service));
- } else {
- KubernetesServices.delete({
- id: id
- }, undefined, () => {
- log.debug("Deleted service: ", id);
- deleteServices(services, services.shift(), onCompletedFn);
- }, (error) => {
- log.debug("Error deleting service: ", error);
- deleteServices(services, services.shift(), onCompletedFn);
- });
- }
- }
-
- function deleteReplicationControllers(replicationControllers, replicationController, onCompletedFn) {
- if (!replicationController || !replicationControllers) {
- return onCompletedFn();
- }
- var id = getName(replicationController);
- if (!id) {
- log.warn("No ID for replicationController " + angular.toJson(replicationController));
- } else {
- KubernetesReplicationControllers.delete({
- id: id
- }, undefined, () => {
- log.debug("Deleted replicationController: ", id);
- deleteReplicationControllers(replicationControllers, replicationControllers.shift(), onCompletedFn);
- }, (error) => {
- log.debug("Error deleting replicationController: ", error);
- deleteReplicationControllers(replicationControllers, replicationControllers.shift(), onCompletedFn);
- });
- }
- }
-
- function deletePods(pods, pod, onCompletedFn) {
- if (!pod || !pods) {
- return onCompletedFn();
- }
- var id = getName(pod);
- if (!id) {
- log.warn("No ID for pod " + angular.toJson(pod));
- } else {
- KubernetesPods.delete({
- id: id
- }, undefined, () => {
- log.debug("Deleted pod: ", id);
- deletePods(pods, pods.shift(), onCompletedFn);
- }, (error) => {
- log.debug("Error deleting pod: ", error);
- deletePods(pods, pods.shift(), onCompletedFn);
- });
- }
- }
-
- var services = [].concat(app.services);
- deleteServices(services, services.shift(), () => {
-
- var replicationControllers = [].concat(app.replicationControllers);
- deleteReplicationControllers(replicationControllers, replicationControllers.shift(), () => {
-
- var pods = [].concat(app.pods);
- deletePods(pods, pods.shift(), onCompleteFn);
- });
- });
- }
-
- $scope.deleteSingleApp = (app) => {
- $scope.deletePrompt([app]);
- }
-
- $scope.deletePrompt = (selected) => {
- if (angular.isString(selected)) {
- selected = [{
- id: selected
- }];
- }
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: '$name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected, next) {
- if (next) {
- var id = next.name;
- log.debug("deleting: ", id);
- deleteApp(next, () => {
- log.debug("deleted: ", id);
- deleteSelected(selected, selected.shift());
- });
- }
- }
-
- deleteSelected(selected, selected.shift());
- }
- },
- title: 'Delete Apps?',
- action: 'The following Apps will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
-
- $scope.appSelector = {
- filterText: "",
- folders: [],
- selectedApps: [],
-
- isOpen: (folder) => {
- if ($scope.appSelector.filterText !== '' || folder.expanded) {
- return "opened";
- }
- return "closed";
- },
-
- getSelectedClass: (app) => {
- if (app.abstract) {
- return "abstract";
- }
- if (app.selected) {
- return "selected";
- }
- return "";
- },
-
- showApp: (app) => {
- return appMatches(app) && !appRunning(app);
- },
-
- showFolder: (folder) => {
- return !$scope.appSelector.filterText || folder.apps.some((app) => appMatches(app) && !appRunning(app));
- },
-
- clearSelected: () => {
- angular.forEach($scope.model.appFolders, (folder) => {
- angular.forEach(folder.apps, (app) => {
- app.selected = false;
- });
- });
- $scope.appSelector.selectedApps = [];
- Core.$apply($scope);
- },
-
- updateSelected: () => {
- // lets update the selected apps
- var selectedApps = [];
- angular.forEach($scope.model.appFolders, (folder) => {
- var apps = folder.apps.filter((app) => app.selected);
- if (apps) {
- selectedApps = selectedApps.concat(apps);
- }
- });
- $scope.appSelector.selectedApps = _.sortBy(selectedApps, "name");
- },
-
- select: (app, flag) => {
- app.selected = flag;
- $scope.appSelector.updateSelected();
- },
-
- hasSelection: () => {
- return $scope.model.appFolders.any((folder) => folder.apps.any((app) => app.selected));
- },
-
-
- runSelectedApps: () => {
- // lets run all the selected apps
- angular.forEach($scope.appSelector.selectedApps, (app) => {
- var name = app.name;
- var metadataPath = app.metadataPath;
- if (metadataPath) {
- // lets load the json/yaml
- //var url = gitPathToUrl(Wiki.gitRelativeURL(branch, metadataPath));
- var url = gitPathToUrl(metadataPath, branch);
- if (url) {
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- // lets convert the json object structure into a string
- var json = angular.toJson(data);
- var fn = () => {};
- Kubernetes.runApp($location, $scope, $http, KubernetesApiURL, json, name, fn, namespace);
- }
- }).
- error(function (data, status, headers, config) {
- $scope.summaryHtml = null;
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- }
- }
- });
- // lets go back to the apps view
- $scope.appSelector.clearSelected();
- $scope.appSelectorShow = false;
- }
- };
-
- }]);
-}
+///
+///
+
+module Kubernetes {
+
+ export var Apps = controller("Apps",
+ ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesReplicationControllers", "KubernetesPods", "KubernetesState", "KubernetesApiURL", "$templateCache", "$location", "$routeParams", "$http", "$dialog", "$timeout",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesServices:ng.resource.IResourceClass, KubernetesReplicationControllers:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState, KubernetesApiURL,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $dialog, $timeout) => {
+
+ $scope.model = KubernetesModel;
+
+ $scope.apps = [];
+ $scope.allApps = [];
+ $scope.kubernetes = KubernetesState;
+ $scope.fetched = false;
+ $scope.json = '';
+ ControllerHelpers.bindModelToSearchParam($scope, $location, 'id', '_id', undefined);
+ ControllerHelpers.bindModelToSearchParam($scope, $location, 'appSelectorShow', 'openApp', undefined);
+ ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'detail');
+
+ var branch = $scope.branch || "master";
+ var namespace = null;
+
+ function appMatches(app) {
+ var filterText = $scope.appSelector.filterText;
+ if (filterText) {
+ return Core.matchFilterIgnoreCase(app.groupId, filterText) ||
+ Core.matchFilterIgnoreCase(app.artifactId, filterText) ||
+ Core.matchFilterIgnoreCase(app.name, filterText) ||
+ Core.matchFilterIgnoreCase(app.description, filterText);
+ } else {
+ return true;
+ }
+ }
+
+ function appRunning(app) {
+ return $scope.model.apps.any((running) => running.appPath === app.appPath);
+ }
+
+ $scope.tableConfig = {
+ data: 'model.apps',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ { field: '$name', displayName: 'App', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appIconTemlate.html")) },
+ { field: '$servicesText', displayName: 'Services', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appServicesTemplate.html")) },
+ { field: '$replicationControllersText', displayName: 'Controllers', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appReplicationControllerTemplate.html")) },
+ { field: '$podCount', displayName: 'Pods', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appPodCountsAndLinkTemplate.html")) },
+ { field: '$creationDate', displayName: 'Deployed', cellTemplate: $templateCache.get(UrlHelpers.join(templatePath, "appDeployedTemplate.html")) }
+ ]
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+
+ $scope.expandedPods = [];
+
+ $scope.$on('do-resize', ($event, controller) => {
+ $scope.resizeDialog.open(controller);
+ });
+
+
+ $scope.podExpanded = (pod) => {
+ var id = getName(pod)
+ return id && ($scope.expandedPods || []).indexOf(id) >= 0;
+ };
+
+ $scope.expandPod = (pod) => {
+ var id = getName(pod);
+ if (id) {
+ $scope.expandedPods.push(id);
+ }
+ };
+
+ $scope.collapsePod = (pod) => {
+ var id = getName(pod);
+ if (id) {
+ _.remove($scope.expandedPods, (v) => id === v);
+ }
+ };
+
+ $scope.$on('$routeUpdate', ($event) => {
+ Kubernetes.setJson($scope, $location.search()['_id'], $scope.model.apps);
+ });
+
+ function deleteApp(app, onCompleteFn) {
+ function deleteServices(services, service, onCompletedFn) {
+ if (!service || !services) {
+ return onCompletedFn();
+ }
+ var id = getName(service);
+ if (!id) {
+ log.warn("No ID for service " + angular.toJson(service));
+ } else {
+ KubernetesServices.delete({
+ id: id
+ }, undefined, () => {
+ log.debug("Deleted service: ", id);
+ deleteServices(services, services.shift(), onCompletedFn);
+ }, (error) => {
+ log.debug("Error deleting service: ", error);
+ deleteServices(services, services.shift(), onCompletedFn);
+ });
+ }
+ }
+
+ function deleteReplicationControllers(replicationControllers, replicationController, onCompletedFn) {
+ if (!replicationController || !replicationControllers) {
+ return onCompletedFn();
+ }
+ var id = getName(replicationController);
+ if (!id) {
+ log.warn("No ID for replicationController " + angular.toJson(replicationController));
+ } else {
+ KubernetesReplicationControllers.delete({
+ id: id
+ }, undefined, () => {
+ log.debug("Deleted replicationController: ", id);
+ deleteReplicationControllers(replicationControllers, replicationControllers.shift(), onCompletedFn);
+ }, (error) => {
+ log.debug("Error deleting replicationController: ", error);
+ deleteReplicationControllers(replicationControllers, replicationControllers.shift(), onCompletedFn);
+ });
+ }
+ }
+
+ function deletePods(pods, pod, onCompletedFn) {
+ if (!pod || !pods) {
+ return onCompletedFn();
+ }
+ var id = getName(pod);
+ if (!id) {
+ log.warn("No ID for pod " + angular.toJson(pod));
+ } else {
+ KubernetesPods.delete({
+ id: id
+ }, undefined, () => {
+ log.debug("Deleted pod: ", id);
+ deletePods(pods, pods.shift(), onCompletedFn);
+ }, (error) => {
+ log.debug("Error deleting pod: ", error);
+ deletePods(pods, pods.shift(), onCompletedFn);
+ });
+ }
+ }
+
+ var services = [].concat(app.services);
+ deleteServices(services, services.shift(), () => {
+
+ var replicationControllers = [].concat(app.replicationControllers);
+ deleteReplicationControllers(replicationControllers, replicationControllers.shift(), () => {
+
+ var pods = [].concat(app.pods);
+ deletePods(pods, pods.shift(), onCompleteFn);
+ });
+ });
+ }
+
+ $scope.deleteSingleApp = (app) => {
+ $scope.deletePrompt([app]);
+ }
+
+ $scope.deletePrompt = (selected) => {
+ if (angular.isString(selected)) {
+ selected = [{
+ id: selected
+ }];
+ }
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: '$name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected, next) {
+ if (next) {
+ var id = next.name;
+ log.debug("deleting: ", id);
+ deleteApp(next, () => {
+ log.debug("deleted: ", id);
+ deleteSelected(selected, selected.shift());
+ });
+ }
+ }
+
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: 'Delete Apps?',
+ action: 'The following Apps will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+
+ $scope.appSelector = {
+ filterText: "",
+ folders: [],
+ selectedApps: [],
+
+ isOpen: (folder) => {
+ if ($scope.appSelector.filterText !== '' || folder.expanded) {
+ return "opened";
+ }
+ return "closed";
+ },
+
+ getSelectedClass: (app) => {
+ if (app.abstract) {
+ return "abstract";
+ }
+ if (app.selected) {
+ return "selected";
+ }
+ return "";
+ },
+
+ showApp: (app) => {
+ return appMatches(app) && !appRunning(app);
+ },
+
+ showFolder: (folder) => {
+ return !$scope.appSelector.filterText || folder.apps.some((app) => appMatches(app) && !appRunning(app));
+ },
+
+ clearSelected: () => {
+ angular.forEach($scope.model.appFolders, (folder) => {
+ angular.forEach(folder.apps, (app) => {
+ app.selected = false;
+ });
+ });
+ $scope.appSelector.selectedApps = [];
+ Core.$apply($scope);
+ },
+
+ updateSelected: () => {
+ // lets update the selected apps
+ var selectedApps = [];
+ angular.forEach($scope.model.appFolders, (folder) => {
+ var apps = folder.apps.filter((app) => app.selected);
+ if (apps) {
+ selectedApps = selectedApps.concat(apps);
+ }
+ });
+ $scope.appSelector.selectedApps = _.sortBy(selectedApps, "name");
+ },
+
+ select: (app, flag) => {
+ app.selected = flag;
+ $scope.appSelector.updateSelected();
+ },
+
+ hasSelection: () => {
+ return $scope.model.appFolders.any((folder) => folder.apps.any((app) => app.selected));
+ },
+
+
+ runSelectedApps: () => {
+ // lets run all the selected apps
+ angular.forEach($scope.appSelector.selectedApps, (app) => {
+ var name = app.name;
+ var metadataPath = app.metadataPath;
+ if (metadataPath) {
+ // lets load the json/yaml
+ //var url = gitPathToUrl(Wiki.gitRelativeURL(branch, metadataPath));
+ var url = gitPathToUrl(metadataPath, branch);
+ if (url) {
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ // lets convert the json object structure into a string
+ var json = angular.toJson(data);
+ var fn = () => {};
+ Kubernetes.runApp($location, $scope, $http, KubernetesApiURL, json, name, fn, namespace);
+ }
+ }).
+ error(function (data, status, headers, config) {
+ $scope.summaryHtml = null;
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ }
+ }
+ });
+ // lets go back to the apps view
+ $scope.appSelector.clearSelected();
+ $scope.appSelectorShow = false;
+ }
+ };
+
+ }]);
+}
diff --git a/plugins/kubernetes/ts/breadcrumbs.ts b/plugins/kubernetes/ts/breadcrumbs.ts
index e9c3a60..20600fa 100644
--- a/plugins/kubernetes/ts/breadcrumbs.ts
+++ b/plugins/kubernetes/ts/breadcrumbs.ts
@@ -1,17 +1,17 @@
-///
-///
-///
-
-module Kubernetes {
-
- _module.directive("hawtioBreadcrumbs", ['HawtioBreadcrumbs', (HawtioBreadcrumbs) => {
- return {
- /*
- templateUrl: Kubernetes.templatePath + 'breadcrumbs.html'
- */
- link: (scope, element, attrs) => {
- HawtioBreadcrumbs.apply(scope.$eval('breadcrumbConfig'));
- }
- };
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ _module.directive("hawtioBreadcrumbs", ['HawtioBreadcrumbs', (HawtioBreadcrumbs) => {
+ return {
+ /*
+ templateUrl: Kubernetes.templatePath + 'breadcrumbs.html'
+ */
+ link: (scope, element, attrs) => {
+ HawtioBreadcrumbs.apply(scope.$eval('breadcrumbConfig'));
+ }
+ };
+ }]);
+}
diff --git a/plugins/kubernetes/ts/build.ts b/plugins/kubernetes/ts/build.ts
index 166db3e..12102b6 100644
--- a/plugins/kubernetes/ts/build.ts
+++ b/plugins/kubernetes/ts/build.ts
@@ -1,53 +1,53 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var BuildController = controller("BuildController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
- $scope.schema = KubernetesSchema;
- $scope.config = KubernetesSchema.definitions.os_build_Build;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
- $scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, null, $scope);
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- updateData();
-
- function updateData() {
- $scope.item = null;
- if ($scope.id) {
- var url = buildRestUrl($scope.id);
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.entity = enrichBuild(data);
- }
- $scope.fetched = true;
- Core.$apply($scope);
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- } else {
- $scope.fetched = true;
- Core.$apply($scope);
- }
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var BuildController = controller("BuildController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+ $scope.config = KubernetesSchema.definitions.os_build_Build;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
+ $scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, null, $scope);
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ updateData();
+
+ function updateData() {
+ $scope.item = null;
+ if ($scope.id) {
+ var url = buildRestUrl($scope.id);
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.entity = enrichBuild(data);
+ }
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ } else {
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/buildConfig.ts b/plugins/kubernetes/ts/buildConfig.ts
index 1e135ce..7fa3660 100644
--- a/plugins/kubernetes/ts/buildConfig.ts
+++ b/plugins/kubernetes/ts/buildConfig.ts
@@ -1,56 +1,56 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var BuildConfigController = controller("BuildConfigController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
- $scope.schema = KubernetesSchema;
- $scope.config = KubernetesSchema.definitions.os_build_BuildConfig;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
- $scope.subTabConfig = Developer.createProjectSubNavBars($scope.id);
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- updateData();
-
- function updateData() {
- $scope.item = null;
- if ($scope.id) {
- var url = buildConfigRestUrl($scope.id);
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.entity = data;
- var sortedBuilds = null;
- enrichBuildConfig(data, sortedBuilds);
- $scope.model.setProject($scope.entity);
- }
- $scope.fetched = true;
- Core.$apply($scope);
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- } else {
- $scope.fetched = true;
- Core.$apply($scope);
- }
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var BuildConfigController = controller("BuildConfigController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+ $scope.config = KubernetesSchema.definitions.os_build_BuildConfig;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
+ $scope.subTabConfig = Developer.createProjectSubNavBars($scope.id);
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ updateData();
+
+ function updateData() {
+ $scope.item = null;
+ if ($scope.id) {
+ var url = buildConfigRestUrl($scope.id);
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.entity = data;
+ var sortedBuilds = null;
+ enrichBuildConfig(data, sortedBuilds);
+ $scope.model.setProject($scope.entity);
+ }
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ } else {
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/buildConfigEdit.ts b/plugins/kubernetes/ts/buildConfigEdit.ts
index d411c74..93c169a 100644
--- a/plugins/kubernetes/ts/buildConfigEdit.ts
+++ b/plugins/kubernetes/ts/buildConfigEdit.ts
@@ -1,429 +1,429 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var BuildConfigEditController = _module.controller("Kubernetes.BuildConfigEditController", ($scope, $element, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, K8SClientFactory, SchemaRegistry:HawtioForms.SchemaRegistry) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["project"] || $routeParams["id"];
- $scope.schema = KubernetesSchema;
-
- var mode = $scope.$eval('mode') || 'edit';
-
- log.debug("Mode: ", mode);
-
-
- var specConfig = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildConfigSpec');
- var gitBuildSource = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.GitBuildSource');
- var buildSource = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildSource');
- var buildOutput = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildOutput');
- var resources = SchemaRegistry.getSchema('io.fabric8.kubernetes.api.model.ResourceRequirements');
- var revision = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.SourceRevision');
- var strategy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildStrategy');
- var customStrategy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.CustomBuildStrategy');
- var buildTriggerPolicy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildTriggerPolicy');
-
- var getSecrets = () => {
- return $scope.secrets;
- };
-
-
- var secretSchemaType = "fabric8_SecretReference";
- var secretSchemaRef = "#/definitions/" + secretSchemaType;
- var secretSchemaJavaType = "io.fabric8.console.SecretReference";
-
- var secretNameElement = {
- "type": "string",
- "enum": getSecrets,
- required: true
- };
-
- var secretSchema: HawtioForms.FormConfiguration = {
- "type": "object",
- properties: {
- "name": secretNameElement
- },
- javaType: secretSchemaJavaType
- };
- SchemaRegistry.addSchema(secretSchemaType, secretSchema);
-
- // lets switch to the new secrets types:
- var sourceSecretProperty = Core.pathGet(buildSource, ["properties", "sourceSecret"]);
- angular.forEach([
- Core.pathGet(customStrategy, ["properties", "pullSecret"]),
- sourceSecretProperty,
- ], (schemaType) => {
- if (schemaType) {
- schemaType["type"] = secretSchemaType;
- schemaType["$ref"] = secretSchemaRef;
- schemaType["javaType"] = secretSchemaJavaType;
- }
- });
-
- // lets try make the buildSource's sourceSecret mandatory
- //schemaSetRequired(customStrategy, 'pullSecret');
- schemaSetRequired(buildSource, 'sourceSecret');
- if (sourceSecretProperty) {
- Core.pathSet(sourceSecretProperty, ['properties', 'required'], true);
- Core.pathSet(sourceSecretProperty, ['properties', 'input-attributes', 'required'], true);
- }
-
- $scope.customStrategy = customStrategy;
- $scope.buildSource = buildSource;
-
- $scope.secrets = [];
-
- // $scope.config = KubernetesSchema.definitions.os_build_BuildConfig;
- //$scope.specConfig = KubernetesSchema.definitions.os_build_BuildConfigSpec;
- //
- specConfig.style = HawtioForms.FormStyle.STANDARD;
- specConfig.properties['triggers']['label-attributes'] = {
- style: 'display: none;'
- };
-
- gitBuildSource.controls = ['uri', 'ref', '*'];
- buildSource.properties['type'].type = 'hidden';
- buildSource.properties['type']['default'] = 'Git';
- buildSource.controls = ['git', 'contextDir', 'sourceSecret', '*'];
-
- gitBuildSource['hideLegend'] = true;
- buildSource['hideLegend'] = true;
- buildOutput['hideLegend'] = true;
- resources['hideLegend'] = true;
- revision['hideLegend'] = true;
- strategy['hideLegend'] = true;
-
- strategy.controls = ['type', '*'];
- strategy.properties['type'] = {
- type: 'text',
- enum: [{
- 'value': 'Custom',
- 'label': 'Custom'
- }, {
- 'value': 'Docker',
- 'label': 'Docker'
- }, {
- 'value': 'Source',
- 'label': 'Source'
- }]
- };
- customStrategy['control-group-attributes'] = {
- 'ng-show': "entity.type == 'Custom'"
- };
- strategy.properties['dockerStrategy']['control-group-attributes'] = {
- 'ng-show': "entity.type == 'Docker'"
- };
- strategy.properties['sourceStrategy']['control-group-attributes'] = {
- 'ng-show': "entity.type == 'Source'"
- };
-
- buildTriggerPolicy.controls = ['type', '*'];
- buildTriggerPolicy.properties['type'] = {
- type: 'string',
- enum: [{
- 'value': 'Github',
- 'label': 'Github'
- }, {
- 'value': 'ImageChange',
- 'label': 'Image Change'
- }, {
- 'value': 'Generic',
- 'label': 'Generic'
- }]
- };
- buildTriggerPolicy.properties['generic']['control-group-attributes'] = {
- 'ng-show': "entity.type == 'Generic'"
- };
- buildTriggerPolicy.properties['github']['control-group-attributes'] = {
- 'ng-show': "entity.type == 'Github'"
- };
- buildTriggerPolicy.properties['imageChange']['control-group-attributes'] = {
- 'ng-show': "entity.type == 'ImageChange'"
- };
-
- // re-arranging the controls
- //specConfig.controls = ['source', '*'];
-
- // tabs
- specConfig.tabs = {
- "Source": ["source"],
- "Revision": ["revision"],
- "Output": ["output"],
- "Resources": ["resources"],
- "Strategy": ["strategy"],
- "Triggers": ["triggers"],
- "Service Account": ["serviceAccount"]
- };
- /*
- * wizard, needs an 'onFinish' function in the scope
- specConfig.wizard = {
- pages: {
- Source: {
- controls: ["source"]
- },
- Revision: {
- controls: ["revision"]
- },
- Output: {
- controls: ["output"]
- },
- Resources: {
- controls: ["resources"]
- },
- Strategy: {
- controls: ["strategy"]
- },
- Triggers: {
- controls: ["triggers"]
- },
- "Service Account": {
- controls: ["serviceAccount"]
- }
- }
- };
- */
-
- $scope.entity = {
- "apiVersion": "v1",
- "kind": "BuildConfig",
- "metadata": {
- "name": "",
- "labels": {
- }
- },
- "spec": {
- "source": {
- "type": "Git"
- },
- "strategy": {
- "type": "Custom",
- "customStrategy": {
- "from": {
- "kind": "DockerImage",
- "name": "fabric8/openshift-s2i-jenkins-trigger"
- },
- "env": [
- {
- "name": "BASE_URI",
- "value": jenkinsUrl
- },
- {
- "name": "JOB_NAME",
- "value": jobName
- }
- ]
- }
- }
- }
- };
-
- $scope.$watch('entity.spec.source.git.uri', (val) => {
- if (!val) {
- return;
- }
- var lastBit = val.match(/[^\/]+$/)[0];
- if (lastBit) {
- var name = lastBit.replace(/\.git$/, '');
- log.debug("name: ", name);
- if (!Core.isBlank(name)
- && Core.isBlank(Core.pathGet($scope.entity, ['metadata', 'name']))) {
- Core.pathSet($scope.entity, ['metadata', 'name'], name);
- }
- }
- });
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- $scope.breadcrumbConfig = Developer.createProjectSettingsBreadcrumbs($scope.projectId);
- $scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId);
- $scope.tabs = Developer.createProjectSettingsSubNavBars($scope.projectId);
-
- watch($scope, $element, "secrets", $scope.namespace, onSecrets);
-
-
- $scope.buildConfigClient = K8SClientFactory.create("buildconfigs", $scope.namespace);
-
- $element.on('$destroy', () => {
- $scope.$destroy();
- });
- $scope.$on('$destroy', () => {
- K8SClientFactory.destroy($scope.buildConfigClient);
- });
-
-/*
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
-*/
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- $scope.save = () => {
- log.info("Saving!");
-
-
- var entity = $scope.entity;
- var spec = (entity || {}).spec || {};
-
- // TODO update the jenkins job name!
-
- // lets delete lots of cruft
- var strategy = spec.strategy || {};
- delete strategy["dockerStrategy"];
- delete strategy["sourceStrategy"];
-
- delete spec["revision"];
- delete spec["output"];
- delete spec["resources"];
-
- var strategyPullSecretName = Core.pathGet(spec, ["strategy", "customStrategy", "pullSecret", "name"]);
- var sourceSecretName = Core.pathGet(spec, ["source", "sourceSecret", "name"]);
- log.info("sourceSecretName: " + sourceSecretName);
- log.info("strategyPullSecretName: " + strategyPullSecretName);
- if (!strategyPullSecretName && sourceSecretName) {
- Core.pathSet(spec, ["strategy", "customStrategy", "pullSecret", "name"], sourceSecretName);
- }
-
-/*
- // TODO hack until the put deals with updates
- var metadata = entity.metadata;
- if (metadata) {
- delete metadata["resourceVersion"];
- }
-*/
-
- log.info(angular.toJson(entity, true));
-
- $scope.buildConfigClient.put(entity, (obj) => {
- log.info("build config created!");
-
- var link = Developer.projectSecretsLink($scope.namespace, getName(entity));
- if (link) {
- log.info("Navigating to: "+ link);
- $location.path(link);
- } else {
- log.warn("Could not find the edit pipeline link!");
- }
- })
- };
-
- updateData();
-
-
- var jenkinsUrl = Developer.jenkinsLink();
- var jobName = "";
-
- function updateData() {
- $scope.item = null;
- if ($scope.id) {
- var url = buildConfigRestUrl($scope.id);
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.entity = data;
-
- var buildConfig = angular.copy(data);
- var sortedBuilds = null;
- Kubernetes.enrichBuildConfig(buildConfig, sortedBuilds);
- $scope.buildConfig = buildConfig;
- }
- $scope.spec = ($scope.entity || {}).spec || {};
- $scope.fetched = true;
-
- // lets update the tabs
- $scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId, null, $scope);
- Core.$apply($scope);
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- } else {
- $scope.fetched = true;
-
- $scope.spec = $scope.entity.spec;
- Core.$apply($scope);
- }
- }
-
- function onSecrets(secrets) {
- var array = [];
- angular.forEach(secrets, (secret) => {
- var name = getName(secret);
- if (name) {
- array.push({
- label: name,
- value: name,
- "attributes": {
- "title": name
- },
- $secret: secret
- });
- }
- });
- $scope.secrets = _.sortBy(array, "label");
-
- var specSourceSecretNamePath = ['spec', 'source', 'sourceSecret', 'name'];
- if ($scope.entity && !Core.pathGet($scope.entity, specSourceSecretNamePath)) {
- var defaultSecretName = findDefaultImportSecretName(secrets);
- Core.pathSet($scope.entity, specSourceSecretNamePath, defaultSecretName);
- }
- }
-
- function findDefaultImportSecretName(secrets) {
- var answer = null;
- angular.forEach(secrets, (secret) => {
- var name = getName(secret);
- if (!answer && name && name.startsWith("jenkins-login")) {
- answer = name;
- }
- });
- if (!answer) {
- angular.forEach(secrets, (secret) => {
- var name = getName(secret);
- if (!answer && name && name.startsWith("jenkins-token")) {
- answer = name;
- }
- });
- }
- return answer;
- }
-
- switch (mode) {
- case 'create':
- delete specConfig.tabs;
- _.forIn(buildSource.properties, (property:any, name:string) => {
- if (name !== 'git') {
- log.info("Hiding property: ", name);
- property.hidden = true;
- }
- });
- _.forIn(gitBuildSource.properties, (property:any, name:string) => {
- if (name !== 'uri') {
- log.info("Hiding property: ", name);
- property.hidden = true;
- } else {
- property.label = "Git URL";
- property['input-attributes'] = {
- 'required': true
- }
- }
- });
- _.forIn(specConfig.properties, (property:any, name:string) => {
- if (name !== 'source') {
- log.info("Hiding property: ", name);
- property.hidden = true;
- }
- });
- break;
- case 'edit':
- default:
- }
-
- $scope.specConfig = specConfig;
- });
-
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var BuildConfigEditController = _module.controller("Kubernetes.BuildConfigEditController", ($scope, $element, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, K8SClientFactory, SchemaRegistry:HawtioForms.SchemaRegistry) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["project"] || $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+
+ var mode = $scope.$eval('mode') || 'edit';
+
+ log.debug("Mode: ", mode);
+
+
+ var specConfig = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildConfigSpec');
+ var gitBuildSource = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.GitBuildSource');
+ var buildSource = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildSource');
+ var buildOutput = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildOutput');
+ var resources = SchemaRegistry.getSchema('io.fabric8.kubernetes.api.model.ResourceRequirements');
+ var revision = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.SourceRevision');
+ var strategy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildStrategy');
+ var customStrategy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.CustomBuildStrategy');
+ var buildTriggerPolicy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildTriggerPolicy');
+
+ var getSecrets = () => {
+ return $scope.secrets;
+ };
+
+
+ var secretSchemaType = "fabric8_SecretReference";
+ var secretSchemaRef = "#/definitions/" + secretSchemaType;
+ var secretSchemaJavaType = "io.fabric8.console.SecretReference";
+
+ var secretNameElement = {
+ "type": "string",
+ "enum": getSecrets,
+ required: true
+ };
+
+ var secretSchema: HawtioForms.FormConfiguration = {
+ "type": "object",
+ properties: {
+ "name": secretNameElement
+ },
+ javaType: secretSchemaJavaType
+ };
+ SchemaRegistry.addSchema(secretSchemaType, secretSchema);
+
+ // lets switch to the new secrets types:
+ var sourceSecretProperty = Core.pathGet(buildSource, ["properties", "sourceSecret"]);
+ angular.forEach([
+ Core.pathGet(customStrategy, ["properties", "pullSecret"]),
+ sourceSecretProperty,
+ ], (schemaType) => {
+ if (schemaType) {
+ schemaType["type"] = secretSchemaType;
+ schemaType["$ref"] = secretSchemaRef;
+ schemaType["javaType"] = secretSchemaJavaType;
+ }
+ });
+
+ // lets try make the buildSource's sourceSecret mandatory
+ //schemaSetRequired(customStrategy, 'pullSecret');
+ schemaSetRequired(buildSource, 'sourceSecret');
+ if (sourceSecretProperty) {
+ Core.pathSet(sourceSecretProperty, ['properties', 'required'], true);
+ Core.pathSet(sourceSecretProperty, ['properties', 'input-attributes', 'required'], true);
+ }
+
+ $scope.customStrategy = customStrategy;
+ $scope.buildSource = buildSource;
+
+ $scope.secrets = [];
+
+ // $scope.config = KubernetesSchema.definitions.os_build_BuildConfig;
+ //$scope.specConfig = KubernetesSchema.definitions.os_build_BuildConfigSpec;
+ //
+ specConfig.style = HawtioForms.FormStyle.STANDARD;
+ specConfig.properties['triggers']['label-attributes'] = {
+ style: 'display: none;'
+ };
+
+ gitBuildSource.controls = ['uri', 'ref', '*'];
+ buildSource.properties['type'].type = 'hidden';
+ buildSource.properties['type']['default'] = 'Git';
+ buildSource.controls = ['git', 'contextDir', 'sourceSecret', '*'];
+
+ gitBuildSource['hideLegend'] = true;
+ buildSource['hideLegend'] = true;
+ buildOutput['hideLegend'] = true;
+ resources['hideLegend'] = true;
+ revision['hideLegend'] = true;
+ strategy['hideLegend'] = true;
+
+ strategy.controls = ['type', '*'];
+ strategy.properties['type'] = {
+ type: 'text',
+ enum: [{
+ 'value': 'Custom',
+ 'label': 'Custom'
+ }, {
+ 'value': 'Docker',
+ 'label': 'Docker'
+ }, {
+ 'value': 'Source',
+ 'label': 'Source'
+ }]
+ };
+ customStrategy['control-group-attributes'] = {
+ 'ng-show': "entity.type == 'Custom'"
+ };
+ strategy.properties['dockerStrategy']['control-group-attributes'] = {
+ 'ng-show': "entity.type == 'Docker'"
+ };
+ strategy.properties['sourceStrategy']['control-group-attributes'] = {
+ 'ng-show': "entity.type == 'Source'"
+ };
+
+ buildTriggerPolicy.controls = ['type', '*'];
+ buildTriggerPolicy.properties['type'] = {
+ type: 'string',
+ enum: [{
+ 'value': 'Github',
+ 'label': 'Github'
+ }, {
+ 'value': 'ImageChange',
+ 'label': 'Image Change'
+ }, {
+ 'value': 'Generic',
+ 'label': 'Generic'
+ }]
+ };
+ buildTriggerPolicy.properties['generic']['control-group-attributes'] = {
+ 'ng-show': "entity.type == 'Generic'"
+ };
+ buildTriggerPolicy.properties['github']['control-group-attributes'] = {
+ 'ng-show': "entity.type == 'Github'"
+ };
+ buildTriggerPolicy.properties['imageChange']['control-group-attributes'] = {
+ 'ng-show': "entity.type == 'ImageChange'"
+ };
+
+ // re-arranging the controls
+ //specConfig.controls = ['source', '*'];
+
+ // tabs
+ specConfig.tabs = {
+ "Source": ["source"],
+ "Revision": ["revision"],
+ "Output": ["output"],
+ "Resources": ["resources"],
+ "Strategy": ["strategy"],
+ "Triggers": ["triggers"],
+ "Service Account": ["serviceAccount"]
+ };
+ /*
+ * wizard, needs an 'onFinish' function in the scope
+ specConfig.wizard = {
+ pages: {
+ Source: {
+ controls: ["source"]
+ },
+ Revision: {
+ controls: ["revision"]
+ },
+ Output: {
+ controls: ["output"]
+ },
+ Resources: {
+ controls: ["resources"]
+ },
+ Strategy: {
+ controls: ["strategy"]
+ },
+ Triggers: {
+ controls: ["triggers"]
+ },
+ "Service Account": {
+ controls: ["serviceAccount"]
+ }
+ }
+ };
+ */
+
+ $scope.entity = {
+ "apiVersion": "v1",
+ "kind": "BuildConfig",
+ "metadata": {
+ "name": "",
+ "labels": {
+ }
+ },
+ "spec": {
+ "source": {
+ "type": "Git"
+ },
+ "strategy": {
+ "type": "Custom",
+ "customStrategy": {
+ "from": {
+ "kind": "DockerImage",
+ "name": "fabric8/openshift-s2i-jenkins-trigger"
+ },
+ "env": [
+ {
+ "name": "BASE_URI",
+ "value": jenkinsUrl
+ },
+ {
+ "name": "JOB_NAME",
+ "value": jobName
+ }
+ ]
+ }
+ }
+ }
+ };
+
+ $scope.$watch('entity.spec.source.git.uri', (val) => {
+ if (!val) {
+ return;
+ }
+ var lastBit = val.match(/[^\/]+$/)[0];
+ if (lastBit) {
+ var name = lastBit.replace(/\.git$/, '');
+ log.debug("name: ", name);
+ if (!Core.isBlank(name)
+ && Core.isBlank(Core.pathGet($scope.entity, ['metadata', 'name']))) {
+ Core.pathSet($scope.entity, ['metadata', 'name'], name);
+ }
+ }
+ });
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ $scope.breadcrumbConfig = Developer.createProjectSettingsBreadcrumbs($scope.projectId);
+ $scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId);
+ $scope.tabs = Developer.createProjectSettingsSubNavBars($scope.projectId);
+
+ watch($scope, $element, "secrets", $scope.namespace, onSecrets);
+
+
+ $scope.buildConfigClient = K8SClientFactory.create("buildconfigs", $scope.namespace);
+
+ $element.on('$destroy', () => {
+ $scope.$destroy();
+ });
+ $scope.$on('$destroy', () => {
+ K8SClientFactory.destroy($scope.buildConfigClient);
+ });
+
+/*
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+*/
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ $scope.save = () => {
+ log.info("Saving!");
+
+
+ var entity = $scope.entity;
+ var spec = (entity || {}).spec || {};
+
+ // TODO update the jenkins job name!
+
+ // lets delete lots of cruft
+ var strategy = spec.strategy || {};
+ delete strategy["dockerStrategy"];
+ delete strategy["sourceStrategy"];
+
+ delete spec["revision"];
+ delete spec["output"];
+ delete spec["resources"];
+
+ var strategyPullSecretName = Core.pathGet(spec, ["strategy", "customStrategy", "pullSecret", "name"]);
+ var sourceSecretName = Core.pathGet(spec, ["source", "sourceSecret", "name"]);
+ log.info("sourceSecretName: " + sourceSecretName);
+ log.info("strategyPullSecretName: " + strategyPullSecretName);
+ if (!strategyPullSecretName && sourceSecretName) {
+ Core.pathSet(spec, ["strategy", "customStrategy", "pullSecret", "name"], sourceSecretName);
+ }
+
+/*
+ // TODO hack until the put deals with updates
+ var metadata = entity.metadata;
+ if (metadata) {
+ delete metadata["resourceVersion"];
+ }
+*/
+
+ log.info(angular.toJson(entity, true));
+
+ $scope.buildConfigClient.put(entity, (obj) => {
+ log.info("build config created!");
+
+ var link = Developer.projectSecretsLink($scope.namespace, getName(entity));
+ if (link) {
+ log.info("Navigating to: "+ link);
+ $location.path(link);
+ } else {
+ log.warn("Could not find the edit pipeline link!");
+ }
+ })
+ };
+
+ updateData();
+
+
+ var jenkinsUrl = Developer.jenkinsLink();
+ var jobName = "";
+
+ function updateData() {
+ $scope.item = null;
+ if ($scope.id) {
+ var url = buildConfigRestUrl($scope.id);
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.entity = data;
+
+ var buildConfig = angular.copy(data);
+ var sortedBuilds = null;
+ Kubernetes.enrichBuildConfig(buildConfig, sortedBuilds);
+ $scope.buildConfig = buildConfig;
+ }
+ $scope.spec = ($scope.entity || {}).spec || {};
+ $scope.fetched = true;
+
+ // lets update the tabs
+ $scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId, null, $scope);
+ Core.$apply($scope);
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ } else {
+ $scope.fetched = true;
+
+ $scope.spec = $scope.entity.spec;
+ Core.$apply($scope);
+ }
+ }
+
+ function onSecrets(secrets) {
+ var array = [];
+ angular.forEach(secrets, (secret) => {
+ var name = getName(secret);
+ if (name) {
+ array.push({
+ label: name,
+ value: name,
+ "attributes": {
+ "title": name
+ },
+ $secret: secret
+ });
+ }
+ });
+ $scope.secrets = _.sortBy(array, "label");
+
+ var specSourceSecretNamePath = ['spec', 'source', 'sourceSecret', 'name'];
+ if ($scope.entity && !Core.pathGet($scope.entity, specSourceSecretNamePath)) {
+ var defaultSecretName = findDefaultImportSecretName(secrets);
+ Core.pathSet($scope.entity, specSourceSecretNamePath, defaultSecretName);
+ }
+ }
+
+ function findDefaultImportSecretName(secrets) {
+ var answer = null;
+ angular.forEach(secrets, (secret) => {
+ var name = getName(secret);
+ if (!answer && name && name.startsWith("jenkins-login")) {
+ answer = name;
+ }
+ });
+ if (!answer) {
+ angular.forEach(secrets, (secret) => {
+ var name = getName(secret);
+ if (!answer && name && name.startsWith("jenkins-token")) {
+ answer = name;
+ }
+ });
+ }
+ return answer;
+ }
+
+ switch (mode) {
+ case 'create':
+ delete specConfig.tabs;
+ _.forIn(buildSource.properties, (property:any, name:string) => {
+ if (name !== 'git') {
+ log.info("Hiding property: ", name);
+ property.hidden = true;
+ }
+ });
+ _.forIn(gitBuildSource.properties, (property:any, name:string) => {
+ if (name !== 'uri') {
+ log.info("Hiding property: ", name);
+ property.hidden = true;
+ } else {
+ property.label = "Git URL";
+ property['input-attributes'] = {
+ 'required': true
+ }
+ }
+ });
+ _.forIn(specConfig.properties, (property:any, name:string) => {
+ if (name !== 'source') {
+ log.info("Hiding property: ", name);
+ property.hidden = true;
+ }
+ });
+ break;
+ case 'edit':
+ default:
+ }
+
+ $scope.specConfig = specConfig;
+ });
+
+}
diff --git a/plugins/kubernetes/ts/buildConfigs.ts b/plugins/kubernetes/ts/buildConfigs.ts
index 78f3999..cf9720f 100644
--- a/plugins/kubernetes/ts/buildConfigs.ts
+++ b/plugins/kubernetes/ts/buildConfigs.ts
@@ -1,137 +1,137 @@
-///
-///
-
-module Kubernetes {
-
- export var BuildConfigsController = controller("BuildConfigsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
-
- $scope.tableConfig = {
- data: 'model.buildconfigs',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- {
- field: 'metadata.name',
- displayName: 'Name',
- cellTemplate: $templateCache.get("buildConfigLinkTemplate.html")
- },
-/*
- {
- field: 'spec.source.type',
- displayName: 'Source'
- },
-*/
- {
- field: 'spec.source.git.uri',
- displayName: 'Repository'
- },
-/*
- {
- field: 'spec.strategy.type',
- displayName: 'Strategy'
- },
- {
- field: 'spec.strategy.stiStrategy.image',
- displayName: 'Source Image'
- },
- {
- field: 'spec.output.imageTag',
- displayName: 'Output Image'
- },
-*/
- {
- field: '$fabric8CodeViews',
- displayName: 'Code',
- width: "***",
- minWidth: 500,
- cellTemplate: $templateCache.get("buildConfigCodeViewsTemplate.html")
- },
- {
- field: '$fabric8BuildViews',
- displayName: 'Builds',
- width: "***",
- minWidth: 500,
- cellTemplate: $templateCache.get("buildConfigBuildViewsTemplate.html")
- },
- {
- field: '$fabric8EnvironmentViews',
- displayName: 'Environments',
- width: "***",
- minWidth: 500,
- cellTemplate: $templateCache.get("buildConfigEnvironmentViewsTemplate.html")
- },
- {
- field: '$fabric8TeamViews',
- displayName: 'People',
- width: "***",
- minWidth: 500,
- cellTemplate: $templateCache.get("buildConfigTeamViewsTemplate.html")
- }
- ]
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- // TODO
- // $scope.isLoggedIntoGogs = Forge.isLoggedIntoGogs;
-
- $scope.deletePrompt = (selected) => {
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: '$name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected, next) {
- if (next) {
- deleteEntity(next, () => {
- deleteSelected(selected, selected.shift());
- });
- } else {
- updateData();
- }
- }
-
- deleteSelected(selected, selected.shift());
- }
- },
- title: 'Delete Build Configs?',
- action: 'The following Build Configs will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
-
- function deleteEntity(selection, nextCallback) {
- var name = (selection || {}).$name;
- if (name) {
- console.log("About to delete build config: " + name);
- var url = buildConfigRestUrl(name);
- $http.delete(url).
- success(function (data, status, headers, config) {
- nextCallback();
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to delete build config on " + url + " " + data + " " + status);
- });
- } else {
- console.log("warning: no name for selection: " + angular.toJson(selection));
- }
- }
-
- function updateData() {
- }
-
- updateData();
- }]);
-}
+///
+///
+
+module Kubernetes {
+
+ export var BuildConfigsController = controller("BuildConfigsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+
+ $scope.tableConfig = {
+ data: 'model.buildconfigs',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ {
+ field: 'metadata.name',
+ displayName: 'Name',
+ cellTemplate: $templateCache.get("buildConfigLinkTemplate.html")
+ },
+/*
+ {
+ field: 'spec.source.type',
+ displayName: 'Source'
+ },
+*/
+ {
+ field: 'spec.source.git.uri',
+ displayName: 'Repository'
+ },
+/*
+ {
+ field: 'spec.strategy.type',
+ displayName: 'Strategy'
+ },
+ {
+ field: 'spec.strategy.stiStrategy.image',
+ displayName: 'Source Image'
+ },
+ {
+ field: 'spec.output.imageTag',
+ displayName: 'Output Image'
+ },
+*/
+ {
+ field: '$fabric8CodeViews',
+ displayName: 'Code',
+ width: "***",
+ minWidth: 500,
+ cellTemplate: $templateCache.get("buildConfigCodeViewsTemplate.html")
+ },
+ {
+ field: '$fabric8BuildViews',
+ displayName: 'Builds',
+ width: "***",
+ minWidth: 500,
+ cellTemplate: $templateCache.get("buildConfigBuildViewsTemplate.html")
+ },
+ {
+ field: '$fabric8EnvironmentViews',
+ displayName: 'Environments',
+ width: "***",
+ minWidth: 500,
+ cellTemplate: $templateCache.get("buildConfigEnvironmentViewsTemplate.html")
+ },
+ {
+ field: '$fabric8TeamViews',
+ displayName: 'People',
+ width: "***",
+ minWidth: 500,
+ cellTemplate: $templateCache.get("buildConfigTeamViewsTemplate.html")
+ }
+ ]
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ // TODO
+ // $scope.isLoggedIntoGogs = Forge.isLoggedIntoGogs;
+
+ $scope.deletePrompt = (selected) => {
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: '$name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected, next) {
+ if (next) {
+ deleteEntity(next, () => {
+ deleteSelected(selected, selected.shift());
+ });
+ } else {
+ updateData();
+ }
+ }
+
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: 'Delete Build Configs?',
+ action: 'The following Build Configs will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+
+ function deleteEntity(selection, nextCallback) {
+ var name = (selection || {}).$name;
+ if (name) {
+ console.log("About to delete build config: " + name);
+ var url = buildConfigRestUrl(name);
+ $http.delete(url).
+ success(function (data, status, headers, config) {
+ nextCallback();
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to delete build config on " + url + " " + data + " " + status);
+ });
+ } else {
+ console.log("warning: no name for selection: " + angular.toJson(selection));
+ }
+ }
+
+ function updateData() {
+ }
+
+ updateData();
+ }]);
+}
diff --git a/plugins/kubernetes/ts/buildLogs.ts b/plugins/kubernetes/ts/buildLogs.ts
index 7ff39e4..3938bdb 100644
--- a/plugins/kubernetes/ts/buildLogs.ts
+++ b/plugins/kubernetes/ts/buildLogs.ts
@@ -1,68 +1,68 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var BuildLogsController = controller("BuildLogsController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
- $scope.schema = KubernetesSchema;
- $scope.config = KubernetesSchema.definitions.os_build_Build;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- $scope.logsText = "Loading logs...";
-
- updateData();
-
- function updateData() {
- $scope.item = null;
- if ($scope.id) {
- var url = buildRestUrl($scope.id);
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.entity = enrichBuild(data);
- }
- $scope.fetched = true;
- Core.$apply($scope);
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
-
- url = buildLogsRestUrl($scope.id);
- $http.get(url).
- success(function (data, status) {
- $scope.logsText = data;
- Core.$apply($scope);
- }).
- error(function (data, status) {
- $scope.logsText = "Failed to load logs from: " + url + " " + data + " status: " + status;
- Core.$apply($scope);
- }).
- catch(function (error) {
- $scope.logsText = "Failed to load logs: " + angular.toJson(error, true);
- Core.$apply($scope);
- });
- } else {
- $scope.fetched = true;
- Core.$apply($scope);
- }
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var BuildLogsController = controller("BuildLogsController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+ $scope.config = KubernetesSchema.definitions.os_build_Build;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ $scope.logsText = "Loading logs...";
+
+ updateData();
+
+ function updateData() {
+ $scope.item = null;
+ if ($scope.id) {
+ var url = buildRestUrl($scope.id);
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.entity = enrichBuild(data);
+ }
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+
+ url = buildLogsRestUrl($scope.id);
+ $http.get(url).
+ success(function (data, status) {
+ $scope.logsText = data;
+ Core.$apply($scope);
+ }).
+ error(function (data, status) {
+ $scope.logsText = "Failed to load logs from: " + url + " " + data + " status: " + status;
+ Core.$apply($scope);
+ }).
+ catch(function (error) {
+ $scope.logsText = "Failed to load logs: " + angular.toJson(error, true);
+ Core.$apply($scope);
+ });
+ } else {
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/builds.ts b/plugins/kubernetes/ts/builds.ts
index 4680df2..1840251 100644
--- a/plugins/kubernetes/ts/builds.ts
+++ b/plugins/kubernetes/ts/builds.ts
@@ -1,131 +1,131 @@
-///
-///
-
-module Kubernetes {
-
- export var BuildsController = controller("BuildsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.buildConfigId = $routeParams["id"];
-
- $scope.$on('kubernetesModelUpdated', function () {
- Core.$apply($scope);
- });
-
- $scope.tableConfig = {
- data: 'model.builds',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- {
- field: 'metadata.name',
- displayName: 'Name',
- cellTemplate: $templateCache.get("buildLinkTemplate.html")
- },
- {
- field: '$creationDate',
- displayName: 'Time',
- defaultSort: true,
- cellTemplate: $templateCache.get("buildTimeTemplate.html")
- },
- {
- field: 'status',
- displayName: 'Status',
- cellTemplate: $templateCache.get("buildStatusTemplate.html")
- },
- {
- field: '$logsLink',
- displayName: 'Logs',
- cellTemplate: $templateCache.get("buildLogsTemplate.html")
- },
- {
- field: '$podLink',
- displayName: 'Build Pod',
- cellTemplate: $templateCache.get("buildPodTemplate.html")
- },
-/*
- {
- field: 'parameters.source.type',
- displayName: 'Source'
- },
-*/
- {
- field: 'spec.source.git.uri',
- displayName: 'Repository',
- cellTemplate: $templateCache.get("buildRepositoryTemplate.html")
- },
- {
- field: 'spec.strategy.type',
- displayName: 'Strategy'
- },
- {
- field: 'spec.strategy.sourceStrategy.from.name',
- displayName: 'Source Image'
- },
- {
- field: 'spec.output.to.name',
- displayName: 'Output Image'
- }]
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.buildConfigId);
- $scope.subTabConfig = Developer.createProjectSubNavBars($scope.buildConfigId, null, $scope);
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- function updateData() {
- if ($scope.model) {
- var builds = $scope.model.builds;
- var buildConfigId = $scope.buildConfigId;
-
- enrichBuilds(builds);
- $scope.fetched = true;
-
- if (buildConfigId) {
- $scope.buildConfig = $scope.model.getBuildConfig(buildConfigId);
- }
- }
- }
-
- updateData();
-
-
- /*
- $scope.$keepPolling = () => keepPollingModel;
- $scope.fetch = PollHelpers.setupPolling($scope, (next:() => void) => {
- var url = buildsRestURL();
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- //console.log("got data " + angular.toJson(data, true));
- $scope.builds = enrichBuilds(data.items);
- $scope.fetched = true;
-
- if ($scope.model) {
- $scope.buildConfig = $scope.model.getBuildConfig($scope.buildConfigId);
- }
- }
- Core.$apply($scope);
- next();
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- Core.$apply($scope);
- next();
- });
- });
-
- $scope.fetch();
- */
- }]);
-}
+///
+///
+
+module Kubernetes {
+
+ export var BuildsController = controller("BuildsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.buildConfigId = $routeParams["id"];
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ Core.$apply($scope);
+ });
+
+ $scope.tableConfig = {
+ data: 'model.builds',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ {
+ field: 'metadata.name',
+ displayName: 'Name',
+ cellTemplate: $templateCache.get("buildLinkTemplate.html")
+ },
+ {
+ field: '$creationDate',
+ displayName: 'Time',
+ defaultSort: true,
+ cellTemplate: $templateCache.get("buildTimeTemplate.html")
+ },
+ {
+ field: 'status',
+ displayName: 'Status',
+ cellTemplate: $templateCache.get("buildStatusTemplate.html")
+ },
+ {
+ field: '$logsLink',
+ displayName: 'Logs',
+ cellTemplate: $templateCache.get("buildLogsTemplate.html")
+ },
+ {
+ field: '$podLink',
+ displayName: 'Build Pod',
+ cellTemplate: $templateCache.get("buildPodTemplate.html")
+ },
+/*
+ {
+ field: 'parameters.source.type',
+ displayName: 'Source'
+ },
+*/
+ {
+ field: 'spec.source.git.uri',
+ displayName: 'Repository',
+ cellTemplate: $templateCache.get("buildRepositoryTemplate.html")
+ },
+ {
+ field: 'spec.strategy.type',
+ displayName: 'Strategy'
+ },
+ {
+ field: 'spec.strategy.sourceStrategy.from.name',
+ displayName: 'Source Image'
+ },
+ {
+ field: 'spec.output.to.name',
+ displayName: 'Output Image'
+ }]
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.buildConfigId);
+ $scope.subTabConfig = Developer.createProjectSubNavBars($scope.buildConfigId, null, $scope);
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ function updateData() {
+ if ($scope.model) {
+ var builds = $scope.model.builds;
+ var buildConfigId = $scope.buildConfigId;
+
+ enrichBuilds(builds);
+ $scope.fetched = true;
+
+ if (buildConfigId) {
+ $scope.buildConfig = $scope.model.getBuildConfig(buildConfigId);
+ }
+ }
+ }
+
+ updateData();
+
+
+ /*
+ $scope.$keepPolling = () => keepPollingModel;
+ $scope.fetch = PollHelpers.setupPolling($scope, (next:() => void) => {
+ var url = buildsRestURL();
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ //console.log("got data " + angular.toJson(data, true));
+ $scope.builds = enrichBuilds(data.items);
+ $scope.fetched = true;
+
+ if ($scope.model) {
+ $scope.buildConfig = $scope.model.getBuildConfig($scope.buildConfigId);
+ }
+ }
+ Core.$apply($scope);
+ next();
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ Core.$apply($scope);
+ next();
+ });
+ });
+
+ $scope.fetch();
+ */
+ }]);
+}
diff --git a/plugins/kubernetes/ts/connect.ts b/plugins/kubernetes/ts/connect.ts
index 8196a5d..9716e10 100644
--- a/plugins/kubernetes/ts/connect.ts
+++ b/plugins/kubernetes/ts/connect.ts
@@ -1,27 +1,27 @@
-///
-///
-///
-
-module Kubernetes {
-
- // controller for connecting to a remote container via jolokia
- export var ConnectController = controller("ConnectController", [
- "$scope", "localStorage", "userDetails", "ConnectDialogService", "$browser",
- ($scope, localStorage, userDetails, ConnectDialogService, $browser:ng.IBrowserService) => {
-
- $scope.doConnect = (entity) => {
- var connectUrl:any = new URI().path(UrlHelpers.join(HawtioCore.documentBase(), '/java/index.html'));
- var returnTo = new URI().toString();
- var title = entity.metadata.name || 'Untitled Container';
- var token = userDetails.token || '';
- connectUrl.hash(token).query({
- jolokiaUrl: entity.$jolokiaUrl,
- title: title,
- returnTo: returnTo
- });
- log.debug("Connect URI: ", connectUrl.toString());
- window.open(connectUrl.toString());
- };
-
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ // controller for connecting to a remote container via jolokia
+ export var ConnectController = controller("ConnectController", [
+ "$scope", "localStorage", "userDetails", "ConnectDialogService", "$browser",
+ ($scope, localStorage, userDetails, ConnectDialogService, $browser:ng.IBrowserService) => {
+
+ $scope.doConnect = (entity) => {
+ var connectUrl:any = new URI().path(UrlHelpers.join(HawtioCore.documentBase(), '/java/index.html'));
+ var returnTo = new URI().toString();
+ var title = entity.metadata.name || 'Untitled Container';
+ var token = userDetails.token || '';
+ connectUrl.hash(token).query({
+ jolokiaUrl: entity.$jolokiaUrl,
+ title: title,
+ returnTo: returnTo
+ });
+ log.debug("Connect URI: ", connectUrl.toString());
+ window.open(connectUrl.toString());
+ };
+
+ }]);
+}
diff --git a/plugins/kubernetes/ts/dataInfnModel.ts b/plugins/kubernetes/ts/dataInfnModel.ts
index 1f1672f..963e529 100644
--- a/plugins/kubernetes/ts/dataInfnModel.ts
+++ b/plugins/kubernetes/ts/dataInfnModel.ts
@@ -1,192 +1,192 @@
-///
-///
-
-module Kubernetes{
- export class dataInfoModelService{
- public serverdata = {};
- public promiseobject = {};
- public localdata = {};
- public selectednodes = [];
- public resumablejs = [];
- public selecteditems = [];
- public serveritems = [];
- public uploadprocess ={};
- public uploadedStatus = "";
-
- public get uploadProcess():Object {
- return this.uploadprocess
- }
-
- public set uploadProcess(uploadProcess:Object){
- this.uploadprocess = uploadProcess;
- }
-
- public folderList = {
- length:0
- };
-
- public get serverItems():Array {
- return this.serveritems;
- }
-
- public set serverItems(serverItems: Array){
- this.serveritems = serverItems;
- }
-
- public get resumableJs():Array {
- return this.resumableJs;
- }
-
- public set resumableJs(resumableJs: Array){
- this.resumablejs = resumableJs;
- }
-
- public get selectedItems():Array {
- return this.selecteditems;
- }
-
- public set selectedItems(selectedItems: Array){
- this.selecteditems = selectedItems;
- }
-
- public get selectedNodes():Array {
- return this.selectednodes;
- }
-
- public set selectedNodes(selectedNodes: Array){
- this.selectednodes = selectedNodes;
- }
-
- public isContainsNodes(node: Object){
- for(var item in this.selectednodes){
- if(this.selectednodes[item].id === node.id)
- return true;
- }
- return false;
- }
-
- public findNodes(node: any) {
- var id = "-1";
- if(typeof(node) === "object" ){
- id = node.id;
- }else if(typeof(node) === "number"){
- id =node.toString();
- }else if(typeof(node) === "string"){
- id = node;
- }else{
- return "-1";
- }
-
- for(var item in this.selectednodes){
- if(this.selectednodes[item].id === id)
- return item;
- }
- return "-1";
- }
-
- public findItemIndex(item: any){
- var id = -1;
- if(typeof(item) === "object" ){
- id = item.id;
- }else if(typeof(item) === "number"){
- id =item.toString();
- }else if(typeof(item) === "string"){
- id = item;
- }else{
- return -1;
- }
-
- for(var it in this.selecteditems){
- if(this.selecteditems[it].id === id)
- return it;
- }
- return -1;
- }
-
- public createFolderList(files: Object ,rootPath: string){
- for(var i=0; i< files.length; i++){
- var relativePath = files[i].webkitRelativePath.replace(RegExp("^"+rootPath+"/"),"");
- var paths=relativePath.split("/");
- if(!this.folderList.hasOwnProperty(paths[0])){
- this.folderList[paths[0]]={
- length:0
- };
- this.folderList.length++;
- }
- var Obj = this.folderList[paths[0]];
- Obj[Obj.length] = files[i];
- Obj.length++;
- this.folderList[paths[0]] = Obj;
- }
- }
-
- public updateNodeById(nodeId,key,value){
- for(var item in this.selectednodes){
- var node = this.selectednodes[item];
- if(node.id === nodeId){
- node[key] = value;
- break;
- }
- }
- }
-
- public get serverData():Object {
- return this.serverData;
- }
-
- public set serverData(serverData:Object){
- this.serverdata=serverData;
- }
-
- public get promiseObject():Object {
- return this.promiseobject;
- }
-
- public set promise(promiseObject:Object){
- this.promiseobject = promiseObject;
- }
-
- public get localData():Object {
- return this.localdata;
- }
-
- public set localData(localData:Object){
- this.localdata = localData;
- }
-
- public updataDataModel(){
- this.promiseobject.success(function(data,header,config,status){
- this.serverdata =data;
- });
-
- this.promiseobject.error(function(data,status,hedaers,config){
- this.serverdata = {};
- });
- }
- }
- _module.factory('DataInfoModel', ['$http', ($http) => {
- var $scope =new dataInfoModelService();
-
- $scope.promiseobject=$http({
- url:'/xmlformserver',
- method:'POST'
- });
-
- updateDataFromServer($scope.serverdata, (data,header,config,status) => {
- $scope.serverdata = data;
- });
-
- function updateDataFromServer(data,callback){
- $http({
- url:'/xmlformserver',
- method:'POST'
- }).success(function(data,header,config,status){
- if(data)
- callback(data,header,config,status);
- }).error(function(data,header,config,status){
- console.log("error");
- });
- };
- return $scope;
- }]);
+///
+///
+
+module Kubernetes{
+ export class dataInfoModelService{
+ public serverdata = {};
+ public promiseobject = {};
+ public localdata = {};
+ public selectednodes = [];
+ public resumablejs = [];
+ public selecteditems = [];
+ public serveritems = [];
+ public uploadprocess ={};
+ public uploadedStatus = "";
+
+ public get uploadProcess():Object {
+ return this.uploadprocess
+ }
+
+ public set uploadProcess(uploadProcess:Object){
+ this.uploadprocess = uploadProcess;
+ }
+
+ public folderList = {
+ length:0
+ };
+
+ public get serverItems():Array {
+ return this.serveritems;
+ }
+
+ public set serverItems(serverItems: Array){
+ this.serveritems = serverItems;
+ }
+
+ public get resumableJs():Array {
+ return this.resumableJs;
+ }
+
+ public set resumableJs(resumableJs: Array){
+ this.resumablejs = resumableJs;
+ }
+
+ public get selectedItems():Array {
+ return this.selecteditems;
+ }
+
+ public set selectedItems(selectedItems: Array){
+ this.selecteditems = selectedItems;
+ }
+
+ public get selectedNodes():Array {
+ return this.selectednodes;
+ }
+
+ public set selectedNodes(selectedNodes: Array){
+ this.selectednodes = selectedNodes;
+ }
+
+ public isContainsNodes(node: Object){
+ for(var item in this.selectednodes){
+ if(this.selectednodes[item].id === node.id)
+ return true;
+ }
+ return false;
+ }
+
+ public findNodes(node: any) {
+ var id = "-1";
+ if(typeof(node) === "object" ){
+ id = node.id;
+ }else if(typeof(node) === "number"){
+ id =node.toString();
+ }else if(typeof(node) === "string"){
+ id = node;
+ }else{
+ return "-1";
+ }
+
+ for(var item in this.selectednodes){
+ if(this.selectednodes[item].id === id)
+ return item;
+ }
+ return "-1";
+ }
+
+ public findItemIndex(item: any){
+ var id = -1;
+ if(typeof(item) === "object" ){
+ id = item.id;
+ }else if(typeof(item) === "number"){
+ id =item.toString();
+ }else if(typeof(item) === "string"){
+ id = item;
+ }else{
+ return -1;
+ }
+
+ for(var it in this.selecteditems){
+ if(this.selecteditems[it].id === id)
+ return it;
+ }
+ return -1;
+ }
+
+ public createFolderList(files: Object ,rootPath: string){
+ for(var i=0; i< files.length; i++){
+ var relativePath = files[i].webkitRelativePath.replace(RegExp("^"+rootPath+"/"),"");
+ var paths=relativePath.split("/");
+ if(!this.folderList.hasOwnProperty(paths[0])){
+ this.folderList[paths[0]]={
+ length:0
+ };
+ this.folderList.length++;
+ }
+ var Obj = this.folderList[paths[0]];
+ Obj[Obj.length] = files[i];
+ Obj.length++;
+ this.folderList[paths[0]] = Obj;
+ }
+ }
+
+ public updateNodeById(nodeId,key,value){
+ for(var item in this.selectednodes){
+ var node = this.selectednodes[item];
+ if(node.id === nodeId){
+ node[key] = value;
+ break;
+ }
+ }
+ }
+
+ public get serverData():Object {
+ return this.serverData;
+ }
+
+ public set serverData(serverData:Object){
+ this.serverdata=serverData;
+ }
+
+ public get promiseObject():Object {
+ return this.promiseobject;
+ }
+
+ public set promise(promiseObject:Object){
+ this.promiseobject = promiseObject;
+ }
+
+ public get localData():Object {
+ return this.localdata;
+ }
+
+ public set localData(localData:Object){
+ this.localdata = localData;
+ }
+
+ public updataDataModel(){
+ this.promiseobject.success(function(data,header,config,status){
+ this.serverdata =data;
+ });
+
+ this.promiseobject.error(function(data,status,hedaers,config){
+ this.serverdata = {};
+ });
+ }
+ }
+ _module.factory('DataInfoModel', ['$http', ($http) => {
+ var $scope =new dataInfoModelService();
+
+ $scope.promiseobject=$http({
+ url:'/xmlformserver',
+ method:'POST'
+ });
+
+ updateDataFromServer($scope.serverdata, (data,header,config,status) => {
+ $scope.serverdata = data;
+ });
+
+ function updateDataFromServer(data,callback){
+ $http({
+ url:'/xmlformserver',
+ method:'POST'
+ }).success(function(data,header,config,status){
+ if(data)
+ callback(data,header,config,status);
+ }).error(function(data,header,config,status){
+ console.log("error");
+ });
+ };
+ return $scope;
+ }]);
}
\ No newline at end of file
diff --git a/plugins/kubernetes/ts/deploymentConfig.ts b/plugins/kubernetes/ts/deploymentConfig.ts
index a4d7701..a63b162 100644
--- a/plugins/kubernetes/ts/deploymentConfig.ts
+++ b/plugins/kubernetes/ts/deploymentConfig.ts
@@ -1,52 +1,52 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var DeploymentConfigController = controller("DeploymentConfigController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
- $scope.schema = KubernetesSchema;
- $scope.config = KubernetesSchema.definitions.os_deploy_DeploymentConfig;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- updateData();
-
- function updateData() {
- $scope.item = null;
- if ($scope.id) {
- var url = deploymentConfigRestUrl($scope.id);
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.entity = data;
- enrichDeploymentConfig(data);
- }
- $scope.fetched = true;
- Core.$apply($scope);
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- } else {
- $scope.fetched = true;
- Core.$apply($scope);
- }
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var DeploymentConfigController = controller("DeploymentConfigController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+ $scope.config = KubernetesSchema.definitions.os_deploy_DeploymentConfig;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ updateData();
+
+ function updateData() {
+ $scope.item = null;
+ if ($scope.id) {
+ var url = deploymentConfigRestUrl($scope.id);
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.entity = data;
+ enrichDeploymentConfig(data);
+ }
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ } else {
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/deploymentConfigs.ts b/plugins/kubernetes/ts/deploymentConfigs.ts
index 413c378..a42e9cb 100644
--- a/plugins/kubernetes/ts/deploymentConfigs.ts
+++ b/plugins/kubernetes/ts/deploymentConfigs.ts
@@ -1,124 +1,124 @@
-///
-///
-
-module Kubernetes {
-
- export var DeploymentConfigsController = controller("DeploymentConfigsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.$on('kubernetesModelUpdated', function () {
- Core.$apply($scope);
- });
- $scope.labelClass = containerLabelClass;
-
- $scope.tableConfig = {
- data: 'deploymentConfigs',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- {
- field: 'metadata.name',
- displayName: 'Name',
- cellTemplate: $templateCache.get("deploymentConfigLinkTemplate.html")
- },
- {
- field: 'metadata.namespace',
- displayName: 'Namespace'
- },
- {
- field: '$imageChangeParams.automatic',
- displayName: 'Automatic'
- },
- {
- field: '$imageChangeParams.$containerNames',
- displayName: 'Container Names'
- },
- {
- field: '$imageChangeParams.from.name',
- displayName: 'From image'
- },
- {
- field: '$imageChangeParams.tag',
- displayName: 'Tag'
- },
- {
- field: 'template.controllerTemplate.podTemplate.tags',
- displayName: 'Labels',
- cellTemplate: $templateCache.get("deploymentConfigLabelTemplate.html")
- }
- ]
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.deletePrompt = (selected) => {
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: '$name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected, next) {
- if (next) {
- deleteEntity(next, () => {
- deleteSelected(selected, selected.shift());
- });
- } else {
- updateData();
- }
- }
-
- deleteSelected(selected, selected.shift());
- }
- },
- title: 'Delete Deployment?',
- action: 'The following Deployments will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
-
- function deleteEntity(selection, nextCallback) {
- var name = (selection || {}).$name;
- if (name) {
- console.log("About to delete deployment config: " + name);
- var url = deploymentConfigRestUrl(name);
- $http.delete(url).
- success(function (data, status, headers, config) {
- nextCallback();
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to delete deployment config on " + url + " " + data + " " + status);
- });
- } else {
- console.log("warning: no name for selection: " + angular.toJson(selection));
- }
- }
-
- function updateData() {
- var url = deploymentConfigsRestURL();
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- //console.log("got data " + angular.toJson(data, true));
- $scope.deploymentConfigs = enrichDeploymentConfigs(data.items);
- $scope.fetched = true;
- Core.$apply($scope);
- }
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- }
-
- updateData();
- }]);
-}
+///
+///
+
+module Kubernetes {
+
+ export var DeploymentConfigsController = controller("DeploymentConfigsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.$on('kubernetesModelUpdated', function () {
+ Core.$apply($scope);
+ });
+ $scope.labelClass = containerLabelClass;
+
+ $scope.tableConfig = {
+ data: 'deploymentConfigs',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ {
+ field: 'metadata.name',
+ displayName: 'Name',
+ cellTemplate: $templateCache.get("deploymentConfigLinkTemplate.html")
+ },
+ {
+ field: 'metadata.namespace',
+ displayName: 'Namespace'
+ },
+ {
+ field: '$imageChangeParams.automatic',
+ displayName: 'Automatic'
+ },
+ {
+ field: '$imageChangeParams.$containerNames',
+ displayName: 'Container Names'
+ },
+ {
+ field: '$imageChangeParams.from.name',
+ displayName: 'From image'
+ },
+ {
+ field: '$imageChangeParams.tag',
+ displayName: 'Tag'
+ },
+ {
+ field: 'template.controllerTemplate.podTemplate.tags',
+ displayName: 'Labels',
+ cellTemplate: $templateCache.get("deploymentConfigLabelTemplate.html")
+ }
+ ]
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.deletePrompt = (selected) => {
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: '$name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected, next) {
+ if (next) {
+ deleteEntity(next, () => {
+ deleteSelected(selected, selected.shift());
+ });
+ } else {
+ updateData();
+ }
+ }
+
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: 'Delete Deployment?',
+ action: 'The following Deployments will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+
+ function deleteEntity(selection, nextCallback) {
+ var name = (selection || {}).$name;
+ if (name) {
+ console.log("About to delete deployment config: " + name);
+ var url = deploymentConfigRestUrl(name);
+ $http.delete(url).
+ success(function (data, status, headers, config) {
+ nextCallback();
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to delete deployment config on " + url + " " + data + " " + status);
+ });
+ } else {
+ console.log("warning: no name for selection: " + angular.toJson(selection));
+ }
+ }
+
+ function updateData() {
+ var url = deploymentConfigsRestURL();
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ //console.log("got data " + angular.toJson(data, true));
+ $scope.deploymentConfigs = enrichDeploymentConfigs(data.items);
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ }
+
+ updateData();
+ }]);
+}
diff --git a/plugins/kubernetes/ts/events.ts b/plugins/kubernetes/ts/events.ts
index 716297f..8e1c9b0 100644
--- a/plugins/kubernetes/ts/events.ts
+++ b/plugins/kubernetes/ts/events.ts
@@ -1,64 +1,64 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var EventsController = controller("EventsController",
- ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesServices:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
-
- ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'list');
-
- $scope.tableConfig = {
- data: 'model.events',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- { field: '$firstTimestamp',
- displayName: 'First Seen',
- cellTemplate: $templateCache.get("firstTimestampTemplate.html")
- },
- { field: '$lastTimestamp',
- displayName: 'Last Seen',
- cellTemplate: $templateCache.get("lastTimestampTemplate.html")
- },
- { field: 'count',
- displayName: 'Count'
- },
- { field: 'involvedObject.name',
- displayName: 'Name',
- cellTemplate: $templateCache.get("eventNameTemplate.html")
- },
- { field: 'involvedObject.kind',
- displayName: 'Kind',
- cellTemplate: $templateCache.get("eventKindTemplate.html")
- },
- { field: 'involvedObject.fieldPath',
- displayName: 'Subject'
- },
- { field: 'reason',
- displayName: 'Reason'
- },
- { field: 'source',
- displayName: 'Source',
- cellTemplate: $templateCache.get("eventSourceTemplate.html")
- },
- { field: 'message',
- displayName: 'Message'
- }
- ]
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var EventsController = controller("EventsController",
+ ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesServices:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+
+ ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'list');
+
+ $scope.tableConfig = {
+ data: 'model.events',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ { field: '$firstTimestamp',
+ displayName: 'First Seen',
+ cellTemplate: $templateCache.get("firstTimestampTemplate.html")
+ },
+ { field: '$lastTimestamp',
+ displayName: 'Last Seen',
+ cellTemplate: $templateCache.get("lastTimestampTemplate.html")
+ },
+ { field: 'count',
+ displayName: 'Count'
+ },
+ { field: 'involvedObject.name',
+ displayName: 'Name',
+ cellTemplate: $templateCache.get("eventNameTemplate.html")
+ },
+ { field: 'involvedObject.kind',
+ displayName: 'Kind',
+ cellTemplate: $templateCache.get("eventKindTemplate.html")
+ },
+ { field: 'involvedObject.fieldPath',
+ displayName: 'Subject'
+ },
+ { field: 'reason',
+ displayName: 'Reason'
+ },
+ { field: 'source',
+ displayName: 'Source',
+ cellTemplate: $templateCache.get("eventSourceTemplate.html")
+ },
+ { field: 'message',
+ displayName: 'Message'
+ }
+ ]
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ }]);
+}
diff --git a/plugins/kubernetes/ts/host.ts b/plugins/kubernetes/ts/host.ts
index d671e44..2b792fd 100644
--- a/plugins/kubernetes/ts/host.ts
+++ b/plugins/kubernetes/ts/host.ts
@@ -1,61 +1,61 @@
-///
-///
-///
-///
-
-module Kubernetes {
-
- export var HostController = controller("HostController",
- ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.rawModel = null;
-
- $scope.itemConfig = {
- properties: {}
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- $scope.flipRaw = () => {
- $scope.rawMode = !$scope.rawMode;
- Core.$apply($scope);
- };
-
- updateData();
-
- function updateData() {
- $scope.id = $routeParams["id"];
- $scope.item = null;
- if ($scope.id) {
- var url = UrlHelpers.join(KubernetesApiURL, "nodes", $scope.id);
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.item = data;
- }
- if ($scope.item) {
- $scope.rawModel = toRawYaml($scope.item);
- }
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- } else {
- $scope.rawModel = null;
- Core.$apply($scope);
- }
- }
- }]);
-}
+///
+///
+///
+///
+
+module Kubernetes {
+
+ export var HostController = controller("HostController",
+ ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.rawModel = null;
+
+ $scope.itemConfig = {
+ properties: {}
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ $scope.flipRaw = () => {
+ $scope.rawMode = !$scope.rawMode;
+ Core.$apply($scope);
+ };
+
+ updateData();
+
+ function updateData() {
+ $scope.id = $routeParams["id"];
+ $scope.item = null;
+ if ($scope.id) {
+ var url = UrlHelpers.join(KubernetesApiURL, "nodes", $scope.id);
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.item = data;
+ }
+ if ($scope.item) {
+ $scope.rawModel = toRawYaml($scope.item);
+ }
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ } else {
+ $scope.rawModel = null;
+ Core.$apply($scope);
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/hosts.ts b/plugins/kubernetes/ts/hosts.ts
index dbc8aef..a120113 100644
--- a/plugins/kubernetes/ts/hosts.ts
+++ b/plugins/kubernetes/ts/hosts.ts
@@ -1,58 +1,58 @@
-///
-///
-///
-///
-
-module Kubernetes {
-
- export var HostsController = controller("HostsController", ["$scope", "KubernetesModel", "KubernetesPods", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesPods:ng.IPromise>, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.$on('kubernetesModelUpdated', function () {
- Core.$apply($scope);
- });
-
- $scope.tableConfig = {
- data: 'model.hosts',
- showSelectionCheckbox: false,
- enableRowClickSelection: false,
- multiSelect: false,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- {
- field: 'id',
- displayName: 'Name',
- defaultSort: true,
- cellTemplate: $templateCache.get("idTemplate.html")
- },
- {
- field: 'hostIP',
- displayName: 'IP',
- customSortField: (field) => {
- // use a custom sort to sort ip address
- return Kubernetes.sortByPodIp(field.hostIP);
- }
- },
- { field: '$podsLink',
- displayName: 'Pods',
- cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
- customSortField: (field) => {
- // need to concat all the pod counters
- var ready = field.$podCounters.ready || 0;
- var valid = field.$podCounters.valid || 0;
- var waiting = field.$podCounters.waiting || 0;
- var error = field.$podCounters.error || 0;
- return ready + valid + waiting + error;
- }
- }
- ]
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- }]);
-}
+///
+///
+///
+///
+
+module Kubernetes {
+
+ export var HostsController = controller("HostsController", ["$scope", "KubernetesModel", "KubernetesPods", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesPods:ng.IPromise>, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.$on('kubernetesModelUpdated', function () {
+ Core.$apply($scope);
+ });
+
+ $scope.tableConfig = {
+ data: 'model.hosts',
+ showSelectionCheckbox: false,
+ enableRowClickSelection: false,
+ multiSelect: false,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ {
+ field: 'id',
+ displayName: 'Name',
+ defaultSort: true,
+ cellTemplate: $templateCache.get("idTemplate.html")
+ },
+ {
+ field: 'hostIP',
+ displayName: 'IP',
+ customSortField: (field) => {
+ // use a custom sort to sort ip address
+ return Kubernetes.sortByPodIp(field.hostIP);
+ }
+ },
+ { field: '$podsLink',
+ displayName: 'Pods',
+ cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
+ customSortField: (field) => {
+ // need to concat all the pod counters
+ var ready = field.$podCounters.ready || 0;
+ var valid = field.$podCounters.valid || 0;
+ var waiting = field.$podCounters.waiting || 0;
+ var error = field.$podCounters.error || 0;
+ return ready + valid + waiting + error;
+ }
+ }
+ ]
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ }]);
+}
diff --git a/plugins/kubernetes/ts/imageRepositories.ts b/plugins/kubernetes/ts/imageRepositories.ts
index d4180d4..b56633e 100644
--- a/plugins/kubernetes/ts/imageRepositories.ts
+++ b/plugins/kubernetes/ts/imageRepositories.ts
@@ -1,122 +1,122 @@
-///
-///
-
-module Kubernetes {
-
- export var ImageRepositoriesController = controller("ImageRepositoriesController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.$on('kubernetesModelUpdated', function () {
- Core.$apply($scope);
- });
-
- $scope.tableConfig = {
- data: 'imageRepositories',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- {
- field: 'metadata.name',
- displayName: 'Name'
- },
- {
- field: 'metadata.namespace',
- displayName: 'Namespace'
- },
- {
- field: 'status.dockerImageRepository',
- displayName: 'Docker Registry'
- },
- {
- field: 'tags',
- displayName: 'Tags',
- cellTemplate: $templateCache.get('imageRegistryLabelTemplate.html')
- }
- ]
- };
-
- var labelColors = {
- 'prod': 'background-blue',
- 'valid': 'background-light-green',
- 'test': 'background-light-grey'
- };
- $scope.labelClass = (labelType:string) => {
- if (!(labelType in labelColors)) {
- return 'mouse-pointer';
- }
- else return labelColors[labelType] + ' mouse-pointer';
- }
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.deletePrompt = (selected) => {
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: '$name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected, next) {
- if (next) {
- deleteEntity(next, () => {
- deleteSelected(selected, selected.shift());
- });
- } else {
- updateData();
- }
- }
-
- deleteSelected(selected, selected.shift());
- }
- },
- title: 'Delete Image Repository?',
- action: 'The following Image Repositories will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
-
- function deleteEntity(selection, nextCallback) {
- var name = (selection || {}).$name;
- if (name) {
- console.log("About to delete image repository: " + name);
- var url = imageRepositoryRestUrl(name);
- $http.delete(url).
- success(function (data, status, headers, config) {
- nextCallback();
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to delete image repository on " + url + " " + data + " " + status);
- });
- } else {
- console.log("warning: no name for selection: " + angular.toJson(selection));
- }
- }
-
- function updateData() {
- var url = imageRepositoriesRestURL();
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- //console.log("got data " + angular.toJson(data, true));
- $scope.imageRepositories = enrichImageRepositories(data.items);
- $scope.fetched = true;
- Core.$apply($scope);
- }
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- }
-
- updateData();
- }]);
-}
+///
+///
+
+module Kubernetes {
+
+ export var ImageRepositoriesController = controller("ImageRepositoriesController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.$on('kubernetesModelUpdated', function () {
+ Core.$apply($scope);
+ });
+
+ $scope.tableConfig = {
+ data: 'imageRepositories',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ {
+ field: 'metadata.name',
+ displayName: 'Name'
+ },
+ {
+ field: 'metadata.namespace',
+ displayName: 'Namespace'
+ },
+ {
+ field: 'status.dockerImageRepository',
+ displayName: 'Docker Registry'
+ },
+ {
+ field: 'tags',
+ displayName: 'Tags',
+ cellTemplate: $templateCache.get('imageRegistryLabelTemplate.html')
+ }
+ ]
+ };
+
+ var labelColors = {
+ 'prod': 'background-blue',
+ 'valid': 'background-light-green',
+ 'test': 'background-light-grey'
+ };
+ $scope.labelClass = (labelType:string) => {
+ if (!(labelType in labelColors)) {
+ return 'mouse-pointer';
+ }
+ else return labelColors[labelType] + ' mouse-pointer';
+ }
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.deletePrompt = (selected) => {
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: '$name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected, next) {
+ if (next) {
+ deleteEntity(next, () => {
+ deleteSelected(selected, selected.shift());
+ });
+ } else {
+ updateData();
+ }
+ }
+
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: 'Delete Image Repository?',
+ action: 'The following Image Repositories will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+
+ function deleteEntity(selection, nextCallback) {
+ var name = (selection || {}).$name;
+ if (name) {
+ console.log("About to delete image repository: " + name);
+ var url = imageRepositoryRestUrl(name);
+ $http.delete(url).
+ success(function (data, status, headers, config) {
+ nextCallback();
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to delete image repository on " + url + " " + data + " " + status);
+ });
+ } else {
+ console.log("warning: no name for selection: " + angular.toJson(selection));
+ }
+ }
+
+ function updateData() {
+ var url = imageRepositoriesRestURL();
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ //console.log("got data " + angular.toJson(data, true));
+ $scope.imageRepositories = enrichImageRepositories(data.items);
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ }
+
+ updateData();
+ }]);
+}
diff --git a/plugins/kubernetes/ts/kubernetesHelpers.ts b/plugins/kubernetes/ts/kubernetesHelpers.ts
index 96383f1..72f63d9 100644
--- a/plugins/kubernetes/ts/kubernetesHelpers.ts
+++ b/plugins/kubernetes/ts/kubernetesHelpers.ts
@@ -1,1863 +1,1863 @@
-///
-///
-module Kubernetes {
-
- export var context = '/kubernetes';
- export var hash = '#' + context;
- export var defaultRoute = hash + '/apps';
- export var pluginName = 'Kubernetes';
- export var pluginPath = 'plugins/kubernetes/';
- export var templatePath = pluginPath + 'html/';
- export var log:Logging.Logger = Logger.get(pluginName);
-
- export var keepPollingModel = true;
-
- export var defaultIconUrl = Core.url("/img/kubernetes.svg");
- export var hostIconUrl = Core.url("/img/host.svg");
-
- // this gets set as a pre-bootstrap task
- export var osConfig:KubernetesConfig = undefined;
- export var masterUrl = "";
-
- export var defaultApiVersion = "v1";
- export var defaultOSApiVersion = "v1";
- export var labelFilterTextSeparator = ",";
-
- export var defaultNamespace = "default";
-
- export var appSuffix = ".app";
-
- // kubernetes service names
- export var kibanaServiceName = "kibana";
- export var fabric8ForgeServiceName = "fabric8-forge";
- export var gogsServiceName = "gogs";
- export var jenkinsServiceName = "jenkins";
- export var apimanServiceName = 'apiman';
- export var isOpenShift = true;
-
- export var sshSecretDataKeys = ["ssh-key", "ssh-key.pub"];
- export var httpsSecretDataKeys = ["username", "password"];
-
-
- export function kubernetesNamespacePath() {
- var ns = currentKubernetesNamespace();
- if (ns) {
- return "/namespaces/" + ns;
- } else {
- return "";
- }
- }
-
- export function apiPrefix() {
- var prefix = Core.pathGet(osConfig, ['api', 'k8s', 'prefix']);
- if (!prefix) {
- prefix = 'api';
- }
- return Core.trimLeading(prefix, '/');
- }
-
- export function osApiPrefix() {
- var prefix = Core.pathGet(osConfig, ['api', 'openshift', 'prefix']);
- if (!prefix) {
- prefix = 'oapi';
- }
- var answer = Core.trimLeading(prefix, '/');
- if (!isOpenShift) {
- return UrlHelpers.join(apiPrefix(), defaultOSApiVersion, "proxy", kubernetesNamespacePath(), "services/templates", answer);
- }
- return answer;
- }
-
- export function masterApiUrl() {
- return masterUrl || "";
- }
-
- /** WARNING - this excludes the host name - you probably want to use: kubernetesApiUrl() instead!! */
- export function kubernetesApiPrefix() {
- return UrlHelpers.join(apiPrefix(), defaultApiVersion);
- }
-
- export function openshiftApiPrefix() {
- return UrlHelpers.join(osApiPrefix(), defaultOSApiVersion);
- }
-
- export function prefixForType(type:string) {
- if (type === WatchTypes.NAMESPACES) {
- return kubernetesApiPrefix();
- }
- if (_.any(NamespacedTypes.k8sTypes, (t) => t === type)) {
- return kubernetesApiPrefix();
- }
- if (_.any(NamespacedTypes.osTypes, (t) => t === type)) {
- return openshiftApiPrefix();
- }
- // lets assume its an OpenShift extension type
- return openshiftApiPrefix();
- }
-
- export function kubernetesApiUrl() {
- return UrlHelpers.join(masterApiUrl(), kubernetesApiPrefix());
- }
-
- export function openshiftApiUrl() {
- return UrlHelpers.join(masterApiUrl(), openshiftApiPrefix());
- }
-
- export function resourcesUriForKind(type, ns = null) {
- if (!ns) {
- ns = currentKubernetesNamespace();
- }
- return UrlHelpers.join(masterApiUrl(), prefixForType(type), namespacePathForKind(type, ns));
- }
-
- export function uriTemplateForKubernetesKind(type) {
- var urlTemplate = '';
- switch (type) {
- case WatchTypes.NAMESPACES:
- case "Namespaces":
- urlTemplate = UrlHelpers.join('namespaces');
- break;
- case WatchTypes.OAUTH_CLIENTS:
- case "OAuthClients":
- case "OAuthClient":
- return UrlHelpers.join('oauthclients');
- case WatchTypes.PROJECTS:
- case "Projects":
- urlTemplate = UrlHelpers.join('projects');
- break;
- default:
- urlTemplate = UrlHelpers.join('namespaces/:namespace', type, ':id');
- }
- return urlTemplate;
- }
-
- export function namespacePathForKind(type, ns) {
- var urlTemplate = '';
- switch (type) {
- case WatchTypes.NAMESPACES:
- case "Namespaces":
- case "Namespace":
- return UrlHelpers.join('namespaces');
- case WatchTypes.NODES:
- case "Nodes":
- case "node":
- return UrlHelpers.join('nodes');
- case WatchTypes.PROJECTS:
- case "Projects":
- case "Project":
- return UrlHelpers.join('projects');
- case WatchTypes.OAUTH_CLIENTS:
- case "OAuthClients":
- case "OAuthClient":
- return UrlHelpers.join('oauthclients');
- case WatchTypes.PERSISTENT_VOLUMES:
- case "PersistentVolumes":
- case "PersistentVolume":
- return UrlHelpers.join('persistentvolumes');
- default:
- return UrlHelpers.join('namespaces', ns, type);
- }
- }
-
- /**
- * Returns thevalue from the injector if its available or null
- */
- export function inject(name):T {
- var injector = HawtioCore.injector;
- return injector ? injector.get(name) : null;
- }
-
- export function createResource(thing:string, urlTemplate:string, $resource: ng.resource.IResourceService, KubernetesModel) {
- var prefix = prefixForType(thing);
- if (!prefix) {
- log.debug("Invalid type given: ", thing);
- return null;
- }
-
- var params = {
- namespace: currentKubernetesNamespace
- }
- switch (thing) {
- case WatchTypes.NAMESPACES:
- case WatchTypes.OAUTH_CLIENTS:
- case WatchTypes.NODES:
- case WatchTypes.PROJECTS:
- case WatchTypes.OAUTH_CLIENTS:
- case WatchTypes.PERSISTENT_VOLUMES:
- params = {};
- }
-
- var url = UrlHelpers.join(masterApiUrl(), prefix, urlTemplate);
- log.debug("Url for ", thing, ": ", url);
- var resource = $resource(url, null, {
- query: { method: 'GET', isArray: false, params: params},
- create: { method: 'POST', params: params},
- save: { method: 'PUT', params: params},
- delete: { method: 'DELETE', params: _.extend({
- id: '@id'
- }, params)}
- });
- return resource;
- }
-
- export function imageRepositoriesRestURL() {
- return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/imagestreams");
- }
-
- export function deploymentConfigsRestURL() {
- return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/deploymentconfigs");
- }
-
- export function buildsRestURL() {
- return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/builds");
- }
-
- export function buildConfigHooksRestURL() {
- return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/buildconfighooks");
- }
-
- export function buildConfigsRestURL() {
- return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/buildconfigs");
- }
-
- export function routesRestURL() {
- return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/routes");
- }
-
- export function templatesRestURL() {
- return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/templates");
- }
-
- export function getNamespace(entity) {
- var answer = Core.pathGet(entity, ["metadata", "namespace"]);
- return answer ? answer : currentKubernetesNamespace();
- }
-
- export function getLabels(entity) {
- var answer = Core.pathGet(entity, ["metadata", "labels"]);
- return answer ? answer : {};
- }
-
- export function getName(entity) {
- if (angular.isString(entity)) {
- return entity;
- }
- return Core.pathGet(entity, ["metadata", "name"]) || Core.pathGet(entity, "name") || Core.pathGet(entity, "id");
- }
-
- export function getKind(entity) {
- return Core.pathGet(entity, ["metadata", "kind"]) || Core.pathGet(entity, "kind");
- }
-
- export function getSelector(entity) {
- return Core.pathGet(entity, ["spec", "selector"]);
- }
-
- export function getHost(pod) {
- return Core.pathGet(pod, ["spec", "host"]) || Core.pathGet(pod, ["spec", "nodeName"]) || Core.pathGet(pod, ["status", "hostIP"]);
- }
-
- export function getStatus(pod) {
- return Core.pathGet(pod, ["status", "phase"]);
- }
-
- export function getPorts(service) {
- return Core.pathGet(service, ["spec", "ports"]);
- }
-
- export function getCreationTimestamp(entity) {
- return Core.pathGet(entity, ["metadata", "creationTimestamp"]);
- };
-
- //var fabricDomain = Fabric.jmxDomain;
- var fabricDomain = "io.fabric8";
- export var mbean = fabricDomain + ":type=Kubernetes";
- export var managerMBean = fabricDomain + ":type=KubernetesManager";
- export var appViewMBean = fabricDomain + ":type=AppView";
-
- export function isKubernetes(workspace?) {
- // return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "Kubernetes"});
- return true;
- }
-
- export function isKubernetesTemplateManager(workspace?) {
- // return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "KubernetesTemplateManager"});
- return true;
- }
-
- export function isAppView(workspace?) {
- // return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "AppView"});
- return true;
- }
-
- export function getStrippedPathName():string {
- var pathName = Core.trimLeading((this.$location.path() || '/'), "#");
- pathName = pathName.replace(/^\//, '');
- return pathName;
- }
-
- export function linkContains(...words:String[]):boolean {
- var pathName = this.getStrippedPathName();
- return _.every(words, (word:string) => pathName.indexOf(word) !== 0);
- }
-
-
- /**
- * Returns true if the given link is active. The link can omit the leading # or / if necessary.
- * The query parameters of the URL are ignored in the comparison.
- * @method isLinkActive
- * @param {String} href
- * @return {Boolean} true if the given link is active
- */
- export function isLinkActive(href:string):boolean {
- // lets trim the leading slash
- var pathName = getStrippedPathName();
-
- var link = Core.trimLeading(href, "#");
- link = link.replace(/^\//, '');
- // strip any query arguments
- var idx = link.indexOf('?');
- if (idx >= 0) {
- link = link.substring(0, idx);
- }
- if (!pathName.length) {
- return link === pathName;
- } else {
- return _.startsWith(pathName, link);
- }
- }
-
- export function setJson($scope, id, collection) {
- $scope.id = id;
- if (!$scope.fetched) {
- return;
- }
- if (!id) {
- $scope.json = '';
- return;
- }
- if (!collection) {
- return;
- }
- var item = collection.find((item) => { return getName(item) === id; });
- if (item) {
- $scope.json = angular.toJson(item, true);
- $scope.item = item;
- } else {
- $scope.id = undefined;
- $scope.json = '';
- $scope.item = undefined;
- }
- }
-
- /**
- * Returns the labels text string using the key1=value1,key2=value2,....
format
- */
- export function labelsToString(labels, seperatorText = labelFilterTextSeparator) {
- var answer = "";
- angular.forEach(labels, (value, key) => {
- var separator = answer ? seperatorText : "";
-
- answer += separator + key + "=" + value;
- });
- return answer;
- }
-
-
- export function initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL) {
- $scope.baseUri = Core.trimTrailing(Core.url("/") || "", "/") || "";
-
- var injector = HawtioCore.injector;
-
- function hasService(name) {
- if (injector) {
- var ServiceRegistry = injector.get("ServiceRegistry");
- if (ServiceRegistry) {
- return ServiceRegistry.hasService(name);
- }
- }
- return false;
- }
-
- $scope.hasServiceKibana = () => hasService(kibanaServiceName);
- $scope.hasServiceGogs = () => hasService(gogsServiceName);
- $scope.hasServiceForge = () => hasService(fabric8ForgeServiceName);
- $scope.hasServiceApiman = () => hasService(apimanServiceName);
-
- $scope.viewTemplates = () => {
- var returnTo = $location.url();
- $location.path('/kubernetes/templates').search({'returnTo': returnTo});
- };
-
- $scope.namespace = $routeParams.namespace || $scope.namespace || KubernetesState.selectedNamespace || defaultNamespace;
- if ($scope.namespace != KubernetesState.selectedNamespace) {
- KubernetesState.selectedNamespace = $scope.namespace;
-
- // lets show page is going to reload
- if ($scope.model) {
- $scope.model.fetched = false;
- }
- }
- Kubernetes.setCurrentKubernetesNamespace($scope.namespace);
-
- $scope.forgeEnabled = isForgeEnabled();
-
- $scope.projectId = $routeParams["project"] || $scope.projectId || $scope.id;
- var showProjectNavBars = false;
- if ($scope.projectId && showProjectNavBars) {
- $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.projectId);
- $scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId, null, $scope);
- } else {
- $scope.breadcrumbConfig = Developer.createEnvironmentBreadcrumbs($scope, $location, $routeParams);
- $scope.subTabConfig = Developer.createEnvironmentSubNavBars($scope, $location, $routeParams);
- }
-
- if ($scope.projectId) {
- $scope.$projectLink = Developer.projectLink($scope.projectId);
- }
-
- $scope.link = (href) => {
- if (!href) {
- return href;
- }
- if ($scope.$projectLink) {
- return Developer.namespaceLink($scope, $routeParams, href.replace(/^\/kubernetes/, ''));
- } else {
- return href;
- }
- }
-
- $scope.codeMirrorOptions = {
- lineWrapping : true,
- lineNumbers: true,
- readOnly: 'nocursor',
- mode: {name: "javascript", json: true}
- };
-
- $scope.resizeDialog = {
- controller: null,
- newReplicas: 0,
- dialog: new UI.Dialog(),
- onOk: () => {
- var resizeDialog = $scope.resizeDialog;
- resizeDialog.dialog.close();
- resizeController($http, KubernetesApiURL, resizeDialog.controller, resizeDialog.newReplicas, () => { log.debug("updated number of replicas"); })
- },
- open: (controller) => {
- var resizeDialog = $scope.resizeDialog;
- resizeDialog.controller = controller;
- resizeDialog.newReplicas = Core.pathGet(controller, ["status", "replicas"]);
- resizeDialog.dialog.open();
-
- $timeout(() => {
- $('#replicas').focus();
- }, 50);
- },
- close: () => {
- $scope.resizeDialog.dialog.close();
- }
- };
-
- $scope.triggerBuild = (buildConfig) => {
- var url = buildConfig.$triggerUrl;
- console.log("triggering build at url: " + url);
- if (url) {
- //var data = {};
- var data = null;
- var config = {
- headers: {
- 'Content-Type': "application/json"
- }
- };
- var name = Core.pathGet(buildConfig, ["metadata", "name"]);
- Core.notification('info', "Triggering build " + name);
- $http.post(url, data, config).
- success(function (data, status, headers, config) {
- console.log("trigger worked! got data " + angular.toJson(data, true));
- // TODO should we show some link to the build
- Core.notification('info', "Building " + name);
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- Core.notification('error', "Failed to trigger build for " + name + ". Returned code: " + status + " " + data);
- });
- };
- }
-
- // update the URL if the filter is changed
- $scope.$watch("tableConfig.filterOptions.filterText", (text) => {
- //var filterText = Kubernetes.findValeOfLabels(text);
- $location.search("q", text);
- });
-
- $scope.$on("labelFilterUpdate", ($event, text) => {
- var filterOptions = ($scope.tableConfig || {}).filterOptions || {};
- var currentFilter = filterOptions.filterText;
- if (Core.isBlank(currentFilter)) {
- filterOptions.filterText = text;
- }else{
- var expressions = currentFilter.split(/\s+/);
- if (expressions.indexOf(text) !== -1) {
- // lets exclude this filter expression
- expressions = expressions.remove(text);
- filterOptions.filterText = expressions.join(" ");
- } else {
- filterOptions.filterText = currentFilter + " " + text;
- }
- }
- $scope.id = undefined;
- });
-
- }
-
- /**
- * Returns the number of pods that are ready
- */
- export function readyPodCount(service) {
- var count = 0;
- angular.forEach((service || {}).$pods, (pod)=> {
- if (pod.$ready) {
- count++;
- }
- });
- return count;
- }
-
- /**
- * Returns the service link URL for either the service name or the service object
- */
- export function serviceLinkUrl(service, httpOnly = false) {
- if (angular.isObject(service)) {
- var portalIP = service.$host;
- // lets assume no custom port for now for external routes
- var port = null;
- var protocol = "http://";
- var spec = service.spec;
- if (spec) {
- if (!portalIP) {
- portalIP = spec.portalIP;
- }
- var hasHttps = false;
- var hasHttp = false;
- angular.forEach(spec.ports, (portSpec) => {
- var p = portSpec.port;
- if (p) {
- if (p === 443) {
- hasHttps = true;
- } else if (p === 80) {
- hasHttp = true;
- }
- if (!port) {
- port = p;
- }
- }
- });
- if (!hasHttps && !hasHttp && port) {
- // lets treat 8080 as http which is a common service to export
- if (port === 8080) {
- hasHttp = true;
- } else if (port === 8443) {
- hasHttps = true;
- }
- }
- }
- if (portalIP) {
- if (hasHttps) {
- return "https://" + portalIP;
- } else if (hasHttp) {
- return "http://" + portalIP;
- } else if (!httpOnly) {
- if (port) {
- return protocol + portalIP + ":" + port + "/";
- } else {
- return protocol + portalIP;
- }
- }
- }
- } else if (service) {
- var serviceId = service.toString();
- if (serviceId) {
- var ServiceRegistry = getServiceRegistry();
- if (ServiceRegistry) {
- return ServiceRegistry.serviceLink(serviceId) || "";
- }
- }
- }
- return "";
- }
-
-
- /**
- * Returns the total number of counters for the podCounters object
- */
- export function podCounterTotal($podCounters) {
- var answer = 0;
- if ($podCounters) {
- angular.forEach(["ready", "valid", "waiting", "error"], (name) => {
- var value = $podCounters[name] || 0;
- answer += value;
- });
- }
- return answer;
- }
-
- /**
- * Given the list of pods lets iterate through them and find all pods matching the selector
- * and return counters based on the status of the pod
- */
- export function createPodCounters(selector, pods, outputPods = [], podLinkQuery = null, podLinkUrl = null) {
- if (!podLinkUrl) {
- podLinkUrl = "/kubernetes/pods";
- }
- var filterFn;
- if (angular.isFunction(selector)) {
- filterFn = selector;
- } else {
- filterFn = (pod) => selectorMatches(selector, getLabels(pod));
- }
- var answer = {
- podsLink: "",
- ready: 0,
- valid: 0,
- waiting: 0,
- error: 0
- };
- if (selector) {
- if (!podLinkQuery) {
- podLinkQuery = Kubernetes.labelsToString(selector, " ");
- }
- answer.podsLink = podLinkUrl + "?q=" + encodeURIComponent(podLinkQuery);
- angular.forEach(pods, pod => {
- if (filterFn(pod)) {
- outputPods.push(pod);
- var status = getStatus(pod);
- if (status) {
- var lower = status.toLowerCase();
- if (lower.startsWith("run")) {
- if (isReady(pod)) {
- answer.ready += 1;
- } else {
- answer.valid += 1;
- }
- } else if (lower.startsWith("wait") || lower.startsWith("pend")) {
- answer.waiting += 1;
- } else if (lower.startsWith("term") || lower.startsWith("error") || lower.startsWith("fail")) {
- answer.error += 1;
- }
- } else {
- answer.error += 1;
- }
- }
- });
- }
- return answer;
- }
-
- /**
- * Converts the given json into an array of items. If the json contains a nested set of items then that is sorted; so that services
- * are processed first; then turned into an array. Otherwise the json is put into an array so it can be processed polymorphically
- */
- export function convertKubernetesJsonToItems(json) {
- var items = json.items;
- if (angular.isArray(items)) {
- // TODO we could check for List or Config types here and warn if not
-
- // sort the services first
- var answer = [];
- items.forEach((item) => {
- if (item.kind === "Service") {
- answer.push(item);
- }
- });
- items.forEach((item) => {
- if (item.kind !== "Service") {
- answer.push(item);
- }
- });
- return answer;
- } else {
- return [json];
- }
- }
-
- export function isV1beta1Or2() {
- return defaultApiVersion === "v1beta1" || defaultApiVersion === "v1beta2";
- }
-
- /**
- * Returns a link to the detail page for the given entity
- */
- export function entityPageLink(obj) {
- if (obj) {
- function getLink(entity) {
- var viewLink = entity["$viewLink"];
- if (viewLink) {
- return viewLink;
- }
- var id = getName(entity);
- var kind = getKind(entity);
- if (kind && id) {
- var path = kind.substring(0, 1).toLowerCase() + kind.substring(1) + "s";
- var namespace = getNamespace(entity);
- if (namespace && !isIgnoreNamespaceKind(kind)) {
- return Core.url(UrlHelpers.join('/kubernetes/namespace', namespace, path, id));
- } else {
- return Core.url(UrlHelpers.join('/kubernetes', path, id));
- }
- }
- }
- var baseLink = getLink(obj);
- if (!HawtioCore.injector || !baseLink) {
- return baseLink;
- }
- var $routeParams = HawtioCore.injector.get('$routeParams');
- var projectId = $routeParams['project'] || $routeParams['project'];
- if (!projectId) {
- return baseLink;
- }
- return UrlHelpers.join(Developer.projectLink(projectId), baseLink.replace(/^\/kubernetes\//, ''));
- }
- return null;
- }
-
-
- export function resourceKindToUriPath(kind) {
- var kindPath = kind.toLowerCase() + "s";
- if (kindPath === "replicationControllers" && !isV1beta1Or2()) {
- kindPath = "replicationcontrollers";
- }
- return kindPath;
- }
-
- function isIgnoreNamespaceKind(kind) {
- return kind === "Host" || kind === "Minion";
- }
-
- /**
- * Returns the root URL for the kind
- */
- export function kubernetesUrlForKind(KubernetesApiURL, kind, namespace = null, path = null) {
- var pathSegment = "";
- if (path) {
- pathSegment = "/" + Core.trimLeading(path, "/");
- }
- var kindPath = resourceKindToUriPath(kind);
- var ignoreNamespace = isIgnoreNamespaceKind(kind);
- if (isV1beta1Or2() || ignoreNamespace) {
- var postfix = "";
- if (namespace && !ignoreNamespace) {
- postfix = "?namespace=" + namespace;
- }
- return UrlHelpers.join(KubernetesApiURL, kindPath, pathSegment, postfix);
- } else {
- return UrlHelpers.join(KubernetesApiURL, "/namespaces/", namespace , kindPath, pathSegment);
- }
- };
-
- /**
- * Returns the base URL for the kind of kubernetes resource or null if it cannot be found
- */
- export function kubernetesUrlForItemKind(KubernetesApiURL, json) {
- var kind = json.kind;
- if (kind) {
- return kubernetesUrlForKind(KubernetesApiURL, kind, json.namespace);
- } else {
- log.warn("Ignoring missing kind " + kind + " for kubernetes json: " + angular.toJson(json));
- return null;
- }
- }
-
- export function kubernetesProxyUrlForService(KubernetesApiURL, service, path = null) {
- var pathSegment = "";
- if (path) {
- pathSegment = "/" + Core.trimLeading(path, "/");
- } else {
- pathSegment = "/";
- }
- var namespace = getNamespace(service);
- if (isV1beta1Or2()) {
- var postfix = "?namespace=" + namespace;
- return UrlHelpers.join(KubernetesApiURL, "/proxy", kubernetesNamespacePath(), "/services/" + getName(service) + pathSegment + postfix);
- } else {
- return UrlHelpers.join(KubernetesApiURL, "/proxy/namespaces/", namespace, "/services/" + getName(service) + pathSegment);
- }
- }
-
-
- export function kubernetesProxyUrlForServiceCurrentNamespace(service, path = null) {
- var apiPrefix = UrlHelpers.join(kubernetesApiUrl());
- return kubernetesProxyUrlForService(apiPrefix, service, path);
-
- }
- export function buildConfigRestUrl(id) {
- return UrlHelpers.join(buildConfigsRestURL(), id);
- }
-
- export function deploymentConfigRestUrl(id) {
- return UrlHelpers.join(deploymentConfigsRestURL(), id);
- }
-
- export function imageRepositoryRestUrl(id) {
- return UrlHelpers.join(imageRepositoriesRestURL(), id);
- }
-
- export function buildRestUrl(id) {
- return UrlHelpers.join(buildsRestURL(), id);
- }
-
- export function buildLogsRestUrl(id) {
- return UrlHelpers.join(buildsRestURL(), id, "log");
- }
-
- /**
- * Runs the given application JSON
- */
- export function runApp($location, $scope, $http, KubernetesApiURL, json, name = "App", onSuccessFn = null, namespace = null, onCompleteFn = null) {
- if (json) {
- if (angular.isString(json)) {
- json = angular.fromJson(json);
- }
- name = name || "App";
- var postfix = namespace ? " in namespace " + namespace : "";
- Core.notification('info', "Running " + name + postfix);
-
- var items = convertKubernetesJsonToItems(json);
- angular.forEach(items, (item) => {
- var url = kubernetesUrlForItemKind(KubernetesApiURL, item);
- if (url) {
- $http.post(url, item).
- success(function (data, status, headers, config) {
- log.debug("Got status: " + status + " on url: " + url + " data: " + data + " after posting: " + angular.toJson(item));
- if (angular.isFunction(onCompleteFn)) {
- onCompleteFn();
- }
- Core.$apply($scope);
- }).
- error(function (data, status, headers, config) {
- var message = null;
- if (angular.isObject(data)) {
- message = data.message;
- var reason = data.reason;
- if (reason === "AlreadyExists") {
- // lets ignore duplicates
- log.debug("entity already exists at " + url);
- return;
- }
- }
- if (!message) {
- message = "Failed to POST to " + url + " got status: " + status;
- }
- log.warn("Failed to save " + url + " status: " + status + " response: " + angular.toJson(data, true));
- Core.notification('error', message);
- });
- }
- });
- }
- }
-
-
- /**
- * Returns true if the current status of the pod is running
- */
- export function isRunning(podCurrentState) {
- var status = (podCurrentState || {}).phase;
- if (status) {
- var lower = status.toLowerCase();
- return lower.startsWith("run");
- } else {
- return false;
- }
- }
-
- /**
- * Returns true if the labels object has all of the key/value pairs from the selector
- */
- export function selectorMatches(selector, labels) {
- if (angular.isObject(labels)) {
- var answer = true;
- var count = 0;
- angular.forEach(selector, (value, key) => {
- count++;
- if (answer && labels[key] !== value) {
- answer = false;
- }
- });
- return answer && count > 0;
- } else {
- return false;
- }
- }
-
- /**
- * Returns the service registry
- */
- export function getServiceRegistry() {
- var injector = HawtioCore.injector;
- return injector ? injector.get("ServiceRegistry") : null;
- }
-
-
- /**
- * Returns a link to the kibana logs web application
- */
- export function kibanaLogsLink(ServiceRegistry) {
- var link = ServiceRegistry.serviceLink(kibanaServiceName);
- if (link) {
- if (!link.endsWith("/")) {
- link += "/";
- }
- return link + "#/dashboard/Fabric8";
- } else {
- return null;
- }
- }
-
- export function openLogsForPods(ServiceRegistry, $window, namespace, pods) {
- var link = kibanaLogsLink(ServiceRegistry);
- if (link) {
- var query = "";
- var count = 0;
- angular.forEach(pods, (item) => {
- var id = getName(item);
- if (id) {
- var space = query ? " OR " : "";
- count++;
- query += space + '"' + id + '"';
- }
- });
- if (query) {
- if (count > 1) {
- query = "(" + query + ")";
- }
- query = 'kubernetes.namespace_name:"' + namespace + '" AND kubernetes.pod_name:' + query;
- link += "?_a=(query:(query_string:(query:'" + query + "')))";
- var newWindow = $window.open(link, "viewLogs");
- }
- }
- }
-
- export function resizeController($http, KubernetesApiURL, replicationController, newReplicas, onCompleteFn = null) {
- var id = getName(replicationController);
- var namespace = getNamespace(replicationController) || "";
- var url = kubernetesUrlForKind(KubernetesApiURL, "ReplicationController", namespace, id);
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- var desiredState = data.spec;
- if (!desiredState) {
- desiredState = {};
- data.spec = desiredState;
- }
- desiredState.replicas = newReplicas;
- $http.put(url, data).
- success(function (data, status, headers, config) {
- log.debug("updated controller " + url);
- if (angular.isFunction(onCompleteFn)) {
- onCompleteFn();
- }
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to save " + url + " " + data + " " + status);
- });
- }
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- });
- }
-
- export function statusTextToCssClass(text, ready = false) {
- if (text) {
- var lower = text.toLowerCase();
- if (lower.startsWith("run") || lower.startsWith("ok")) {
- if (!ready) {
- return "fa fa-spinner fa-spin green";
- }
- return 'fa fa-play-circle green';
- } else if (lower.startsWith("wait") || lower.startsWith("pend")) {
- return 'fa fa-download';
- } else if (lower.startsWith("term") || lower.startsWith("error") || lower.startsWith("fail")) {
- return 'fa fa-off orange';
- } else if (lower.startsWith("succeeded")) {
- return 'fa fa-check-circle-o green';
- }
- }
- return 'fa fa-question red';
- }
-
- export function podStatus(pod) {
- return getStatus(pod);
- }
-
- export function isReady(pod) {
- var status = pod.status || {};
- var answer = false;
- angular.forEach(status.conditions, (condition) => {
- var t = condition.type;
- if (t && t === "Ready") {
- var status = condition.status;
- if (status === "True") {
- answer = true;
- }
- }
- });
- return answer;
- }
-
- export function createAppViewPodCounters(appView) {
- var array = [];
- var map = {};
- var pods = appView.pods;
- var lowestDate = null;
- angular.forEach(pods, pod => {
- var selector = getLabels(pod);
- var selectorText = Kubernetes.labelsToString(selector, " ");
- var answer = map[selector];
- if (!answer) {
- answer = {
- labelText: selectorText,
- podsLink: UrlHelpers.join("/kubernetes/namespace/", pod.metadata.namespace, "pods?q=" + encodeURIComponent(selectorText)),
- valid: 0,
- waiting: 0,
- error: 0
- };
- map[selector] = answer;
- array.push(answer);
- }
- var status = (podStatus(pod) || "Error").toLowerCase();
- if (status.startsWith("run") || status.startsWith("ok")) {
- answer.valid += 1;
- } else if (status.startsWith("wait") || status.startsWith("pwnd")) {
- answer.waiting += 1;
- } else {
- answer.error += 1;
- }
- var creationTimestamp = getCreationTimestamp(pod);
- if (creationTimestamp) {
- var d = new Date(creationTimestamp);
- if (!lowestDate || d < lowestDate) {
- lowestDate = d;
- }
- }
- });
- appView.$creationDate = lowestDate;
- return array;
- }
-
- export function createAppViewServiceViews(appView) {
- var array = [];
- var pods = appView.pods;
- angular.forEach(pods, pod => {
- var id = getName(pod);
- if (id) {
- var abbrev = id;
- var idx = id.indexOf("-");
- if (idx > 1) {
- abbrev = id.substring(0, idx);
- }
- pod.idAbbrev = abbrev;
- }
- pod.statusClass = statusTextToCssClass(podStatus(pod), isReady(pod));
- });
-
- var services = appView.services || [];
- var replicationControllers = appView.replicationControllers || [];
- var size = Math.max(services.length, replicationControllers.length, 1);
- var appName = appView.$info.name;
- for (var i = 0; i < size; i++) {
- var service = services[i];
- var replicationController = replicationControllers[i];
- var controllerId = getName(replicationController);
- var name = getName(service) || controllerId;
- var address = Core.pathGet(service, ["spec", "portalIP"]);
- if (!name && pods.length) {
- name = pods[0].idAbbrev;
- }
- if (!appView.$info.name) {
- appView.$info.name = name;
- }
- if (!appView.id && pods.length) {
- appView.id = getName(pods[0]);
- }
- if (i > 0) {
- appName = name;
- }
- var podCount = pods.length;
- var podCountText = podCount + " pod" + (podCount > 1 ? "s" : "");
- var view = {
- appName: appName || name,
- name: name,
- createdDate: appView.$creationDate,
- podCount: podCount,
- podCountText: podCountText,
- address: address,
- controllerId: controllerId,
- service: service,
- replicationController: replicationController,
- pods: pods
- };
- array.push(view);
- }
- return array;
- }
-
- /**
- * converts a git path into an accessible URL for the browser
- */
- export function gitPathToUrl(iconPath, branch = "master") {
- return (HawtioCore.injector.get('AppLibraryURL') || '') + "/git/" + branch + iconPath;
- }
-
- function asDate(value) {
- return value ? new Date(value) : null;
- }
-
- export function enrichBuildConfig(buildConfig, sortedBuilds) {
- if (buildConfig) {
- var triggerUrl:string = null;
- var metadata = buildConfig.metadata || {};
- var name = metadata.name;
- buildConfig.$name = name;
- var projectLink = Developer.projectLink(name);
- var ns = metadata.namespace || currentKubernetesNamespace();
- buildConfig.$namespace = ns;
- buildConfig.environments = [];
- buildConfig.$creationDate = asDate(Kubernetes.getCreationTimestamp(buildConfig));
- buildConfig.$labelsText = Kubernetes.labelsToString(getLabels(buildConfig));
-
- if (name) {
- buildConfig.$viewLink = UrlHelpers.join("workspaces", ns, "projects", name, "environments");
- buildConfig.$editLink = UrlHelpers.join("workspaces", ns, "projects", name, "buildConfigEdit");
-
- angular.forEach([false, true], (flag) => {
- angular.forEach(buildConfig.triggers, (trigger) => {
- if (!triggerUrl) {
- var type = trigger.type;
- if (type === "generic" || flag) {
- var generic = trigger[type];
- if (type && generic) {
- var secret = generic.secret;
- if (secret) {
- triggerUrl = UrlHelpers.join(buildConfigHooksRestURL(), name, secret, type);
- buildConfig.$triggerUrl = triggerUrl;
- }
- }
- }
- }
- });
- });
-
- // lets find the latest build...
- if (sortedBuilds) {
- buildConfig.$lastBuild = _.find(sortedBuilds, {
- metadata: {
- labels: {
- buildconfig: name
- }
- }
- });
- }
- }
- var $fabric8Views = {};
-
- function defaultPropertiesIfNotExist(name, object, autoCreate = false) {
- var view = $fabric8Views[name];
- if (autoCreate && !view) {
- view = {}
- $fabric8Views[name] = view;
- }
- if (view) {
- angular.forEach(object, (value, property) => {
- var current = view[property];
- if (!current) {
- view[property] = value;
- }
- });
- }
- }
-
- function defaultPropertiesIfNotExistStartsWith(prefix, object, autoCreate = false) {
- angular.forEach($fabric8Views, (view, name) => {
- if (view && name.startsWith(prefix)) {
- angular.forEach(object, (value, property) => {
- var current = view[property];
- if (!current) {
- view[property] = value;
- }
- });
- }
- });
- }
-
- var labels = metadata.labels || {};
- var annotations = metadata.annotations || {};
-
- // lets default the repo and user
- buildConfig.$user = annotations["fabric8.jenkins/user"] || labels["user"];
- buildConfig.$repo = annotations["fabric8.jenkins/repo"] || labels["repo"];
-
- angular.forEach(annotations, (value, key) => {
- var parts = key.split('/', 2);
- if (parts.length > 1) {
- var linkId = parts[0];
- var property = parts[1];
- if (linkId && property && linkId.startsWith("fabric8.link")) {
- var link = $fabric8Views[linkId];
- if (!link) {
- link = {
- class: linkId
- };
- $fabric8Views[linkId] = link;
- }
- link[property] = value;
- }
- }
- });
-
- if (buildConfig.$user && buildConfig.$repo) {
- // browse gogs repo view
- var gogsUrl = serviceLinkUrl(gogsServiceName);
- if (gogsUrl) {
- defaultPropertiesIfNotExist("fabric8.link.browseGogs.view", {
- label: "Browse...",
- url: UrlHelpers.join(gogsUrl, buildConfig.$user, buildConfig.$repo),
- description: "Browse the source code of this repository",
- iconClass: "fa fa-external-link"
- }, true);
- }
-
- // run forge commands view
- defaultPropertiesIfNotExist("fabric8.link.forgeCommand.view", {
- label: "Command...",
- url: UrlHelpers.join(projectLink, "/forge/commands/user", buildConfig.$user, buildConfig.$repo),
- description: "Perform an action on this project",
- iconClass: "fa fa-play-circle"
- }, true);
-
-
- // configure devops view
- defaultPropertiesIfNotExist("fabric8.link.forgeCommand.devops.settings", {
- label: "Settings",
- url: UrlHelpers.join(projectLink, "/forge/command/devops-edit/user", buildConfig.$user, buildConfig.$repo),
- description: "Configure the DevOps settings for this project",
- iconClass: "fa fa-pencil-square-o"
- }, true);
-
- }
-
- // add some icons and descriptions
- defaultPropertiesIfNotExist("fabric8.link.repository.browse", {
- label: "Browse...",
- description: "Browse the source code of this repository",
- iconClass: "fa fa-external-link"
- });
- defaultPropertiesIfNotExist("fabric8.link.jenkins.job", {
- iconClass: "fa fa-tasks",
- description: "View the Jenkins Job for this build"
- });
- defaultPropertiesIfNotExist("fabric8.link.jenkins.monitor", {
- iconClass: "fa fa-tachometer",
- description: "View the Jenkins Monitor dashboard for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.jenkins.pipeline", {
- iconClass: "fa fa-arrow-circle-o-right",
- description: "View the Jenkins Pipeline for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.letschat.room", {
- iconClass: "fa fa-comment",
- description: "Chat room for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.letschat.room", {
- iconClass: "fa fa-comment",
- description: "Chat room for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.taiga", {
- iconClass: "fa fa-check-square-o",
- description: "Issue tracker for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.issues", {
- iconClass: "fa fa-check-square-o",
- description: "Issues for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.releases", {
- iconClass: "fa fa-tag",
- description: "Issues for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.taiga.team", {
- iconClass: "fa fa-users",
- description: "Team members for this project"
- });
- defaultPropertiesIfNotExist("fabric8.link.team", {
- iconClass: "fa fa-users",
- description: "Team members for this project"
- });
- defaultPropertiesIfNotExistStartsWith("fabric8.link.environment.", {
- iconClass: "fa fa-cloud",
- description: "The kubernetes namespace for this environment"
- });
-
-
- // lets put the views into sections...
- var $fabric8CodeViews = {};
- var $fabric8BuildViews = {};
- var $fabric8TeamViews = {};
- var $fabric8EnvironmentViews = {};
- angular.forEach($fabric8Views, (value, key) => {
- var view;
- if (key.indexOf("taiga") > 0 || key.indexOf(".issue") > 0 || key.indexOf("letschat") > 0|| key.indexOf(".team") > 0) {
- view = $fabric8TeamViews;
- } else if (key.indexOf("jenkins") > 0) {
- view = $fabric8BuildViews;
- } else if (key.indexOf(".environment.") > 0) {
- view = $fabric8EnvironmentViews;
- } else {
- view = $fabric8CodeViews;
- }
- view[key] = value;
- });
-
-
- buildConfig.$fabric8Views = $fabric8Views;
- buildConfig.$fabric8CodeViews = $fabric8CodeViews;
- buildConfig.$fabric8BuildViews = $fabric8BuildViews;
- buildConfig.$fabric8EnvironmentViews = $fabric8EnvironmentViews;
- buildConfig.$fabric8TeamViews = $fabric8TeamViews;
-
- var $jenkinsJob = annotations["fabric8.io/jenkins-job"];
- if (!$jenkinsJob && $fabric8Views["fabric8.link.jenkins.job"]) {
- $jenkinsJob = name;
- }
- buildConfig.$jenkinsJob = $jenkinsJob;
-
- angular.forEach($fabric8EnvironmentViews, (env) => {
- var c = env.class;
- var prefix = "fabric8.link.environment.";
- if (c && c.startsWith(prefix)) {
- var ens = c.substring(prefix.length);
- env.namespace = ens;
- env.url = UrlHelpers.join("/workspaces", ns, "projects", name, "namespace", ens);
- }
- buildConfig.environments.push(env);
- });
- if (!buildConfig.environments.length) {
- // lets create a single environment
- var ens = ns;
- var env = {
- namespace: ens,
- label: "Current",
- description: "The environemnt that this project is built and run inside",
- iconClass: "fa fa-cloud",
- url: UrlHelpers.join("/workspaces", ns, "projects", name, "namespace", ens)
- };
- buildConfig.environments.push(env);
-
- }
-
- buildConfig.environments = buildConfig.environments.reverse();
-
- buildConfig.tools = [];
- angular.forEach($fabric8CodeViews, (env) => {
- buildConfig.tools.push(env);
- });
- angular.forEach($fabric8TeamViews, (env) => {
- buildConfig.tools.push(env);
- });
-
- }
- }
-
- export function enrichBuildConfigs(buildConfigs, sortedBuilds = null) {
- angular.forEach(buildConfigs, (buildConfig) => {
- enrichBuildConfig(buildConfig, sortedBuilds);
- });
- return buildConfigs;
- }
-
- export function enrichBuilds(builds) {
- angular.forEach(builds, (build) => {
- enrichBuild(build);
- });
- return _.sortBy(builds, "$creationDate").reverse();
- }
-
- export function enrichBuild(build) {
- if (build) {
- var metadata = build.metadata || {};
- var annotations = metadata.annotations || {};
- var name = getName(build);
- var namespace = getNamespace(build);
- build.$name = name;
- build.$namespace = namespace;
-
- var nameArray = name.split("-");
- var nameArrayLength = nameArray.length;
- build.$shortName = (nameArrayLength > 4) ? nameArray.slice(0, nameArrayLength - 4).join("-") : name.substring(0, 30);
-
- var labels = getLabels(build);
- var configId = labels.buildconfig;
- build.$configId = configId;
- if (configId) {
- //build.$configLink = UrlHelpers.join("kubernetes/buildConfigs", configId);
- build.$configLink = UrlHelpers.join("workspaces", currentKubernetesNamespace(), "projects", configId);
- }
- var creationTimestamp = getCreationTimestamp(build);
- if (creationTimestamp) {
- var d = new Date(creationTimestamp);
- build.$creationDate = d;
- }
- if (name) {
- //build.$viewLink = UrlHelpers.join("kubernetes/builds", name);
- var projectLink = UrlHelpers.join("workspaces", currentKubernetesNamespace(), "projects", configId);
- build.$viewLink = UrlHelpers.join(projectLink, "builds", name);
- //build.$logsLink = UrlHelpers.join("kubernetes/buildLogs", name);
- build.$logsLink = UrlHelpers.join(projectLink, "buildLogs", name);
- }
- build.podName = build.podName || annotations["openshift.io/build.pod-name"];
- var podName = build.podName;
- if (podName && namespace) {
- var podNameArray = podName.split("-");
- var podNameArrayLength = podNameArray.length;
- build.$podShortName = (podNameArrayLength > 5) ? podNameArray[podNameArrayLength - 5] : podName.substring(0, 30);
- build.$podLink = UrlHelpers.join("kubernetes/namespace", namespace, "pods", podName);
- }
- }
- return build;
- }
-
-
- export function enrichDeploymentConfig(deploymentConfig) {
- if (deploymentConfig) {
- var triggerUrl:string = null;
- var name = Core.pathGet(deploymentConfig, ["metadata", "name"]);
- deploymentConfig.$name = name;
- var found = false;
- angular.forEach(deploymentConfig.triggers, (trigger) => {
- var type = trigger.type;
- if (!deploymentConfig.$imageChangeParams && type === "ImageChange") {
- var imageChangeParams = trigger.imageChangeParams;
- if (imageChangeParams) {
- var containerNames = imageChangeParams.containerNames || [];
- imageChangeParams.$containerNames = containerNames.join(" ");
- deploymentConfig.$imageChangeParams = imageChangeParams;
- }
- }
- });
- }
- }
-
- export function enrichDeploymentConfigs(deploymentConfigs) {
- angular.forEach(deploymentConfigs, (deploymentConfig) => {
- enrichDeploymentConfig(deploymentConfig);
- });
- return deploymentConfigs;
- }
-
-
- export function enrichEvent(event) {
- if (event) {
- var metadata = event.metadata || {};
-
- var firstTimestamp = event.firstTimestamp;
- if (firstTimestamp) {
- var d = new Date(firstTimestamp);
- event.$firstTimestamp = d;
- }
- var lastTimestamp = event.lastTimestamp;
- if (lastTimestamp) {
- var d = new Date(lastTimestamp);
- event.$lastTimestamp = d;
- }
- var labels = angular.copy(event.source || {});
- var involvedObject = event.involvedObject || {};
- var name = involvedObject.name;
- var kind = involvedObject.kind;
- if (name) {
- labels['name'] = name;
- }
- if (kind) {
- labels['kind'] = kind;
- }
- event.$labelsText = Kubernetes.labelsToString(labels);
-
- }
- }
-
- export function enrichEvents(events, model = null) {
- angular.forEach(events, (event) => {
- enrichEvent(event);
- });
-
- // lets update links to the events for each pod and RC
- if (model) {
- function clearEvents(entity) {
- entity.$events = [];
- entity.$eventsLink = null;
- entity.$eventCount = 0;
- }
-
- function updateEvent(entity, event) {
- if (entity) {
- entity.$events.push(event);
- if (!entity.$eventsLink) {
- entity.$eventsLink = UrlHelpers.join("/kubernetes/namespace/", currentKubernetesNamespace(), "events") + "?q=kind%3D" + entity.kind + "%20name%3D" + entity.metadata.name;
- }
- entity.$eventCount = entity.$events.length;
- }
- }
-
- var pods = model.pods || [];
- var rcs = model.replicationControllers || [];
- angular.forEach(pods, clearEvents);
- angular.forEach(rcs, clearEvents);
-
- angular.forEach(events, (event) => {
- var involvedObject = event.involvedObject || {};
- var name = involvedObject.name;
- var kind = involvedObject.kind;
- var ns = model.currentNamespace();
- if (name && kind && ns) {
- var entity = null;
- if (kind === "ReplicationController") {
- entity = model.getReplicationController(ns, name);
- } else if (kind === "Pod") {
- entity = model.getPod(ns, name);
- }
- if (entity) {
- updateEvent(entity, event);
- }
- }
- });
- }
- return events;
- }
-
- export function enrichImageRepository(imageRepository) {
- if (imageRepository) {
- var triggerUrl:string = null;
- var name = Core.pathGet(imageRepository, ["metadata", "name"]);
- imageRepository.$name = name;
- }
- }
-
- export function enrichImageRepositories(imageRepositories) {
- angular.forEach(imageRepositories, (imageRepository) => {
- enrichImageRepository(imageRepository);
- });
- return imageRepositories;
- }
-
-
- var labelColors = {
- 'batch': 'k8s-badge-batch',
- 'region': 'k8s-badge-region',
- 'type': 'k8s-badge-type',
- 'system': 'k8s-badge-system',
- 'isTarget': 'k8s-badge-target'
- };
-
- export function containerLabelClass(labelType:string) {
- if (!(labelType in labelColors)) {
- return 'mouse-pointer';
- }
- else return labelColors[labelType] + ' mouse-pointer';
- }
-
-
- /**
- * Returns true if the fabric8 forge plugin is enabled
- */
- export function isForgeEnabled() {
- // TODO should return true if the service "fabric8-forge" is valid
- return true;
- }
-
- /**
- * Returns the current kubernetes selected namespace or the default one
- */
- export function currentKubernetesNamespace() {
- var injector = HawtioCore.injector;
- if (injector) {
- var KubernetesState = injector.get("KubernetesState") || {};
- return KubernetesState.selectedNamespace || defaultNamespace;
- }
- return defaultNamespace;
- }
-
- export function setCurrentKubernetesNamespace(ns) {
- if (ns) {
- var KubernetesState = inject("KubernetesState") || {};
- KubernetesState.selectedNamespace = ns;
- }
- }
-
- /**
- * Configures the json schema
- */
- export function configureSchema() {
- angular.forEach(schema.definitions, (definition, name) => {
- var properties = definition.properties;
- if (properties) {
- var hideProperties = ["creationTimestamp", "kind", "apiVersion", "annotations", "additionalProperties", "namespace", "resourceVersion", "selfLink", "uid"];
- angular.forEach(hideProperties, (propertyName) => {
- var property = properties[propertyName];
- if (property) {
- property["hidden"] = true;
- }
- });
- angular.forEach(properties, (property, propertyName) => {
- var ref = property["$ref"];
- var type = property["type"];
- if (ref && (!type || type === "object")) {
- property["type"] = ref;
- }
- if (type === "array") {
- var items = property["items"];
- if (items) {
- var ref = items["$ref"];
- var type = items["type"];
- if (ref && (!type || type === "object")) {
- items["type"] = ref;
- }
- }
- }
- });
- }
-
- schema.definitions.os_build_WebHookTrigger.properties.secret.type = "password";
- })
- }
-
- /**
- * Lets remove any enriched data to leave the original json intact
- */
- export function unenrich(item) {
- var o = _.cloneDeep(item);
- angular.forEach(o, (value, key) => {
- if (key.startsWith("$") || key.startsWith("_")) {
- delete o[key];
- }
- });
- delete o['connectTo'];
- return o;
- }
-
- /**
- * Returns the unenriched JSON representation of an object
- */
- export function toRawJson(item) {
- var o = unenrich(item);
- return JSON.stringify(o, null, 2); // spacing level = 2
- }
-
- /**
- * Returns the unenriched YAML representation of an object
- */
- export function toRawYaml(item) {
- var o = unenrich(item);
- return jsyaml.dump(o, { indent: 2 });
- }
-
-
- export function watch($scope: any, $element: any, kind, ns, fn, labelSelector = null) {
- var connection = KubernetesAPI.watch({
- kind: kind,
- namespace: ns,
- labelSelector: labelSelector,
- success: function (objects) {
- fn(objects);
- Core.$apply($scope);
- }
- });
- $element.on('$destroy', () => {
- console.log("Static controller[" + kind + ", " + ns + "] element destroyed");
- $scope.$destroy();
- });
- $scope.$on('$destroy', () => {
- console.log("Static controller[" + kind + ", " + ns + "] scope destroyed");
- connection.disconnect();
- });
- var oldDeleteScopeFn = $scope.deleteScope;
- $scope.deleteScope = function () {
- $element.remove();
- if (angular.isFunction(oldDeleteScopeFn)) {
- oldDeleteScopeFn();
- }
- }
- }
-
- export function createKubernetesClient(kind, ns = null) {
- var K8SClientFactory = inject("K8SClientFactory");
- if (!K8SClientFactory) {
- log.warn("Could not find injected K8SClientFactory!");
- return null;
- }
- if (kind === "projects" || kind === "namespaces") {
- ns = null;
- } else if (!ns) {
- ns = Kubernetes.currentKubernetesNamespace();
- }
- return K8SClientFactory.create(kind, ns);
- }
-
-
- export function currentUserName() {
- var userDetails = HawtioOAuth.getUserProfile();
- var answer = null;
- if (userDetails) {
- answer = getName(userDetails);
- }
- return answer || "admin";
- }
-
- export function createNamespace(ns, client?) {
- if (!client) {
- client = isOpenShift ? Kubernetes.createKubernetesClient('projects') : Kubernetes.createKubernetesClient('namespaces');
- }
- if (ns && ns !== currentKubernetesNamespace()) {
- var object = {
- apiVersion: Kubernetes.defaultApiVersion,
- kind: isOpenShift ? 'Project' : 'Namespace',
- metadata: {
- name: ns,
- labels: {
- }
- }
- };
- client.put(object,
- (data) => {
- log.info("Created namespace: " + ns)
- },
- (err) => {
- log.warn("Failed to create namespace: " + ns + ": " + angular.toJson(err));
- });
- }
- }
-
- export function createRC(obj, onCompleteFn = null){
- var client = Kubernetes.createKubernetesClient('replicationcontrollers','default');
- var RCTemplate = new resourceRCTemplate();
- var rcTemplate = RCTemplate.createRC(obj);
- console.log(JSON.stringify(rcTemplate));
- client.put(rcTemplate, function(obj) {
- console.log("Created: ", obj);
- if (angular.isFunction(onCompleteFn)) {
- onCompleteFn(obj);
- }
- });
- }
-
- export function connectOracle($http, $timeout, url, operation, rcName, delayTime){
- $timeout(() => {
- $http({
- url: url,
- method:'POST',
- params:{oracleName: rcName, operation: operation}
- }).success(function(data,header,config,status){
- console.log("success");
- }).error(function(data,header,config,status){
- //log.warn("Failed to connect " + connectParam + " " + data + " " + status);
- });
- }, delayTime);
- }
-
- export function getOracleStatus(labels){
- var answer = -1;
- if(typeof(labels) === 'object' && labels.hasOwnProperty("status")){
- switch(labels.status){
- case '0':
- answer = 0;
- break;
- case '1':
- answer = 1;
- break;
- case '2':
- answer = 2;
- break;
- default:
- answer = -1;
- }
- }
- return answer;
- }
-
- export function getExtractStatus(labels){
- if(labels.isTarget === 'false'){
- return parseInt(labels.isExtract);
- }else{
- return 10;
- }
- }
-
- export function getOracleName(name:string):string {
- var results = name.split("-");
- if(results.length === 2){
- return "汇总数据库" + "(" +results[1] + ")";
- }else if(results.length === 3){
- return Kubernetes.getCountyByCode(results[0]) + "_" + Kubernetes.getSystemNameById(results[1]);
- }else{
- return name;
- }
- }
-
- export function extractDataToOracle($http, selectedReplicationControllers, targetReplicationController){
- //console.log(targetReplicationController.length);
- if(selectedReplicationControllers.length ===1 && (getName(selectedReplicationControllers[0]) === getName(targetReplicationController))){
- alert("您选择的数据库中不包含需要汇总的数据库,导致汇总操作失败,请重新选择!");
- return;
- }
- var answer = checkoutOracleRCIsRunning(targetReplicationController) && targetReplicationController;
- var oracleConnectParam = [{
- OracleName: getName(targetReplicationController),
- connectHost: getHost(targetReplicationController.$pods[0]),
- connectPort: targetReplicationController.$pods[0].spec.containers[0].ports[0].hostPort,
- isTarget: true
- }];
- selectedReplicationControllers.forEach((rc) => {
- if(getName(rc) !== getName(targetReplicationController)){
- answer = answer && checkoutOracleRCIsRunning(rc);
- oracleConnectParam.push({
- "OracleName": getName(rc),
- "connectHost": getHost(rc.$pods[0]),
- "connectPort": rc.$pods[0].spec.containers[0].ports[0].hostPort,
- "isTarget": false
- });
- }
- });
-
- if(answer){
- $http({
- url: '/extractOracleData',
- dataType: 'json',
- method:'POST',
- params:{param: oracleConnectParam}
- }).success(function(data,header,config,status){
- console.log("success");
- }).error(function(data,header,config,status){
- //log.warn("Failed to connect " + connectParam + " " + data + " " + status);
- });
- }else{
- alert("您选择的汇总数据库或需要汇总的数据库中存在未启动成功的数据库,导致汇总操作失败,请重新选择!");
- }
- }
-
- export function checkoutOracleRCIsRunning(rc){
- if(rc.$podCounters.ready && rc.$oracleStatus == 2){
- return true
- }else{
- return false;
- }
- }
-
- export function replicasIsCreated (replicationcontrollers:Array, name:string){
- var result = false;
- if( replicationcontrollers !=null || replicationcontrollers.length<=0){
- for(var i=0; i
+///
+module Kubernetes {
+
+ export var context = '/kubernetes';
+ export var hash = '#' + context;
+ export var defaultRoute = hash + '/apps';
+ export var pluginName = 'Kubernetes';
+ export var pluginPath = 'plugins/kubernetes/';
+ export var templatePath = pluginPath + 'html/';
+ export var log:Logging.Logger = Logger.get(pluginName);
+
+ export var keepPollingModel = true;
+
+ export var defaultIconUrl = Core.url("/img/kubernetes.svg");
+ export var hostIconUrl = Core.url("/img/host.svg");
+
+ // this gets set as a pre-bootstrap task
+ export var osConfig:KubernetesConfig = undefined;
+ export var masterUrl = "";
+
+ export var defaultApiVersion = "v1";
+ export var defaultOSApiVersion = "v1";
+ export var labelFilterTextSeparator = ",";
+
+ export var defaultNamespace = "default";
+
+ export var appSuffix = ".app";
+
+ // kubernetes service names
+ export var kibanaServiceName = "kibana";
+ export var fabric8ForgeServiceName = "fabric8-forge";
+ export var gogsServiceName = "gogs";
+ export var jenkinsServiceName = "jenkins";
+ export var apimanServiceName = 'apiman';
+ export var isOpenShift = true;
+
+ export var sshSecretDataKeys = ["ssh-key", "ssh-key.pub"];
+ export var httpsSecretDataKeys = ["username", "password"];
+
+
+ export function kubernetesNamespacePath() {
+ var ns = currentKubernetesNamespace();
+ if (ns) {
+ return "/namespaces/" + ns;
+ } else {
+ return "";
+ }
+ }
+
+ export function apiPrefix() {
+ var prefix = Core.pathGet(osConfig, ['api', 'k8s', 'prefix']);
+ if (!prefix) {
+ prefix = 'api';
+ }
+ return Core.trimLeading(prefix, '/');
+ }
+
+ export function osApiPrefix() {
+ var prefix = Core.pathGet(osConfig, ['api', 'openshift', 'prefix']);
+ if (!prefix) {
+ prefix = 'oapi';
+ }
+ var answer = Core.trimLeading(prefix, '/');
+ if (!isOpenShift) {
+ return UrlHelpers.join(apiPrefix(), defaultOSApiVersion, "proxy", kubernetesNamespacePath(), "services/templates", answer);
+ }
+ return answer;
+ }
+
+ export function masterApiUrl() {
+ return masterUrl || "";
+ }
+
+ /** WARNING - this excludes the host name - you probably want to use: kubernetesApiUrl() instead!! */
+ export function kubernetesApiPrefix() {
+ return UrlHelpers.join(apiPrefix(), defaultApiVersion);
+ }
+
+ export function openshiftApiPrefix() {
+ return UrlHelpers.join(osApiPrefix(), defaultOSApiVersion);
+ }
+
+ export function prefixForType(type:string) {
+ if (type === WatchTypes.NAMESPACES) {
+ return kubernetesApiPrefix();
+ }
+ if (_.any(NamespacedTypes.k8sTypes, (t) => t === type)) {
+ return kubernetesApiPrefix();
+ }
+ if (_.any(NamespacedTypes.osTypes, (t) => t === type)) {
+ return openshiftApiPrefix();
+ }
+ // lets assume its an OpenShift extension type
+ return openshiftApiPrefix();
+ }
+
+ export function kubernetesApiUrl() {
+ return UrlHelpers.join(masterApiUrl(), kubernetesApiPrefix());
+ }
+
+ export function openshiftApiUrl() {
+ return UrlHelpers.join(masterApiUrl(), openshiftApiPrefix());
+ }
+
+ export function resourcesUriForKind(type, ns = null) {
+ if (!ns) {
+ ns = currentKubernetesNamespace();
+ }
+ return UrlHelpers.join(masterApiUrl(), prefixForType(type), namespacePathForKind(type, ns));
+ }
+
+ export function uriTemplateForKubernetesKind(type) {
+ var urlTemplate = '';
+ switch (type) {
+ case WatchTypes.NAMESPACES:
+ case "Namespaces":
+ urlTemplate = UrlHelpers.join('namespaces');
+ break;
+ case WatchTypes.OAUTH_CLIENTS:
+ case "OAuthClients":
+ case "OAuthClient":
+ return UrlHelpers.join('oauthclients');
+ case WatchTypes.PROJECTS:
+ case "Projects":
+ urlTemplate = UrlHelpers.join('projects');
+ break;
+ default:
+ urlTemplate = UrlHelpers.join('namespaces/:namespace', type, ':id');
+ }
+ return urlTemplate;
+ }
+
+ export function namespacePathForKind(type, ns) {
+ var urlTemplate = '';
+ switch (type) {
+ case WatchTypes.NAMESPACES:
+ case "Namespaces":
+ case "Namespace":
+ return UrlHelpers.join('namespaces');
+ case WatchTypes.NODES:
+ case "Nodes":
+ case "node":
+ return UrlHelpers.join('nodes');
+ case WatchTypes.PROJECTS:
+ case "Projects":
+ case "Project":
+ return UrlHelpers.join('projects');
+ case WatchTypes.OAUTH_CLIENTS:
+ case "OAuthClients":
+ case "OAuthClient":
+ return UrlHelpers.join('oauthclients');
+ case WatchTypes.PERSISTENT_VOLUMES:
+ case "PersistentVolumes":
+ case "PersistentVolume":
+ return UrlHelpers.join('persistentvolumes');
+ default:
+ return UrlHelpers.join('namespaces', ns, type);
+ }
+ }
+
+ /**
+ * Returns thevalue from the injector if its available or null
+ */
+ export function inject(name):T {
+ var injector = HawtioCore.injector;
+ return injector ? injector.get(name) : null;
+ }
+
+ export function createResource(thing:string, urlTemplate:string, $resource: ng.resource.IResourceService, KubernetesModel) {
+ var prefix = prefixForType(thing);
+ if (!prefix) {
+ log.debug("Invalid type given: ", thing);
+ return null;
+ }
+
+ var params = {
+ namespace: currentKubernetesNamespace
+ }
+ switch (thing) {
+ case WatchTypes.NAMESPACES:
+ case WatchTypes.OAUTH_CLIENTS:
+ case WatchTypes.NODES:
+ case WatchTypes.PROJECTS:
+ case WatchTypes.OAUTH_CLIENTS:
+ case WatchTypes.PERSISTENT_VOLUMES:
+ params = {};
+ }
+
+ var url = UrlHelpers.join(masterApiUrl(), prefix, urlTemplate);
+ log.debug("Url for ", thing, ": ", url);
+ var resource = $resource(url, null, {
+ query: { method: 'GET', isArray: false, params: params},
+ create: { method: 'POST', params: params},
+ save: { method: 'PUT', params: params},
+ delete: { method: 'DELETE', params: _.extend({
+ id: '@id'
+ }, params)}
+ });
+ return resource;
+ }
+
+ export function imageRepositoriesRestURL() {
+ return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/imagestreams");
+ }
+
+ export function deploymentConfigsRestURL() {
+ return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/deploymentconfigs");
+ }
+
+ export function buildsRestURL() {
+ return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/builds");
+ }
+
+ export function buildConfigHooksRestURL() {
+ return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/buildconfighooks");
+ }
+
+ export function buildConfigsRestURL() {
+ return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/buildconfigs");
+ }
+
+ export function routesRestURL() {
+ return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/routes");
+ }
+
+ export function templatesRestURL() {
+ return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/templates");
+ }
+
+ export function getNamespace(entity) {
+ var answer = Core.pathGet(entity, ["metadata", "namespace"]);
+ return answer ? answer : currentKubernetesNamespace();
+ }
+
+ export function getLabels(entity) {
+ var answer = Core.pathGet(entity, ["metadata", "labels"]);
+ return answer ? answer : {};
+ }
+
+ export function getName(entity) {
+ if (angular.isString(entity)) {
+ return entity;
+ }
+ return Core.pathGet(entity, ["metadata", "name"]) || Core.pathGet(entity, "name") || Core.pathGet(entity, "id");
+ }
+
+ export function getKind(entity) {
+ return Core.pathGet(entity, ["metadata", "kind"]) || Core.pathGet(entity, "kind");
+ }
+
+ export function getSelector(entity) {
+ return Core.pathGet(entity, ["spec", "selector"]);
+ }
+
+ export function getHost(pod) {
+ return Core.pathGet(pod, ["spec", "host"]) || Core.pathGet(pod, ["spec", "nodeName"]) || Core.pathGet(pod, ["status", "hostIP"]);
+ }
+
+ export function getStatus(pod) {
+ return Core.pathGet(pod, ["status", "phase"]);
+ }
+
+ export function getPorts(service) {
+ return Core.pathGet(service, ["spec", "ports"]);
+ }
+
+ export function getCreationTimestamp(entity) {
+ return Core.pathGet(entity, ["metadata", "creationTimestamp"]);
+ };
+
+ //var fabricDomain = Fabric.jmxDomain;
+ var fabricDomain = "io.fabric8";
+ export var mbean = fabricDomain + ":type=Kubernetes";
+ export var managerMBean = fabricDomain + ":type=KubernetesManager";
+ export var appViewMBean = fabricDomain + ":type=AppView";
+
+ export function isKubernetes(workspace?) {
+ // return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "Kubernetes"});
+ return true;
+ }
+
+ export function isKubernetesTemplateManager(workspace?) {
+ // return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "KubernetesTemplateManager"});
+ return true;
+ }
+
+ export function isAppView(workspace?) {
+ // return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "AppView"});
+ return true;
+ }
+
+ export function getStrippedPathName():string {
+ var pathName = Core.trimLeading((this.$location.path() || '/'), "#");
+ pathName = pathName.replace(/^\//, '');
+ return pathName;
+ }
+
+ export function linkContains(...words:String[]):boolean {
+ var pathName = this.getStrippedPathName();
+ return _.every(words, (word:string) => pathName.indexOf(word) !== 0);
+ }
+
+
+ /**
+ * Returns true if the given link is active. The link can omit the leading # or / if necessary.
+ * The query parameters of the URL are ignored in the comparison.
+ * @method isLinkActive
+ * @param {String} href
+ * @return {Boolean} true if the given link is active
+ */
+ export function isLinkActive(href:string):boolean {
+ // lets trim the leading slash
+ var pathName = getStrippedPathName();
+
+ var link = Core.trimLeading(href, "#");
+ link = link.replace(/^\//, '');
+ // strip any query arguments
+ var idx = link.indexOf('?');
+ if (idx >= 0) {
+ link = link.substring(0, idx);
+ }
+ if (!pathName.length) {
+ return link === pathName;
+ } else {
+ return _.startsWith(pathName, link);
+ }
+ }
+
+ export function setJson($scope, id, collection) {
+ $scope.id = id;
+ if (!$scope.fetched) {
+ return;
+ }
+ if (!id) {
+ $scope.json = '';
+ return;
+ }
+ if (!collection) {
+ return;
+ }
+ var item = collection.find((item) => { return getName(item) === id; });
+ if (item) {
+ $scope.json = angular.toJson(item, true);
+ $scope.item = item;
+ } else {
+ $scope.id = undefined;
+ $scope.json = '';
+ $scope.item = undefined;
+ }
+ }
+
+ /**
+ * Returns the labels text string using the key1=value1,key2=value2,....
format
+ */
+ export function labelsToString(labels, seperatorText = labelFilterTextSeparator) {
+ var answer = "";
+ angular.forEach(labels, (value, key) => {
+ var separator = answer ? seperatorText : "";
+
+ answer += separator + key + "=" + value;
+ });
+ return answer;
+ }
+
+
+ export function initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL) {
+ $scope.baseUri = Core.trimTrailing(Core.url("/") || "", "/") || "";
+
+ var injector = HawtioCore.injector;
+
+ function hasService(name) {
+ if (injector) {
+ var ServiceRegistry = injector.get("ServiceRegistry");
+ if (ServiceRegistry) {
+ return ServiceRegistry.hasService(name);
+ }
+ }
+ return false;
+ }
+
+ $scope.hasServiceKibana = () => hasService(kibanaServiceName);
+ $scope.hasServiceGogs = () => hasService(gogsServiceName);
+ $scope.hasServiceForge = () => hasService(fabric8ForgeServiceName);
+ $scope.hasServiceApiman = () => hasService(apimanServiceName);
+
+ $scope.viewTemplates = () => {
+ var returnTo = $location.url();
+ $location.path('/kubernetes/templates').search({'returnTo': returnTo});
+ };
+
+ $scope.namespace = $routeParams.namespace || $scope.namespace || KubernetesState.selectedNamespace || defaultNamespace;
+ if ($scope.namespace != KubernetesState.selectedNamespace) {
+ KubernetesState.selectedNamespace = $scope.namespace;
+
+ // lets show page is going to reload
+ if ($scope.model) {
+ $scope.model.fetched = false;
+ }
+ }
+ Kubernetes.setCurrentKubernetesNamespace($scope.namespace);
+
+ $scope.forgeEnabled = isForgeEnabled();
+
+ $scope.projectId = $routeParams["project"] || $scope.projectId || $scope.id;
+ var showProjectNavBars = false;
+ if ($scope.projectId && showProjectNavBars) {
+ $scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.projectId);
+ $scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId, null, $scope);
+ } else {
+ $scope.breadcrumbConfig = Developer.createEnvironmentBreadcrumbs($scope, $location, $routeParams);
+ $scope.subTabConfig = Developer.createEnvironmentSubNavBars($scope, $location, $routeParams);
+ }
+
+ if ($scope.projectId) {
+ $scope.$projectLink = Developer.projectLink($scope.projectId);
+ }
+
+ $scope.link = (href) => {
+ if (!href) {
+ return href;
+ }
+ if ($scope.$projectLink) {
+ return Developer.namespaceLink($scope, $routeParams, href.replace(/^\/kubernetes/, ''));
+ } else {
+ return href;
+ }
+ }
+
+ $scope.codeMirrorOptions = {
+ lineWrapping : true,
+ lineNumbers: true,
+ readOnly: 'nocursor',
+ mode: {name: "javascript", json: true}
+ };
+
+ $scope.resizeDialog = {
+ controller: null,
+ newReplicas: 0,
+ dialog: new UI.Dialog(),
+ onOk: () => {
+ var resizeDialog = $scope.resizeDialog;
+ resizeDialog.dialog.close();
+ resizeController($http, KubernetesApiURL, resizeDialog.controller, resizeDialog.newReplicas, () => { log.debug("updated number of replicas"); })
+ },
+ open: (controller) => {
+ var resizeDialog = $scope.resizeDialog;
+ resizeDialog.controller = controller;
+ resizeDialog.newReplicas = Core.pathGet(controller, ["status", "replicas"]);
+ resizeDialog.dialog.open();
+
+ $timeout(() => {
+ $('#replicas').focus();
+ }, 50);
+ },
+ close: () => {
+ $scope.resizeDialog.dialog.close();
+ }
+ };
+
+ $scope.triggerBuild = (buildConfig) => {
+ var url = buildConfig.$triggerUrl;
+ console.log("triggering build at url: " + url);
+ if (url) {
+ //var data = {};
+ var data = null;
+ var config = {
+ headers: {
+ 'Content-Type': "application/json"
+ }
+ };
+ var name = Core.pathGet(buildConfig, ["metadata", "name"]);
+ Core.notification('info', "Triggering build " + name);
+ $http.post(url, data, config).
+ success(function (data, status, headers, config) {
+ console.log("trigger worked! got data " + angular.toJson(data, true));
+ // TODO should we show some link to the build
+ Core.notification('info', "Building " + name);
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ Core.notification('error', "Failed to trigger build for " + name + ". Returned code: " + status + " " + data);
+ });
+ };
+ }
+
+ // update the URL if the filter is changed
+ $scope.$watch("tableConfig.filterOptions.filterText", (text) => {
+ //var filterText = Kubernetes.findValeOfLabels(text);
+ $location.search("q", text);
+ });
+
+ $scope.$on("labelFilterUpdate", ($event, text) => {
+ var filterOptions = ($scope.tableConfig || {}).filterOptions || {};
+ var currentFilter = filterOptions.filterText;
+ if (Core.isBlank(currentFilter)) {
+ filterOptions.filterText = text;
+ }else{
+ var expressions = currentFilter.split(/\s+/);
+ if (expressions.indexOf(text) !== -1) {
+ // lets exclude this filter expression
+ expressions = expressions.remove(text);
+ filterOptions.filterText = expressions.join(" ");
+ } else {
+ filterOptions.filterText = currentFilter + " " + text;
+ }
+ }
+ $scope.id = undefined;
+ });
+
+ }
+
+ /**
+ * Returns the number of pods that are ready
+ */
+ export function readyPodCount(service) {
+ var count = 0;
+ angular.forEach((service || {}).$pods, (pod)=> {
+ if (pod.$ready) {
+ count++;
+ }
+ });
+ return count;
+ }
+
+ /**
+ * Returns the service link URL for either the service name or the service object
+ */
+ export function serviceLinkUrl(service, httpOnly = false) {
+ if (angular.isObject(service)) {
+ var portalIP = service.$host;
+ // lets assume no custom port for now for external routes
+ var port = null;
+ var protocol = "http://";
+ var spec = service.spec;
+ if (spec) {
+ if (!portalIP) {
+ portalIP = spec.portalIP;
+ }
+ var hasHttps = false;
+ var hasHttp = false;
+ angular.forEach(spec.ports, (portSpec) => {
+ var p = portSpec.port;
+ if (p) {
+ if (p === 443) {
+ hasHttps = true;
+ } else if (p === 80) {
+ hasHttp = true;
+ }
+ if (!port) {
+ port = p;
+ }
+ }
+ });
+ if (!hasHttps && !hasHttp && port) {
+ // lets treat 8080 as http which is a common service to export
+ if (port === 8080) {
+ hasHttp = true;
+ } else if (port === 8443) {
+ hasHttps = true;
+ }
+ }
+ }
+ if (portalIP) {
+ if (hasHttps) {
+ return "https://" + portalIP;
+ } else if (hasHttp) {
+ return "http://" + portalIP;
+ } else if (!httpOnly) {
+ if (port) {
+ return protocol + portalIP + ":" + port + "/";
+ } else {
+ return protocol + portalIP;
+ }
+ }
+ }
+ } else if (service) {
+ var serviceId = service.toString();
+ if (serviceId) {
+ var ServiceRegistry = getServiceRegistry();
+ if (ServiceRegistry) {
+ return ServiceRegistry.serviceLink(serviceId) || "";
+ }
+ }
+ }
+ return "";
+ }
+
+
+ /**
+ * Returns the total number of counters for the podCounters object
+ */
+ export function podCounterTotal($podCounters) {
+ var answer = 0;
+ if ($podCounters) {
+ angular.forEach(["ready", "valid", "waiting", "error"], (name) => {
+ var value = $podCounters[name] || 0;
+ answer += value;
+ });
+ }
+ return answer;
+ }
+
+ /**
+ * Given the list of pods lets iterate through them and find all pods matching the selector
+ * and return counters based on the status of the pod
+ */
+ export function createPodCounters(selector, pods, outputPods = [], podLinkQuery = null, podLinkUrl = null) {
+ if (!podLinkUrl) {
+ podLinkUrl = "/kubernetes/pods";
+ }
+ var filterFn;
+ if (angular.isFunction(selector)) {
+ filterFn = selector;
+ } else {
+ filterFn = (pod) => selectorMatches(selector, getLabels(pod));
+ }
+ var answer = {
+ podsLink: "",
+ ready: 0,
+ valid: 0,
+ waiting: 0,
+ error: 0
+ };
+ if (selector) {
+ if (!podLinkQuery) {
+ podLinkQuery = Kubernetes.labelsToString(selector, " ");
+ }
+ answer.podsLink = podLinkUrl + "?q=" + encodeURIComponent(podLinkQuery);
+ angular.forEach(pods, pod => {
+ if (filterFn(pod)) {
+ outputPods.push(pod);
+ var status = getStatus(pod);
+ if (status) {
+ var lower = status.toLowerCase();
+ if (lower.startsWith("run")) {
+ if (isReady(pod)) {
+ answer.ready += 1;
+ } else {
+ answer.valid += 1;
+ }
+ } else if (lower.startsWith("wait") || lower.startsWith("pend")) {
+ answer.waiting += 1;
+ } else if (lower.startsWith("term") || lower.startsWith("error") || lower.startsWith("fail")) {
+ answer.error += 1;
+ }
+ } else {
+ answer.error += 1;
+ }
+ }
+ });
+ }
+ return answer;
+ }
+
+ /**
+ * Converts the given json into an array of items. If the json contains a nested set of items then that is sorted; so that services
+ * are processed first; then turned into an array. Otherwise the json is put into an array so it can be processed polymorphically
+ */
+ export function convertKubernetesJsonToItems(json) {
+ var items = json.items;
+ if (angular.isArray(items)) {
+ // TODO we could check for List or Config types here and warn if not
+
+ // sort the services first
+ var answer = [];
+ items.forEach((item) => {
+ if (item.kind === "Service") {
+ answer.push(item);
+ }
+ });
+ items.forEach((item) => {
+ if (item.kind !== "Service") {
+ answer.push(item);
+ }
+ });
+ return answer;
+ } else {
+ return [json];
+ }
+ }
+
+ export function isV1beta1Or2() {
+ return defaultApiVersion === "v1beta1" || defaultApiVersion === "v1beta2";
+ }
+
+ /**
+ * Returns a link to the detail page for the given entity
+ */
+ export function entityPageLink(obj) {
+ if (obj) {
+ function getLink(entity) {
+ var viewLink = entity["$viewLink"];
+ if (viewLink) {
+ return viewLink;
+ }
+ var id = getName(entity);
+ var kind = getKind(entity);
+ if (kind && id) {
+ var path = kind.substring(0, 1).toLowerCase() + kind.substring(1) + "s";
+ var namespace = getNamespace(entity);
+ if (namespace && !isIgnoreNamespaceKind(kind)) {
+ return Core.url(UrlHelpers.join('/kubernetes/namespace', namespace, path, id));
+ } else {
+ return Core.url(UrlHelpers.join('/kubernetes', path, id));
+ }
+ }
+ }
+ var baseLink = getLink(obj);
+ if (!HawtioCore.injector || !baseLink) {
+ return baseLink;
+ }
+ var $routeParams = HawtioCore.injector.get('$routeParams');
+ var projectId = $routeParams['project'] || $routeParams['project'];
+ if (!projectId) {
+ return baseLink;
+ }
+ return UrlHelpers.join(Developer.projectLink(projectId), baseLink.replace(/^\/kubernetes\//, ''));
+ }
+ return null;
+ }
+
+
+ export function resourceKindToUriPath(kind) {
+ var kindPath = kind.toLowerCase() + "s";
+ if (kindPath === "replicationControllers" && !isV1beta1Or2()) {
+ kindPath = "replicationcontrollers";
+ }
+ return kindPath;
+ }
+
+ function isIgnoreNamespaceKind(kind) {
+ return kind === "Host" || kind === "Minion";
+ }
+
+ /**
+ * Returns the root URL for the kind
+ */
+ export function kubernetesUrlForKind(KubernetesApiURL, kind, namespace = null, path = null) {
+ var pathSegment = "";
+ if (path) {
+ pathSegment = "/" + Core.trimLeading(path, "/");
+ }
+ var kindPath = resourceKindToUriPath(kind);
+ var ignoreNamespace = isIgnoreNamespaceKind(kind);
+ if (isV1beta1Or2() || ignoreNamespace) {
+ var postfix = "";
+ if (namespace && !ignoreNamespace) {
+ postfix = "?namespace=" + namespace;
+ }
+ return UrlHelpers.join(KubernetesApiURL, kindPath, pathSegment, postfix);
+ } else {
+ return UrlHelpers.join(KubernetesApiURL, "/namespaces/", namespace , kindPath, pathSegment);
+ }
+ };
+
+ /**
+ * Returns the base URL for the kind of kubernetes resource or null if it cannot be found
+ */
+ export function kubernetesUrlForItemKind(KubernetesApiURL, json) {
+ var kind = json.kind;
+ if (kind) {
+ return kubernetesUrlForKind(KubernetesApiURL, kind, json.namespace);
+ } else {
+ log.warn("Ignoring missing kind " + kind + " for kubernetes json: " + angular.toJson(json));
+ return null;
+ }
+ }
+
+ export function kubernetesProxyUrlForService(KubernetesApiURL, service, path = null) {
+ var pathSegment = "";
+ if (path) {
+ pathSegment = "/" + Core.trimLeading(path, "/");
+ } else {
+ pathSegment = "/";
+ }
+ var namespace = getNamespace(service);
+ if (isV1beta1Or2()) {
+ var postfix = "?namespace=" + namespace;
+ return UrlHelpers.join(KubernetesApiURL, "/proxy", kubernetesNamespacePath(), "/services/" + getName(service) + pathSegment + postfix);
+ } else {
+ return UrlHelpers.join(KubernetesApiURL, "/proxy/namespaces/", namespace, "/services/" + getName(service) + pathSegment);
+ }
+ }
+
+
+ export function kubernetesProxyUrlForServiceCurrentNamespace(service, path = null) {
+ var apiPrefix = UrlHelpers.join(kubernetesApiUrl());
+ return kubernetesProxyUrlForService(apiPrefix, service, path);
+
+ }
+ export function buildConfigRestUrl(id) {
+ return UrlHelpers.join(buildConfigsRestURL(), id);
+ }
+
+ export function deploymentConfigRestUrl(id) {
+ return UrlHelpers.join(deploymentConfigsRestURL(), id);
+ }
+
+ export function imageRepositoryRestUrl(id) {
+ return UrlHelpers.join(imageRepositoriesRestURL(), id);
+ }
+
+ export function buildRestUrl(id) {
+ return UrlHelpers.join(buildsRestURL(), id);
+ }
+
+ export function buildLogsRestUrl(id) {
+ return UrlHelpers.join(buildsRestURL(), id, "log");
+ }
+
+ /**
+ * Runs the given application JSON
+ */
+ export function runApp($location, $scope, $http, KubernetesApiURL, json, name = "App", onSuccessFn = null, namespace = null, onCompleteFn = null) {
+ if (json) {
+ if (angular.isString(json)) {
+ json = angular.fromJson(json);
+ }
+ name = name || "App";
+ var postfix = namespace ? " in namespace " + namespace : "";
+ Core.notification('info', "Running " + name + postfix);
+
+ var items = convertKubernetesJsonToItems(json);
+ angular.forEach(items, (item) => {
+ var url = kubernetesUrlForItemKind(KubernetesApiURL, item);
+ if (url) {
+ $http.post(url, item).
+ success(function (data, status, headers, config) {
+ log.debug("Got status: " + status + " on url: " + url + " data: " + data + " after posting: " + angular.toJson(item));
+ if (angular.isFunction(onCompleteFn)) {
+ onCompleteFn();
+ }
+ Core.$apply($scope);
+ }).
+ error(function (data, status, headers, config) {
+ var message = null;
+ if (angular.isObject(data)) {
+ message = data.message;
+ var reason = data.reason;
+ if (reason === "AlreadyExists") {
+ // lets ignore duplicates
+ log.debug("entity already exists at " + url);
+ return;
+ }
+ }
+ if (!message) {
+ message = "Failed to POST to " + url + " got status: " + status;
+ }
+ log.warn("Failed to save " + url + " status: " + status + " response: " + angular.toJson(data, true));
+ Core.notification('error', message);
+ });
+ }
+ });
+ }
+ }
+
+
+ /**
+ * Returns true if the current status of the pod is running
+ */
+ export function isRunning(podCurrentState) {
+ var status = (podCurrentState || {}).phase;
+ if (status) {
+ var lower = status.toLowerCase();
+ return lower.startsWith("run");
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Returns true if the labels object has all of the key/value pairs from the selector
+ */
+ export function selectorMatches(selector, labels) {
+ if (angular.isObject(labels)) {
+ var answer = true;
+ var count = 0;
+ angular.forEach(selector, (value, key) => {
+ count++;
+ if (answer && labels[key] !== value) {
+ answer = false;
+ }
+ });
+ return answer && count > 0;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Returns the service registry
+ */
+ export function getServiceRegistry() {
+ var injector = HawtioCore.injector;
+ return injector ? injector.get("ServiceRegistry") : null;
+ }
+
+
+ /**
+ * Returns a link to the kibana logs web application
+ */
+ export function kibanaLogsLink(ServiceRegistry) {
+ var link = ServiceRegistry.serviceLink(kibanaServiceName);
+ if (link) {
+ if (!link.endsWith("/")) {
+ link += "/";
+ }
+ return link + "#/dashboard/Fabric8";
+ } else {
+ return null;
+ }
+ }
+
+ export function openLogsForPods(ServiceRegistry, $window, namespace, pods) {
+ var link = kibanaLogsLink(ServiceRegistry);
+ if (link) {
+ var query = "";
+ var count = 0;
+ angular.forEach(pods, (item) => {
+ var id = getName(item);
+ if (id) {
+ var space = query ? " OR " : "";
+ count++;
+ query += space + '"' + id + '"';
+ }
+ });
+ if (query) {
+ if (count > 1) {
+ query = "(" + query + ")";
+ }
+ query = 'kubernetes.namespace_name:"' + namespace + '" AND kubernetes.pod_name:' + query;
+ link += "?_a=(query:(query_string:(query:'" + query + "')))";
+ var newWindow = $window.open(link, "viewLogs");
+ }
+ }
+ }
+
+ export function resizeController($http, KubernetesApiURL, replicationController, newReplicas, onCompleteFn = null) {
+ var id = getName(replicationController);
+ var namespace = getNamespace(replicationController) || "";
+ var url = kubernetesUrlForKind(KubernetesApiURL, "ReplicationController", namespace, id);
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ var desiredState = data.spec;
+ if (!desiredState) {
+ desiredState = {};
+ data.spec = desiredState;
+ }
+ desiredState.replicas = newReplicas;
+ $http.put(url, data).
+ success(function (data, status, headers, config) {
+ log.debug("updated controller " + url);
+ if (angular.isFunction(onCompleteFn)) {
+ onCompleteFn();
+ }
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to save " + url + " " + data + " " + status);
+ });
+ }
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ });
+ }
+
+ export function statusTextToCssClass(text, ready = false) {
+ if (text) {
+ var lower = text.toLowerCase();
+ if (lower.startsWith("run") || lower.startsWith("ok")) {
+ if (!ready) {
+ return "fa fa-spinner fa-spin green";
+ }
+ return 'fa fa-play-circle green';
+ } else if (lower.startsWith("wait") || lower.startsWith("pend")) {
+ return 'fa fa-download';
+ } else if (lower.startsWith("term") || lower.startsWith("error") || lower.startsWith("fail")) {
+ return 'fa fa-off orange';
+ } else if (lower.startsWith("succeeded")) {
+ return 'fa fa-check-circle-o green';
+ }
+ }
+ return 'fa fa-question red';
+ }
+
+ export function podStatus(pod) {
+ return getStatus(pod);
+ }
+
+ export function isReady(pod) {
+ var status = pod.status || {};
+ var answer = false;
+ angular.forEach(status.conditions, (condition) => {
+ var t = condition.type;
+ if (t && t === "Ready") {
+ var status = condition.status;
+ if (status === "True") {
+ answer = true;
+ }
+ }
+ });
+ return answer;
+ }
+
+ export function createAppViewPodCounters(appView) {
+ var array = [];
+ var map = {};
+ var pods = appView.pods;
+ var lowestDate = null;
+ angular.forEach(pods, pod => {
+ var selector = getLabels(pod);
+ var selectorText = Kubernetes.labelsToString(selector, " ");
+ var answer = map[selector];
+ if (!answer) {
+ answer = {
+ labelText: selectorText,
+ podsLink: UrlHelpers.join("/kubernetes/namespace/", pod.metadata.namespace, "pods?q=" + encodeURIComponent(selectorText)),
+ valid: 0,
+ waiting: 0,
+ error: 0
+ };
+ map[selector] = answer;
+ array.push(answer);
+ }
+ var status = (podStatus(pod) || "Error").toLowerCase();
+ if (status.startsWith("run") || status.startsWith("ok")) {
+ answer.valid += 1;
+ } else if (status.startsWith("wait") || status.startsWith("pwnd")) {
+ answer.waiting += 1;
+ } else {
+ answer.error += 1;
+ }
+ var creationTimestamp = getCreationTimestamp(pod);
+ if (creationTimestamp) {
+ var d = new Date(creationTimestamp);
+ if (!lowestDate || d < lowestDate) {
+ lowestDate = d;
+ }
+ }
+ });
+ appView.$creationDate = lowestDate;
+ return array;
+ }
+
+ export function createAppViewServiceViews(appView) {
+ var array = [];
+ var pods = appView.pods;
+ angular.forEach(pods, pod => {
+ var id = getName(pod);
+ if (id) {
+ var abbrev = id;
+ var idx = id.indexOf("-");
+ if (idx > 1) {
+ abbrev = id.substring(0, idx);
+ }
+ pod.idAbbrev = abbrev;
+ }
+ pod.statusClass = statusTextToCssClass(podStatus(pod), isReady(pod));
+ });
+
+ var services = appView.services || [];
+ var replicationControllers = appView.replicationControllers || [];
+ var size = Math.max(services.length, replicationControllers.length, 1);
+ var appName = appView.$info.name;
+ for (var i = 0; i < size; i++) {
+ var service = services[i];
+ var replicationController = replicationControllers[i];
+ var controllerId = getName(replicationController);
+ var name = getName(service) || controllerId;
+ var address = Core.pathGet(service, ["spec", "portalIP"]);
+ if (!name && pods.length) {
+ name = pods[0].idAbbrev;
+ }
+ if (!appView.$info.name) {
+ appView.$info.name = name;
+ }
+ if (!appView.id && pods.length) {
+ appView.id = getName(pods[0]);
+ }
+ if (i > 0) {
+ appName = name;
+ }
+ var podCount = pods.length;
+ var podCountText = podCount + " pod" + (podCount > 1 ? "s" : "");
+ var view = {
+ appName: appName || name,
+ name: name,
+ createdDate: appView.$creationDate,
+ podCount: podCount,
+ podCountText: podCountText,
+ address: address,
+ controllerId: controllerId,
+ service: service,
+ replicationController: replicationController,
+ pods: pods
+ };
+ array.push(view);
+ }
+ return array;
+ }
+
+ /**
+ * converts a git path into an accessible URL for the browser
+ */
+ export function gitPathToUrl(iconPath, branch = "master") {
+ return (HawtioCore.injector.get('AppLibraryURL') || '') + "/git/" + branch + iconPath;
+ }
+
+ function asDate(value) {
+ return value ? new Date(value) : null;
+ }
+
+ export function enrichBuildConfig(buildConfig, sortedBuilds) {
+ if (buildConfig) {
+ var triggerUrl:string = null;
+ var metadata = buildConfig.metadata || {};
+ var name = metadata.name;
+ buildConfig.$name = name;
+ var projectLink = Developer.projectLink(name);
+ var ns = metadata.namespace || currentKubernetesNamespace();
+ buildConfig.$namespace = ns;
+ buildConfig.environments = [];
+ buildConfig.$creationDate = asDate(Kubernetes.getCreationTimestamp(buildConfig));
+ buildConfig.$labelsText = Kubernetes.labelsToString(getLabels(buildConfig));
+
+ if (name) {
+ buildConfig.$viewLink = UrlHelpers.join("workspaces", ns, "projects", name, "environments");
+ buildConfig.$editLink = UrlHelpers.join("workspaces", ns, "projects", name, "buildConfigEdit");
+
+ angular.forEach([false, true], (flag) => {
+ angular.forEach(buildConfig.triggers, (trigger) => {
+ if (!triggerUrl) {
+ var type = trigger.type;
+ if (type === "generic" || flag) {
+ var generic = trigger[type];
+ if (type && generic) {
+ var secret = generic.secret;
+ if (secret) {
+ triggerUrl = UrlHelpers.join(buildConfigHooksRestURL(), name, secret, type);
+ buildConfig.$triggerUrl = triggerUrl;
+ }
+ }
+ }
+ }
+ });
+ });
+
+ // lets find the latest build...
+ if (sortedBuilds) {
+ buildConfig.$lastBuild = _.find(sortedBuilds, {
+ metadata: {
+ labels: {
+ buildconfig: name
+ }
+ }
+ });
+ }
+ }
+ var $fabric8Views = {};
+
+ function defaultPropertiesIfNotExist(name, object, autoCreate = false) {
+ var view = $fabric8Views[name];
+ if (autoCreate && !view) {
+ view = {}
+ $fabric8Views[name] = view;
+ }
+ if (view) {
+ angular.forEach(object, (value, property) => {
+ var current = view[property];
+ if (!current) {
+ view[property] = value;
+ }
+ });
+ }
+ }
+
+ function defaultPropertiesIfNotExistStartsWith(prefix, object, autoCreate = false) {
+ angular.forEach($fabric8Views, (view, name) => {
+ if (view && name.startsWith(prefix)) {
+ angular.forEach(object, (value, property) => {
+ var current = view[property];
+ if (!current) {
+ view[property] = value;
+ }
+ });
+ }
+ });
+ }
+
+ var labels = metadata.labels || {};
+ var annotations = metadata.annotations || {};
+
+ // lets default the repo and user
+ buildConfig.$user = annotations["fabric8.jenkins/user"] || labels["user"];
+ buildConfig.$repo = annotations["fabric8.jenkins/repo"] || labels["repo"];
+
+ angular.forEach(annotations, (value, key) => {
+ var parts = key.split('/', 2);
+ if (parts.length > 1) {
+ var linkId = parts[0];
+ var property = parts[1];
+ if (linkId && property && linkId.startsWith("fabric8.link")) {
+ var link = $fabric8Views[linkId];
+ if (!link) {
+ link = {
+ class: linkId
+ };
+ $fabric8Views[linkId] = link;
+ }
+ link[property] = value;
+ }
+ }
+ });
+
+ if (buildConfig.$user && buildConfig.$repo) {
+ // browse gogs repo view
+ var gogsUrl = serviceLinkUrl(gogsServiceName);
+ if (gogsUrl) {
+ defaultPropertiesIfNotExist("fabric8.link.browseGogs.view", {
+ label: "Browse...",
+ url: UrlHelpers.join(gogsUrl, buildConfig.$user, buildConfig.$repo),
+ description: "Browse the source code of this repository",
+ iconClass: "fa fa-external-link"
+ }, true);
+ }
+
+ // run forge commands view
+ defaultPropertiesIfNotExist("fabric8.link.forgeCommand.view", {
+ label: "Command...",
+ url: UrlHelpers.join(projectLink, "/forge/commands/user", buildConfig.$user, buildConfig.$repo),
+ description: "Perform an action on this project",
+ iconClass: "fa fa-play-circle"
+ }, true);
+
+
+ // configure devops view
+ defaultPropertiesIfNotExist("fabric8.link.forgeCommand.devops.settings", {
+ label: "Settings",
+ url: UrlHelpers.join(projectLink, "/forge/command/devops-edit/user", buildConfig.$user, buildConfig.$repo),
+ description: "Configure the DevOps settings for this project",
+ iconClass: "fa fa-pencil-square-o"
+ }, true);
+
+ }
+
+ // add some icons and descriptions
+ defaultPropertiesIfNotExist("fabric8.link.repository.browse", {
+ label: "Browse...",
+ description: "Browse the source code of this repository",
+ iconClass: "fa fa-external-link"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.jenkins.job", {
+ iconClass: "fa fa-tasks",
+ description: "View the Jenkins Job for this build"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.jenkins.monitor", {
+ iconClass: "fa fa-tachometer",
+ description: "View the Jenkins Monitor dashboard for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.jenkins.pipeline", {
+ iconClass: "fa fa-arrow-circle-o-right",
+ description: "View the Jenkins Pipeline for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.letschat.room", {
+ iconClass: "fa fa-comment",
+ description: "Chat room for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.letschat.room", {
+ iconClass: "fa fa-comment",
+ description: "Chat room for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.taiga", {
+ iconClass: "fa fa-check-square-o",
+ description: "Issue tracker for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.issues", {
+ iconClass: "fa fa-check-square-o",
+ description: "Issues for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.releases", {
+ iconClass: "fa fa-tag",
+ description: "Issues for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.taiga.team", {
+ iconClass: "fa fa-users",
+ description: "Team members for this project"
+ });
+ defaultPropertiesIfNotExist("fabric8.link.team", {
+ iconClass: "fa fa-users",
+ description: "Team members for this project"
+ });
+ defaultPropertiesIfNotExistStartsWith("fabric8.link.environment.", {
+ iconClass: "fa fa-cloud",
+ description: "The kubernetes namespace for this environment"
+ });
+
+
+ // lets put the views into sections...
+ var $fabric8CodeViews = {};
+ var $fabric8BuildViews = {};
+ var $fabric8TeamViews = {};
+ var $fabric8EnvironmentViews = {};
+ angular.forEach($fabric8Views, (value, key) => {
+ var view;
+ if (key.indexOf("taiga") > 0 || key.indexOf(".issue") > 0 || key.indexOf("letschat") > 0|| key.indexOf(".team") > 0) {
+ view = $fabric8TeamViews;
+ } else if (key.indexOf("jenkins") > 0) {
+ view = $fabric8BuildViews;
+ } else if (key.indexOf(".environment.") > 0) {
+ view = $fabric8EnvironmentViews;
+ } else {
+ view = $fabric8CodeViews;
+ }
+ view[key] = value;
+ });
+
+
+ buildConfig.$fabric8Views = $fabric8Views;
+ buildConfig.$fabric8CodeViews = $fabric8CodeViews;
+ buildConfig.$fabric8BuildViews = $fabric8BuildViews;
+ buildConfig.$fabric8EnvironmentViews = $fabric8EnvironmentViews;
+ buildConfig.$fabric8TeamViews = $fabric8TeamViews;
+
+ var $jenkinsJob = annotations["fabric8.io/jenkins-job"];
+ if (!$jenkinsJob && $fabric8Views["fabric8.link.jenkins.job"]) {
+ $jenkinsJob = name;
+ }
+ buildConfig.$jenkinsJob = $jenkinsJob;
+
+ angular.forEach($fabric8EnvironmentViews, (env) => {
+ var c = env.class;
+ var prefix = "fabric8.link.environment.";
+ if (c && c.startsWith(prefix)) {
+ var ens = c.substring(prefix.length);
+ env.namespace = ens;
+ env.url = UrlHelpers.join("/workspaces", ns, "projects", name, "namespace", ens);
+ }
+ buildConfig.environments.push(env);
+ });
+ if (!buildConfig.environments.length) {
+ // lets create a single environment
+ var ens = ns;
+ var env = {
+ namespace: ens,
+ label: "Current",
+ description: "The environemnt that this project is built and run inside",
+ iconClass: "fa fa-cloud",
+ url: UrlHelpers.join("/workspaces", ns, "projects", name, "namespace", ens)
+ };
+ buildConfig.environments.push(env);
+
+ }
+
+ buildConfig.environments = buildConfig.environments.reverse();
+
+ buildConfig.tools = [];
+ angular.forEach($fabric8CodeViews, (env) => {
+ buildConfig.tools.push(env);
+ });
+ angular.forEach($fabric8TeamViews, (env) => {
+ buildConfig.tools.push(env);
+ });
+
+ }
+ }
+
+ export function enrichBuildConfigs(buildConfigs, sortedBuilds = null) {
+ angular.forEach(buildConfigs, (buildConfig) => {
+ enrichBuildConfig(buildConfig, sortedBuilds);
+ });
+ return buildConfigs;
+ }
+
+ export function enrichBuilds(builds) {
+ angular.forEach(builds, (build) => {
+ enrichBuild(build);
+ });
+ return _.sortBy(builds, "$creationDate").reverse();
+ }
+
+ export function enrichBuild(build) {
+ if (build) {
+ var metadata = build.metadata || {};
+ var annotations = metadata.annotations || {};
+ var name = getName(build);
+ var namespace = getNamespace(build);
+ build.$name = name;
+ build.$namespace = namespace;
+
+ var nameArray = name.split("-");
+ var nameArrayLength = nameArray.length;
+ build.$shortName = (nameArrayLength > 4) ? nameArray.slice(0, nameArrayLength - 4).join("-") : name.substring(0, 30);
+
+ var labels = getLabels(build);
+ var configId = labels.buildconfig;
+ build.$configId = configId;
+ if (configId) {
+ //build.$configLink = UrlHelpers.join("kubernetes/buildConfigs", configId);
+ build.$configLink = UrlHelpers.join("workspaces", currentKubernetesNamespace(), "projects", configId);
+ }
+ var creationTimestamp = getCreationTimestamp(build);
+ if (creationTimestamp) {
+ var d = new Date(creationTimestamp);
+ build.$creationDate = d;
+ }
+ if (name) {
+ //build.$viewLink = UrlHelpers.join("kubernetes/builds", name);
+ var projectLink = UrlHelpers.join("workspaces", currentKubernetesNamespace(), "projects", configId);
+ build.$viewLink = UrlHelpers.join(projectLink, "builds", name);
+ //build.$logsLink = UrlHelpers.join("kubernetes/buildLogs", name);
+ build.$logsLink = UrlHelpers.join(projectLink, "buildLogs", name);
+ }
+ build.podName = build.podName || annotations["openshift.io/build.pod-name"];
+ var podName = build.podName;
+ if (podName && namespace) {
+ var podNameArray = podName.split("-");
+ var podNameArrayLength = podNameArray.length;
+ build.$podShortName = (podNameArrayLength > 5) ? podNameArray[podNameArrayLength - 5] : podName.substring(0, 30);
+ build.$podLink = UrlHelpers.join("kubernetes/namespace", namespace, "pods", podName);
+ }
+ }
+ return build;
+ }
+
+
+ export function enrichDeploymentConfig(deploymentConfig) {
+ if (deploymentConfig) {
+ var triggerUrl:string = null;
+ var name = Core.pathGet(deploymentConfig, ["metadata", "name"]);
+ deploymentConfig.$name = name;
+ var found = false;
+ angular.forEach(deploymentConfig.triggers, (trigger) => {
+ var type = trigger.type;
+ if (!deploymentConfig.$imageChangeParams && type === "ImageChange") {
+ var imageChangeParams = trigger.imageChangeParams;
+ if (imageChangeParams) {
+ var containerNames = imageChangeParams.containerNames || [];
+ imageChangeParams.$containerNames = containerNames.join(" ");
+ deploymentConfig.$imageChangeParams = imageChangeParams;
+ }
+ }
+ });
+ }
+ }
+
+ export function enrichDeploymentConfigs(deploymentConfigs) {
+ angular.forEach(deploymentConfigs, (deploymentConfig) => {
+ enrichDeploymentConfig(deploymentConfig);
+ });
+ return deploymentConfigs;
+ }
+
+
+ export function enrichEvent(event) {
+ if (event) {
+ var metadata = event.metadata || {};
+
+ var firstTimestamp = event.firstTimestamp;
+ if (firstTimestamp) {
+ var d = new Date(firstTimestamp);
+ event.$firstTimestamp = d;
+ }
+ var lastTimestamp = event.lastTimestamp;
+ if (lastTimestamp) {
+ var d = new Date(lastTimestamp);
+ event.$lastTimestamp = d;
+ }
+ var labels = angular.copy(event.source || {});
+ var involvedObject = event.involvedObject || {};
+ var name = involvedObject.name;
+ var kind = involvedObject.kind;
+ if (name) {
+ labels['name'] = name;
+ }
+ if (kind) {
+ labels['kind'] = kind;
+ }
+ event.$labelsText = Kubernetes.labelsToString(labels);
+
+ }
+ }
+
+ export function enrichEvents(events, model = null) {
+ angular.forEach(events, (event) => {
+ enrichEvent(event);
+ });
+
+ // lets update links to the events for each pod and RC
+ if (model) {
+ function clearEvents(entity) {
+ entity.$events = [];
+ entity.$eventsLink = null;
+ entity.$eventCount = 0;
+ }
+
+ function updateEvent(entity, event) {
+ if (entity) {
+ entity.$events.push(event);
+ if (!entity.$eventsLink) {
+ entity.$eventsLink = UrlHelpers.join("/kubernetes/namespace/", currentKubernetesNamespace(), "events") + "?q=kind%3D" + entity.kind + "%20name%3D" + entity.metadata.name;
+ }
+ entity.$eventCount = entity.$events.length;
+ }
+ }
+
+ var pods = model.pods || [];
+ var rcs = model.replicationControllers || [];
+ angular.forEach(pods, clearEvents);
+ angular.forEach(rcs, clearEvents);
+
+ angular.forEach(events, (event) => {
+ var involvedObject = event.involvedObject || {};
+ var name = involvedObject.name;
+ var kind = involvedObject.kind;
+ var ns = model.currentNamespace();
+ if (name && kind && ns) {
+ var entity = null;
+ if (kind === "ReplicationController") {
+ entity = model.getReplicationController(ns, name);
+ } else if (kind === "Pod") {
+ entity = model.getPod(ns, name);
+ }
+ if (entity) {
+ updateEvent(entity, event);
+ }
+ }
+ });
+ }
+ return events;
+ }
+
+ export function enrichImageRepository(imageRepository) {
+ if (imageRepository) {
+ var triggerUrl:string = null;
+ var name = Core.pathGet(imageRepository, ["metadata", "name"]);
+ imageRepository.$name = name;
+ }
+ }
+
+ export function enrichImageRepositories(imageRepositories) {
+ angular.forEach(imageRepositories, (imageRepository) => {
+ enrichImageRepository(imageRepository);
+ });
+ return imageRepositories;
+ }
+
+
+ var labelColors = {
+ 'batch': 'k8s-badge-batch',
+ 'region': 'k8s-badge-region',
+ 'type': 'k8s-badge-type',
+ 'system': 'k8s-badge-system',
+ 'isTarget': 'k8s-badge-target'
+ };
+
+ export function containerLabelClass(labelType:string) {
+ if (!(labelType in labelColors)) {
+ return 'mouse-pointer';
+ }
+ else return labelColors[labelType] + ' mouse-pointer';
+ }
+
+
+ /**
+ * Returns true if the fabric8 forge plugin is enabled
+ */
+ export function isForgeEnabled() {
+ // TODO should return true if the service "fabric8-forge" is valid
+ return true;
+ }
+
+ /**
+ * Returns the current kubernetes selected namespace or the default one
+ */
+ export function currentKubernetesNamespace() {
+ var injector = HawtioCore.injector;
+ if (injector) {
+ var KubernetesState = injector.get("KubernetesState") || {};
+ return KubernetesState.selectedNamespace || defaultNamespace;
+ }
+ return defaultNamespace;
+ }
+
+ export function setCurrentKubernetesNamespace(ns) {
+ if (ns) {
+ var KubernetesState = inject("KubernetesState") || {};
+ KubernetesState.selectedNamespace = ns;
+ }
+ }
+
+ /**
+ * Configures the json schema
+ */
+ export function configureSchema() {
+ angular.forEach(schema.definitions, (definition, name) => {
+ var properties = definition.properties;
+ if (properties) {
+ var hideProperties = ["creationTimestamp", "kind", "apiVersion", "annotations", "additionalProperties", "namespace", "resourceVersion", "selfLink", "uid"];
+ angular.forEach(hideProperties, (propertyName) => {
+ var property = properties[propertyName];
+ if (property) {
+ property["hidden"] = true;
+ }
+ });
+ angular.forEach(properties, (property, propertyName) => {
+ var ref = property["$ref"];
+ var type = property["type"];
+ if (ref && (!type || type === "object")) {
+ property["type"] = ref;
+ }
+ if (type === "array") {
+ var items = property["items"];
+ if (items) {
+ var ref = items["$ref"];
+ var type = items["type"];
+ if (ref && (!type || type === "object")) {
+ items["type"] = ref;
+ }
+ }
+ }
+ });
+ }
+
+ schema.definitions.os_build_WebHookTrigger.properties.secret.type = "password";
+ })
+ }
+
+ /**
+ * Lets remove any enriched data to leave the original json intact
+ */
+ export function unenrich(item) {
+ var o = _.cloneDeep(item);
+ angular.forEach(o, (value, key) => {
+ if (key.startsWith("$") || key.startsWith("_")) {
+ delete o[key];
+ }
+ });
+ delete o['connectTo'];
+ return o;
+ }
+
+ /**
+ * Returns the unenriched JSON representation of an object
+ */
+ export function toRawJson(item) {
+ var o = unenrich(item);
+ return JSON.stringify(o, null, 2); // spacing level = 2
+ }
+
+ /**
+ * Returns the unenriched YAML representation of an object
+ */
+ export function toRawYaml(item) {
+ var o = unenrich(item);
+ return jsyaml.dump(o, { indent: 2 });
+ }
+
+
+ export function watch($scope: any, $element: any, kind, ns, fn, labelSelector = null) {
+ var connection = KubernetesAPI.watch({
+ kind: kind,
+ namespace: ns,
+ labelSelector: labelSelector,
+ success: function (objects) {
+ fn(objects);
+ Core.$apply($scope);
+ }
+ });
+ $element.on('$destroy', () => {
+ console.log("Static controller[" + kind + ", " + ns + "] element destroyed");
+ $scope.$destroy();
+ });
+ $scope.$on('$destroy', () => {
+ console.log("Static controller[" + kind + ", " + ns + "] scope destroyed");
+ connection.disconnect();
+ });
+ var oldDeleteScopeFn = $scope.deleteScope;
+ $scope.deleteScope = function () {
+ $element.remove();
+ if (angular.isFunction(oldDeleteScopeFn)) {
+ oldDeleteScopeFn();
+ }
+ }
+ }
+
+ export function createKubernetesClient(kind, ns = null) {
+ var K8SClientFactory = inject("K8SClientFactory");
+ if (!K8SClientFactory) {
+ log.warn("Could not find injected K8SClientFactory!");
+ return null;
+ }
+ if (kind === "projects" || kind === "namespaces") {
+ ns = null;
+ } else if (!ns) {
+ ns = Kubernetes.currentKubernetesNamespace();
+ }
+ return K8SClientFactory.create(kind, ns);
+ }
+
+
+ export function currentUserName() {
+ var userDetails = HawtioOAuth.getUserProfile();
+ var answer = null;
+ if (userDetails) {
+ answer = getName(userDetails);
+ }
+ return answer || "admin";
+ }
+
+ export function createNamespace(ns, client?) {
+ if (!client) {
+ client = isOpenShift ? Kubernetes.createKubernetesClient('projects') : Kubernetes.createKubernetesClient('namespaces');
+ }
+ if (ns && ns !== currentKubernetesNamespace()) {
+ var object = {
+ apiVersion: Kubernetes.defaultApiVersion,
+ kind: isOpenShift ? 'Project' : 'Namespace',
+ metadata: {
+ name: ns,
+ labels: {
+ }
+ }
+ };
+ client.put(object,
+ (data) => {
+ log.info("Created namespace: " + ns)
+ },
+ (err) => {
+ log.warn("Failed to create namespace: " + ns + ": " + angular.toJson(err));
+ });
+ }
+ }
+
+ export function createRC(obj, onCompleteFn = null){
+ var client = Kubernetes.createKubernetesClient('replicationcontrollers','default');
+ var RCTemplate = new resourceRCTemplate();
+ var rcTemplate = RCTemplate.createRC(obj);
+ console.log(JSON.stringify(rcTemplate));
+ client.put(rcTemplate, function(obj) {
+ console.log("Created: ", obj);
+ if (angular.isFunction(onCompleteFn)) {
+ onCompleteFn(obj);
+ }
+ });
+ }
+
+ export function connectOracle($http, $timeout, url, operation, rcName, delayTime){
+ $timeout(() => {
+ $http({
+ url: url,
+ method:'POST',
+ params:{oracleName: rcName, operation: operation}
+ }).success(function(data,header,config,status){
+ console.log("success");
+ }).error(function(data,header,config,status){
+ //log.warn("Failed to connect " + connectParam + " " + data + " " + status);
+ });
+ }, delayTime);
+ }
+
+ export function getOracleStatus(labels){
+ var answer = -1;
+ if(typeof(labels) === 'object' && labels.hasOwnProperty("status")){
+ switch(labels.status){
+ case '0':
+ answer = 0;
+ break;
+ case '1':
+ answer = 1;
+ break;
+ case '2':
+ answer = 2;
+ break;
+ default:
+ answer = -1;
+ }
+ }
+ return answer;
+ }
+
+ export function getExtractStatus(labels){
+ if(labels.isTarget === 'false'){
+ return parseInt(labels.isExtract);
+ }else{
+ return 10;
+ }
+ }
+
+ export function getOracleName(name:string):string {
+ var results = name.split("-");
+ if(results.length === 2){
+ return "汇总数据库" + "(" +results[1] + ")";
+ }else if(results.length === 3){
+ return Kubernetes.getCountyByCode(results[0]) + "_" + Kubernetes.getSystemNameById(results[1]);
+ }else{
+ return name;
+ }
+ }
+
+ export function extractDataToOracle($http, selectedReplicationControllers, targetReplicationController){
+ //console.log(targetReplicationController.length);
+ if(selectedReplicationControllers.length ===1 && (getName(selectedReplicationControllers[0]) === getName(targetReplicationController))){
+ alert("您选择的数据库中不包含需要汇总的数据库,导致汇总操作失败,请重新选择!");
+ return;
+ }
+ var answer = checkoutOracleRCIsRunning(targetReplicationController) && targetReplicationController;
+ var oracleConnectParam = [{
+ OracleName: getName(targetReplicationController),
+ connectHost: getHost(targetReplicationController.$pods[0]),
+ connectPort: targetReplicationController.$pods[0].spec.containers[0].ports[0].hostPort,
+ isTarget: true
+ }];
+ selectedReplicationControllers.forEach((rc) => {
+ if(getName(rc) !== getName(targetReplicationController)){
+ answer = answer && checkoutOracleRCIsRunning(rc);
+ oracleConnectParam.push({
+ "OracleName": getName(rc),
+ "connectHost": getHost(rc.$pods[0]),
+ "connectPort": rc.$pods[0].spec.containers[0].ports[0].hostPort,
+ "isTarget": false
+ });
+ }
+ });
+
+ if(answer){
+ $http({
+ url: '/extractOracleData',
+ dataType: 'json',
+ method:'POST',
+ params:{param: oracleConnectParam}
+ }).success(function(data,header,config,status){
+ console.log("success");
+ }).error(function(data,header,config,status){
+ //log.warn("Failed to connect " + connectParam + " " + data + " " + status);
+ });
+ }else{
+ alert("您选择的汇总数据库或需要汇总的数据库中存在未启动成功的数据库,导致汇总操作失败,请重新选择!");
+ }
+ }
+
+ export function checkoutOracleRCIsRunning(rc){
+ if(rc.$podCounters.ready && rc.$oracleStatus == 2){
+ return true
+ }else{
+ return false;
+ }
+ }
+
+ export function replicasIsCreated (replicationcontrollers:Array, name:string){
+ var result = false;
+ if( replicationcontrollers !=null || replicationcontrollers.length<=0){
+ for(var i=0; i;
- selectedNamespace: string;
- }
-
- export class WatchTypes {
- public static get ENDPOINTS():string { return "endpoints"; }
- public static get EVENTS():string { return "events"; }
- public static get NAMESPACES():string { return "namespaces"; }
- public static get NODES():string { return "nodes"; }
- public static get PERSISTENT_VOLUMES():string { return "persistentvolumes"; }
- public static get PERSISTENT_VOLUME_CLAIMS():string { return "persistentvolumeclaims"; }
- public static get PODS():string { return "pods"; }
- public static get REPLICATION_CONTROLLERS():string { return "replicationcontrollers"; }
- public static get RESOURCE_QUOTAS():string { return "resourcequotas"; }
- public static get OAUTH_CLIENTS():string { return "oauthclients"; }
- public static get SECRETS():string { return "secrets"; }
- public static get SERVICES():string { return "services"; }
- public static get SERVICE_ACCOUNTS():string { return "serviceaccounts"; }
-
- public static get TEMPLATES():string { return "templates"; }
- public static get ROUTES():string { return "routes"; }
- public static get BUILD_CONFIGS():string { return "buildconfigs"; }
- public static get BUILDS():string { return "builds"; }
- public static get DEPLOYMENT_CONFIGS():string { return "deploymentconfigs"; }
- public static get IMAGE_STREAMS():string { return "imagestreams"; }
- public static get POLICIES():string { return "policies"; }
- public static get POLICY_BINDINGS():string { return "policybindings"; }
- public static get PROJECTS():string { return "projects"; }
- public static get ROLE_BINDINGS():string { return "rolebindings"; }
- public static get ROLES():string { return "roles"; }
- }
-
- export class NamespacedTypes {
- public static get k8sTypes():Array {
- return [
- WatchTypes.ENDPOINTS,
- WatchTypes.EVENTS,
- WatchTypes.NODES,
- WatchTypes.PERSISTENT_VOLUMES,
- WatchTypes.PERSISTENT_VOLUME_CLAIMS,
- WatchTypes.PODS,
- WatchTypes.REPLICATION_CONTROLLERS,
- WatchTypes.RESOURCE_QUOTAS,
- WatchTypes.PERSISTENT_VOLUMES,
- WatchTypes.SECRETS,
- WatchTypes.SERVICES,
- WatchTypes.SERVICE_ACCOUNTS
- ];
- }
- public static get osTypes():Array {
- return [
- WatchTypes.TEMPLATES,
- WatchTypes.BUILD_CONFIGS,
- WatchTypes.ROUTES,
- WatchTypes.BUILDS,
- WatchTypes.BUILD_CONFIGS,
- WatchTypes.DEPLOYMENT_CONFIGS,
- WatchTypes.IMAGE_STREAMS,
- WatchTypes.OAUTH_CLIENTS,
- WatchTypes.POLICIES,
- WatchTypes.POLICY_BINDINGS,
- WatchTypes.PROJECTS,
- //WatchTypes.ROLE_BINDINGS,
- //WatchTypes.ROLES
- ];
- }
- }
-
- export class WatchActions {
- public static get ANY():string { return "*"; }
- public static get ADDED():string { return "ADDED"; }
- public static get MODIFIED():string { return "MODIFIED"; }
- public static get DELETED():string { return "DELETED"; }
- }
-
- export interface ObjectMap {
- [uid:string]: any;
- }
-
- export interface WatcherService {
- hasWebSocket: boolean;
- addCustomizer: (type: string, customizer: (obj:any) => void) => void;
- getTypes: () => Array;
- getNamespace: () => string;
- setNamespace: (namespace: string) => void;
- getObjects: (type: string) => Array;
- getObjectMap: (type: string) => ObjectMap;
- addAction: (type: string, action: string, fn: (obj:any) => void) => void;
- registerListener: (fn:(objects:ObjectMap) => void) => void;
- registerCustomUrlFunction: (kind:string, url:(kind:string) => string) => void;
- }
-
- export interface KubePod {
- id:string;
- namespace:string;
- }
-
-
-}
+module Kubernetes {
+
+ export class consts {
+ get NAMESPACE_STORAGE_KEY():string { return "k8sSelectedNamespace"; }
+ }
+
+ export var Constants = new consts();
+
+ export interface ApiLocation {
+ proto?:string;
+ hostPort:string;
+ prefix:string;
+ }
+
+ export interface ApiLocations {
+ openshift?: ApiLocation;
+ k8s?: ApiLocation;
+ }
+
+ export interface KubernetesConfig {
+ master_uri?: string;
+ api?: ApiLocations;
+ openshift?: OpenShiftOAuthConfig;
+ google?: GoogleOAuthConfig;
+ keycloak?: KeyCloakAuthConfig;
+ }
+
+ export interface OpenShiftOAuthConfig {
+ oauth_authorize_uri:string;
+ oauth_client_id:string;
+ }
+
+ export interface GoogleOAuthConfig {
+ authenticationURI:string;
+ authorizationURI:string;
+ clientId:string;
+ clientSecret:string;
+ redirectURI:string;
+ scope:string;
+ tokenURI?:string;
+ }
+
+ export interface KeyCloakAuthConfig {
+ oauth_authorize_uri:string;
+ oauth_client_id:string;
+ }
+
+ export interface KubernetesState {
+ namespaces: Array;
+ selectedNamespace: string;
+ }
+
+ export class WatchTypes {
+ public static get ENDPOINTS():string { return "endpoints"; }
+ public static get EVENTS():string { return "events"; }
+ public static get NAMESPACES():string { return "namespaces"; }
+ public static get NODES():string { return "nodes"; }
+ public static get PERSISTENT_VOLUMES():string { return "persistentvolumes"; }
+ public static get PERSISTENT_VOLUME_CLAIMS():string { return "persistentvolumeclaims"; }
+ public static get PODS():string { return "pods"; }
+ public static get REPLICATION_CONTROLLERS():string { return "replicationcontrollers"; }
+ public static get RESOURCE_QUOTAS():string { return "resourcequotas"; }
+ public static get OAUTH_CLIENTS():string { return "oauthclients"; }
+ public static get SECRETS():string { return "secrets"; }
+ public static get SERVICES():string { return "services"; }
+ public static get SERVICE_ACCOUNTS():string { return "serviceaccounts"; }
+
+ public static get TEMPLATES():string { return "templates"; }
+ public static get ROUTES():string { return "routes"; }
+ public static get BUILD_CONFIGS():string { return "buildconfigs"; }
+ public static get BUILDS():string { return "builds"; }
+ public static get DEPLOYMENT_CONFIGS():string { return "deploymentconfigs"; }
+ public static get IMAGE_STREAMS():string { return "imagestreams"; }
+ public static get POLICIES():string { return "policies"; }
+ public static get POLICY_BINDINGS():string { return "policybindings"; }
+ public static get PROJECTS():string { return "projects"; }
+ public static get ROLE_BINDINGS():string { return "rolebindings"; }
+ public static get ROLES():string { return "roles"; }
+ }
+
+ export class NamespacedTypes {
+ public static get k8sTypes():Array {
+ return [
+ WatchTypes.ENDPOINTS,
+ WatchTypes.EVENTS,
+ WatchTypes.NODES,
+ WatchTypes.PERSISTENT_VOLUMES,
+ WatchTypes.PERSISTENT_VOLUME_CLAIMS,
+ WatchTypes.PODS,
+ WatchTypes.REPLICATION_CONTROLLERS,
+ WatchTypes.RESOURCE_QUOTAS,
+ WatchTypes.PERSISTENT_VOLUMES,
+ WatchTypes.SECRETS,
+ WatchTypes.SERVICES,
+ WatchTypes.SERVICE_ACCOUNTS
+ ];
+ }
+ public static get osTypes():Array {
+ return [
+ WatchTypes.TEMPLATES,
+ WatchTypes.BUILD_CONFIGS,
+ WatchTypes.ROUTES,
+ WatchTypes.BUILDS,
+ WatchTypes.BUILD_CONFIGS,
+ WatchTypes.DEPLOYMENT_CONFIGS,
+ WatchTypes.IMAGE_STREAMS,
+ WatchTypes.OAUTH_CLIENTS,
+ WatchTypes.POLICIES,
+ WatchTypes.POLICY_BINDINGS,
+ WatchTypes.PROJECTS,
+ //WatchTypes.ROLE_BINDINGS,
+ //WatchTypes.ROLES
+ ];
+ }
+ }
+
+ export class WatchActions {
+ public static get ANY():string { return "*"; }
+ public static get ADDED():string { return "ADDED"; }
+ public static get MODIFIED():string { return "MODIFIED"; }
+ public static get DELETED():string { return "DELETED"; }
+ }
+
+ export interface ObjectMap {
+ [uid:string]: any;
+ }
+
+ export interface WatcherService {
+ hasWebSocket: boolean;
+ addCustomizer: (type: string, customizer: (obj:any) => void) => void;
+ getTypes: () => Array;
+ getNamespace: () => string;
+ setNamespace: (namespace: string) => void;
+ getObjects: (type: string) => Array;
+ getObjectMap: (type: string) => ObjectMap;
+ addAction: (type: string, action: string, fn: (obj:any) => void) => void;
+ registerListener: (fn:(objects:ObjectMap) => void) => void;
+ registerCustomUrlFunction: (kind:string, url:(kind:string) => string) => void;
+ }
+
+ export interface KubePod {
+ id:string;
+ namespace:string;
+ }
+
+
+}
diff --git a/plugins/kubernetes/ts/kubernetesModel.ts b/plugins/kubernetes/ts/kubernetesModel.ts
index d1d7770..3b71f8e 100644
--- a/plugins/kubernetes/ts/kubernetesModel.ts
+++ b/plugins/kubernetes/ts/kubernetesModel.ts
@@ -1,783 +1,783 @@
-///
-///
-
-module Kubernetes {
-
- export var FABRIC8_PROJECT_JSON = "fabric8ProjectJson";
-
- function byId(thing) {
- return thing.id;
- }
-
- function createKey(namespace, id, kind) {
- return (namespace || "") + "-" + (kind || 'undefined').toLowerCase() + '-' + (id || 'undefined').replace(/\./g, '-');
- }
-
- function populateKey(item) {
- var result = item;
- result['_key'] = createKey(getNamespace(item), getName(item), getKind(item));
- return result;
- }
-
- function populateKeys(items:Array) {
- var result = [];
- angular.forEach(items, (item) => {
- result.push(populateKey(item));
- });
- return result;
- }
-
- function selectPods(pods, namespace, labels) {
- return pods.filter((pod) => {
- return getNamespace(pod) === namespace && selectorMatches(labels, getLabels(pod));
- });
- }
-
- /**
- * The object which keeps track of all the pods, replication controllers, services and their associations
- */
- export class KubernetesModelService {
- public kubernetes = null;
- public apps = [];
- public services = [];
-
- public replicationcontrollers = [];
-
- public filterReplicationcontrollers = [];
-
- /*public get filterReplicationcontrollers():Array {
- return this.filterReplicationcontrollers;
- }
-
- public set filterReplicationcontrollers(filterReplicationcontrollers:Array) {
- this.filterReplicationcontrollers = filterReplicationcontrollers;
- }*/
-
- public get replicationControllers():Array {
- return this.replicationcontrollers;
- }
- public set replicationControllers(replicationControllers:Array) {
- this.replicationcontrollers = replicationControllers;
- }
- public pods = [];
- public hosts = [];
- public get namespaces():Array {
- return this.kubernetes.namespaces;
- }
- //public namespaces = [];
- public routes = [];
- public templates = [];
- public redraw = false;
- public resourceVersions = {};
-
- // various views on the data
- public podsByHost = {};
- public servicesByKey = {};
- public replicationControllersByKey = {};
- public podsByKey = {};
-
- public appInfos = [];
- public appViews = [];
- public appFolders = [];
-
- public fetched = false;
- public get showRunButton():boolean {
- if (isOpenShift) {
- return true;
- }
- return _.any(this.services, (service) => {
- var name = getName(service);
- if (name === "templates") {
- var podCounters = service.$podCounters;
- return podCounters && (podCounters.valid || podCounters.ready);
- } else {
- return false;
- }
- });
- }
-
- public buildconfigs = [];
- public events = [];
- public workspaces = [];
- public projects = [];
- public project = null;
-
- public get serviceApps():Array {
- return _.filter(this.services, (s) => {
- return s.$host && s.$serviceUrl && s.$podCount
- });
- }
-
- public $keepPolling() {
- return keepPollingModel;
- }
-
- public orRedraw(flag) {
- this.redraw = this.redraw || flag;
- }
-
- public getService(namespace, id) {
- return this.servicesByKey[createKey(namespace, id, 'service')];
- }
-
- public getReplicationController(namespace, id) {
- return this.replicationControllersByKey[createKey(namespace, id, 'replicationController')];
- }
-
- public getPod(namespace, id) {
- return this.podsByKey[createKey(namespace, id, 'pod')];
- }
-
- public podsForNamespace(namespace = this.currentNamespace()) {
- return _.filter(this.pods, { namespace: namespace });
- }
-
- public getBuildConfig(name) {
- return _.find(this.buildconfigs, { $name: name });
- }
-
- public getProject(name, ns = this.currentNamespace()) {
- var buildConfig = this.project;
- if (!buildConfig) {
- var text = localStorage[FABRIC8_PROJECT_JSON];
- if (text) {
- try {
- buildConfig = angular.fromJson(text);
- } catch (e) {
- log.warn("Could not parse json for " + FABRIC8_PROJECT_JSON + ". Was: " + text + ". " + e, e);
- }
- }
- }
- if (buildConfig && ns != getNamespace(buildConfig) && name != buildConfig.$name) {
- buildConfig = this.getBuildConfig(name);
- }
- return buildConfig;
- }
-
-
- public setProject(buildConfig) {
- this.project = buildConfig;
- if (buildConfig) {
- // lets store in local storage
- var localStorage = inject("localStorage");
- if (localStorage) {
- localStorage[FABRIC8_PROJECT_JSON] = angular.toJson(buildConfig);
- }
- }
- }
-
- /**
- * Returns the current selected namespace or the default namespace
- */
- public currentNamespace() {
- var answer = null;
- if (this.kubernetes) {
- answer = this.kubernetes.selectedNamespace;
- }
- return answer || defaultNamespace;
- }
-
- protected updateIconUrlAndAppInfo(entity, nameField: string) {
- var answer = null;
- var id = getName(entity);
- entity.$iconUrl = Core.pathGet(entity, ['metadata', 'annotations', 'fabric8.' + id + '/iconUrl']);
- entity.$info = Core.pathGet(entity, ['metadata', 'annotations', 'fabric8.' + id + '/summary']);
- if (entity.$iconUrl) {
- return;
- }
- if (id && nameField) {
- (this.templates || []).forEach((template) => {
- var metadata = template.metadata;
- if (metadata) {
- var annotations = metadata.annotations || {};
- var iconUrl = annotations["fabric8." + id + "/iconUrl"] || annotations["fabric8/iconUrl"];
- if (iconUrl) {
- (template.objects || []).forEach((item) => {
- var entityName = getName(item);
- if (id === entityName) {
- entity.$iconUrl = iconUrl;
- }
- });
- }
- }
- });
- (this.appInfos || []).forEach((appInfo) => {
- var iconPath = appInfo.iconPath;
- if (iconPath && !answer && iconPath !== "null") {
- var iconUrl = gitPathToUrl(iconPath);
- var ids = Core.pathGet(appInfo, ["names", nameField]);
- angular.forEach(ids, (appId) => {
- if (appId === id) {
- entity.$iconUrl = iconUrl;
- entity.appPath = appInfo.appPath;
- entity.$info = appInfo;
- }
- });
- }
- });
- }
- if (!entity.$iconUrl) {
- entity.$iconUrl = defaultIconUrl;
- }
- }
-
- public maybeInit() {
- this.fetched = true;
- this.servicesByKey = {};
- this.podsByKey = {};
- this.replicationControllersByKey = {};
-
- this.pods.forEach((pod) => {
- if (!pod.kind) pod.kind = "Pod";
- this.podsByKey[pod._key] = pod;
- var host = getHost(pod);
- pod.$labelsText = Kubernetes.labelsToString(getLabels(pod));
- if (host) {
- pod.$labelsText += labelFilterTextSeparator + "host=" + host;
- }
- pod.$iconUrl = defaultIconUrl;
- this.discoverPodConnections(pod);
- pod.$containerPorts = [];
-
- var podStatus = pod.status || {};
- var startTime = podStatus.startTime;
- pod.$startTime = null;
- if (startTime) {
- pod.$startTime = new Date(startTime);
- }
- var createdTime = getCreationTimestamp(pod);
- pod.$createdTime = null;
- pod.$age = null;
- if (createdTime) {
- pod.$createdTime = new Date(createdTime);
- pod.$age = humandate.relativeTime(pod.$createdTime);
- }
- var ready = isReady(pod);
- pod.$ready = ready;
- pod.$statusCss = statusTextToCssClass(podStatus.phase, ready);
-
- var maxRestartCount = 0;
- angular.forEach(Core.pathGet(pod, ["status", "containerStatuses"]), (status) => {
- var restartCount = status.restartCount;
- if (restartCount) {
- if (restartCount > maxRestartCount) {
- maxRestartCount = restartCount;
- }
- }
- });
- if (maxRestartCount ) {
- pod.$restartCount = maxRestartCount;
- }
- var imageNames = "";
- angular.forEach(Core.pathGet(pod, ["spec", "containers"]), (container) => {
- var image = container.image;
- if (image) {
- if (!imageNames) {
- imageNames = image;
- } else {
- imageNames = imageNames + " " + image;
- }
- var idx = image.lastIndexOf(":");
- if (idx > 0) {
- image = image.substring(0, idx);
- }
- var paths = image.split("/", 3);
- if (paths.length) {
- var answer = null;
- if (paths.length == 3) {
- answer = paths[1] + "/" + paths[2];
- } else if (paths.length == 2) {
- answer = paths[0] + "/" + paths[1];
- } else {
- answer = paths[0] + "/" + paths[1];
- }
- container.$imageLink = UrlHelpers.join("https://registry.hub.docker.com/u/", answer);
- }
- }
- angular.forEach(container.ports, (port) => {
- var containerPort = port.containerPort;
- if (containerPort) {
- pod.$containerPorts.push(containerPort);
- }
- });
- });
- pod.$imageNames = imageNames;
- var podStatus = podStatus;
- var podSpec = (pod.spec || {});
- pod.$podIP = podStatus.podIP;
- pod.$host = podSpec.host || podSpec.nodeName || podStatus.hostIP;
- });
-
- this.services.forEach((service) => {
- if (!service.kind) service.kind = "Service";
- this.servicesByKey[service._key] = service;
- var selector = getSelector(service);
- service.$pods = [];
- if (!service.$podCounters) {
- service.$podCounters = {};
- }
- var podLinkUrl = UrlHelpers.join("/kubernetes/namespace", service.metadata.namespace, "pods");
- _.assign(service.$podCounters, selector ? createPodCounters(selector, this.pods, service.$pods, Kubernetes.labelsToString(selector, ","), podLinkUrl) : {});
- service.$podCount = service.$pods.length;
-
- var selectedPods = service.$pods;
- service.connectTo = selectedPods.map((pod) => {
- return pod._key;
- }).join(',');
- service.$labelsText = Kubernetes.labelsToString(getLabels(service));
- this.updateIconUrlAndAppInfo(service, "serviceNames");
- var spec = service.spec || {};
- service.$portalIP = spec.portalIP;
- service.$selectorText = Kubernetes.labelsToString(spec.selector);
- var ports = _.map(spec.ports || [], "port");
- service.$ports = ports;
- service.$portsText = ports.join(", ");
- var iconUrl = service.$iconUrl;
- if (iconUrl && selectedPods) {
- selectedPods.forEach((pod) => {
- pod.$iconUrl = iconUrl;
- });
- }
- service.$serviceUrl = serviceLinkUrl(service);
- });
-
- this.replicationControllers.forEach((replicationController) => {
- if (!replicationController.kind) replicationController.kind = "ReplicationController";
- this.replicationControllersByKey[replicationController._key] = replicationController
- var selector = getSelector(replicationController);
- replicationController.$pods = [];
-
- if(isFilterRC(replicationController) && !isInclude(this.filterReplicationcontrollers, replicationController))
- this.filterReplicationcontrollers.push(replicationController);
-
- replicationController.$podCounters = selector ? createPodCounters(selector, this.pods, replicationController.$pods) : null;
- replicationController.$podCount = replicationController.$pods.length;
- replicationController.$replicas = (replicationController.spec || {}).replicas;
-
- replicationController.$oracleName = getOracleName(getName(replicationController));
- //console.log(getName(replicationController));
- replicationController.$oracleStatus = getOracleStatus(getLabels(replicationController));
- replicationController.$extractStatus = getExtractStatus(getLabels(replicationController));
-
-
- var selectedPods = replicationController.$pods;
- replicationController.connectTo = selectedPods.map((pod) => {
- return pod._key;
- }).join(',');
- replicationController.$labelsText = Kubernetes.labelsToString(getLabels(replicationController));
- replicationController.metadata.labels = Kubernetes.labelToChinese(getLabels(replicationController));
- this.updateIconUrlAndAppInfo(replicationController, "replicationControllerNames");
- var iconUrl = replicationController.$iconUrl;
- if (iconUrl && selectedPods) {
- selectedPods.forEach((pod) => {
- pod.$iconUrl = iconUrl;
- });
- }
- });
-
- // services may not map to an icon but their pods may do via the RC
- // so lets default it...
- this.services.forEach((service) => {
- var iconUrl = service.$iconUrl;
- var selectedPods = service.$pods;
- if (selectedPods) {
- if (!iconUrl || iconUrl === defaultIconUrl) {
- iconUrl = null;
- selectedPods.forEach((pod) => {
- if (!iconUrl) {
- iconUrl = pod.$iconUrl;
- if (iconUrl) {
- service.$iconUrl = iconUrl;
- }
- }
- });
- }
- }
- });
-
- this.updateApps();
-
- var podsByHost = {};
- this.pods.forEach((pod) => {
- var host = getHost(pod);
- var podsForHost = podsByHost[host];
- if (!podsForHost) {
- podsForHost = [];
- podsByHost[host] = podsForHost;
- }
- podsForHost.push(pod);
- });
- this.podsByHost = podsByHost;
-
- var tmpHosts = [];
- for (var hostKey in podsByHost) {
- var hostPods = [];
- var podCounters = createPodCounters((pod) => getHost(pod) === hostKey, this.pods, hostPods, "host=" + hostKey);
- var hostIP = null;
- if (hostPods.length) {
- var pod = hostPods[0];
- var currentState = pod.status;
- if (currentState) {
- hostIP = currentState.hostIP;
- }
- }
- var hostDetails = {
- name: hostKey,
- id: hostKey,
- elementId: hostKey.replace(/\./g, '_'),
- hostIP: hostIP,
- pods: hostPods,
- kind: "Host",
- $podCounters: podCounters,
- $iconUrl: hostIconUrl
- };
- tmpHosts.push(hostDetails);
- }
-
- this.hosts = tmpHosts;
-
- enrichBuildConfigs(this.buildconfigs);
- enrichEvents(this.events, this);
- }
-
- protected updateApps() {
- try {
- // lets create the app views by trying to join controllers / services / pods that are related
- var appViews = [];
-
- this.replicationControllers.forEach((replicationController) => {
- var name = getName(replicationController);
- var $iconUrl = replicationController.$iconUrl;
- appViews.push({
- appPath: "/dummyPath/" + name,
- $name: name,
- $info: {
- $iconUrl: $iconUrl
- },
- $iconUrl: $iconUrl,
- replicationControllers: [replicationController],
- pods: replicationController.$pods || [],
- services: []
- });
- });
-
- var noMatches = [];
- this.services.forEach((service) => {
- // now lets see if we can find an app with an RC of the same selector
- var matchesApp = null;
- appViews.forEach((appView) => {
- appView.replicationControllers.forEach((replicationController) => {
- var repSelector = getSelector(replicationController);
- if (repSelector &&
- selectorMatches(repSelector, getSelector(service)) &&
- getNamespace(service) === getNamespace(replicationController)) {
- matchesApp = appView;
- }
- });
- });
-
- if (matchesApp) {
- matchesApp.services.push(service);
- } else {
- noMatches.push(service);
- }
- });
- log.debug("no matches: ", noMatches);
- noMatches.forEach((service) => {
- var appView = _.find(appViews, (appView) => {
- return _.any(appView.replicationControllers, (rc) => {
- return _.startsWith(getName(rc), getName(service));
- });
- });
- if (appView) {
- appView.services.push(service);
- } else {
- var $iconUrl = service.$iconUrl;
- appViews.push({
- appPath: "/dummyPath/" + name,
- $name: name,
- $info: {
- $iconUrl: $iconUrl
- },
- $iconUrl: $iconUrl,
- replicationControllers: [],
- pods: service.$pods || [],
- services: [service]
- });
- }
- });
-
- angular.forEach(this.routes, (route) => {
- var metadata = route.metadata || {};
- var spec = route.spec || {};
- var serviceName = Core.pathGet(spec, ["to", "name"]);
- var host = spec.host;
- var namespace = getNamespace(route);
- if (serviceName && host) {
- var service = this.getService(namespace, serviceName);
- if (service) {
- service.$host = host;
-
- // TODO we could use some annotations / metadata to deduce what URL we should use to open this
- // service in the console. For now just assume its http:
-
- if (host) {
- var hostUrl = host;
- if (hostUrl.indexOf("://") < 0) {
- hostUrl = "http://" + host;
- }
- service.$connectUrl = UrlHelpers.join(hostUrl, "/");
- }
-
- // TODO definitely need that annotation, temp hack for apiman link
- if (getName(service) === 'apiman' && host) {
- service.$connectUrl = ( new URI().host(service.$host)
- .path('apimanui/index.html'))
- .query({})
- .hash(URI.encode(angular.toJson({
- backTo: new URI().toString(),
- token: HawtioOAuth.getOAuthToken()
- }))).toString();
-
- }
- } else {
- log.debug("Could not find service " + serviceName + " namespace " + namespace + " for route: " + metadata.name);
- }
- }
- });
-
- appViews = _.sortBy(populateKeys(appViews), (appView) => appView._key);
-
- ArrayHelpers.sync(this.appViews, appViews, '$name');
-
- if (this.appInfos && this.appViews) {
- var folderMap = {};
- var folders = [];
- var appMap = {};
- angular.forEach(this.appInfos, (appInfo) => {
- if (!appInfo.$iconUrl && appInfo.iconPath && appInfo.iconPath !== "null") {
- appInfo.$iconUrl = gitPathToUrl(appInfo.iconPath);
- }
- var appPath = appInfo.appPath;
- if (appPath) {
- appMap[appPath] = appInfo;
- var idx = appPath.lastIndexOf("/");
- var folderPath = "";
- if (idx >= 0) {
- folderPath = appPath.substring(0, idx);
- }
- folderPath = Core.trimLeading(folderPath, "/");
- var folder = folderMap[folderPath];
- if (!folder) {
- folder = {
- path: folderPath,
- expanded: true,
- apps: []
- };
- folders.push(folder);
- folderMap[folderPath] = folder;
- }
- folder.apps.push(appInfo);
- }
- });
- this.appFolders = _.sortBy(folders, "path");
-
- var apps = [];
- var defaultInfo = {
- $iconUrl: defaultIconUrl
- };
-
- angular.forEach(this.appViews, (appView:any) => {
- try {
- var appPath = appView.appPath;
-
- /*
- TODO
- appView.$select = () => {
- Kubernetes.setJson($scope, appView.id, $scope.model.apps);
- };
- */
-
- var appInfo:any = angular.copy(defaultInfo);
- if (appPath) {
- appInfo = appMap[appPath] || appInfo;
- }
- if (!appView.$info) {
- appView.$info = defaultInfo;
- appView.$info = appInfo;
- }
- appView.id = appPath;
- if (!appView.$name) {
- appView.$name = appInfo.name || appView.$name;
- }
- if (!appView.$iconUrl) {
- appView.$iconUrl = appInfo.$iconUrl;
- }
- apps.push(appView);
- appView.$podCounters = createAppViewPodCounters(appView);
- appView.$podCount = (appView.pods || []).length;
- appView.$replicationControllersText = (appView.replicationControllers || []).map((i) => i["_key"]).join(" ");
- appView.$servicesText= (appView.services || []).map((i) => i["_key"]).join(" ");
- appView.$serviceViews = createAppViewServiceViews(appView);
- } catch (e) {
- log.warn("Failed to update appViews: " + e);
- }
- });
- //this.apps = apps;
- this.apps = this.appViews;
- }
- } catch (e) {
- log.warn("Caught error: " + e);
- }
- }
-
- protected discoverPodConnections(entity) {
- var info = Core.pathGet(entity, ["status", "info"]);
- var hostPort = null;
- var currentState = entity.status || {};
- var desiredState = entity.spec || {};
- var podId = getName(entity);
- var host = currentState["hostIP"];
- var podIP = currentState["podIP"];
- var hasDocker = false;
- var foundContainerPort = null;
- if (desiredState) {
- var containers = desiredState.containers;
- angular.forEach(containers, (container) => {
- if (!hostPort) {
- var ports = container.ports;
- angular.forEach(ports, (port) => {
- if (!hostPort) {
- var containerPort = port.containerPort;
- var portName = port.name;
- var containerHostPort = port.hostPort;
- if (containerPort === 8778 || "jolokia" === portName) {
- if (containerPort) {
- if (podIP) {
- foundContainerPort = containerPort;
- }
- if (containerHostPort) {
- hostPort = containerHostPort;
- }
- }
- }
- }
- });
- }
- });
- }
- if (foundContainerPort && podId && isRunning(currentState)) {
- if (!Kubernetes.isOpenShift) {
- // TODO temp workaround for k8s on GKE https://github.com/kubernetes/kubernetes/issues/17172
- entity.$jolokiaUrl = UrlHelpers.join(Kubernetes.masterApiUrl(),
- "api",
- Kubernetes.defaultApiVersion,
- "proxy",
- "namespaces",
- entity.metadata.namespace ,
- "pods",
- //"https:" + podId + ":" + foundContainerPort,
- podId + ":" + foundContainerPort,
- "jolokia/");
- } else {
- entity.$jolokiaUrl = UrlHelpers.join(Kubernetes.masterApiUrl(),
- "api",
- Kubernetes.defaultApiVersion,
- "namespaces",
- entity.metadata.namespace ,
- "pods",
- "https:" + podId + ":" + foundContainerPort,
- "proxy/jolokia/");
-
- }
- }
- }
- }
-
- function getTemplateService(model) {
- var key = createKey('default', 'templates', 'service');
- var answer = model.servicesByKey[key];
- log.debug("found template service: ", answer);
- return answer;
- }
-
- /**
- * Creates a model service which keeps track of all the pods, replication controllers and services along
- * with their associations and status
- */
- _module.factory('KubernetesModel', ['$rootScope', '$http', 'KubernetesApiURL', 'KubernetesState', 'WatcherService', '$location', '$resource', ($rootScope, $http, AppLibraryURL, KubernetesState, watcher:WatcherService, $location:ng.ILocationService, $resource:ng.resource.IResourceService) => {
-
- var $scope = new KubernetesModelService();
- $scope.kubernetes = KubernetesState;
-
- // create all of our resource classes
- var typeNames = watcher.getTypes();
- _.forEach(typeNames, (type:string) => {
- var urlTemplate = uriTemplateForKubernetesKind(type);
- $scope[type + 'Resource'] = createResource(type, urlTemplate, $resource, $scope);
- });
-
- if (!isOpenShift) {
- // register custom URL factories for templates/projects
- watcher.registerCustomUrlFunction(KubernetesAPI.WatchTypes.BUILD_CONFIGS, (options:KubernetesAPI.K8SOptions) => {
- var templateService = getTemplateService($scope);
- if (templateService) {
- return UrlHelpers.join(templateService.proxyUrl, '/oapi/v1/namespaces/default/buildconfigs/');
- }
- return null;
- });
- // register custom URL factories for templates/projects
- watcher.registerCustomUrlFunction(KubernetesAPI.WatchTypes.TEMPLATES, (options:KubernetesAPI.K8SOptions) => {
- var templateService = getTemplateService($scope);
- if (templateService) {
- return UrlHelpers.join(templateService.proxyUrl, '/oapi/v1/namespaces/default/templates/');
- }
- return null;
- });
- }
-
- // register for all updates on objects
- watcher.registerListener((objects:ObjectMap) => {
- var types = watcher.getTypes();
- _.forEach(types, (type:string) => {
- switch (type) {
- case WatchTypes.SERVICES:
- var items = populateKeys(objects[type]);
- angular.forEach(items, (item) => {
- item.proxyUrl = kubernetesProxyUrlForService(kubernetesApiUrl(), item);
- });
- $scope[type] = items;
- break;
- case WatchTypes.TEMPLATES:
- case WatchTypes.ROUTES:
- case WatchTypes.BUILDS:
- case WatchTypes.BUILD_CONFIGS:
- case WatchTypes.IMAGE_STREAMS:
- // don't put a break here :-)
- default:
- $scope[type] = populateKeys(objects[type]);
- }
- log.debug("Type: ", type, " object: ", $scope[type]);
- });
- $scope.maybeInit();
- $rootScope.$broadcast('kubernetesModelUpdated', $scope);
- Core.$apply($rootScope);
- });
-
- // set the selected namespace if set in the location bar
- // otherwise use whatever previously selected namespace is
- // available
- var search = $location.search();
- if ('namespace' in search) {
- watcher.setNamespace(search['namespace']);
- }
-
- function selectPods(pods, namespace, labels) {
- return pods.filter((pod) => {
- return getNamespace(pod) === namespace && selectorMatches(labels, getLabels(pod));
- });
- }
- return $scope;
- }]);
-
-}
+///
+///
+
+module Kubernetes {
+
+ export var FABRIC8_PROJECT_JSON = "fabric8ProjectJson";
+
+ function byId(thing) {
+ return thing.id;
+ }
+
+ function createKey(namespace, id, kind) {
+ return (namespace || "") + "-" + (kind || 'undefined').toLowerCase() + '-' + (id || 'undefined').replace(/\./g, '-');
+ }
+
+ function populateKey(item) {
+ var result = item;
+ result['_key'] = createKey(getNamespace(item), getName(item), getKind(item));
+ return result;
+ }
+
+ function populateKeys(items:Array) {
+ var result = [];
+ angular.forEach(items, (item) => {
+ result.push(populateKey(item));
+ });
+ return result;
+ }
+
+ function selectPods(pods, namespace, labels) {
+ return pods.filter((pod) => {
+ return getNamespace(pod) === namespace && selectorMatches(labels, getLabels(pod));
+ });
+ }
+
+ /**
+ * The object which keeps track of all the pods, replication controllers, services and their associations
+ */
+ export class KubernetesModelService {
+ public kubernetes = null;
+ public apps = [];
+ public services = [];
+
+ public replicationcontrollers = [];
+
+ public filterReplicationcontrollers = [];
+
+ /*public get filterReplicationcontrollers():Array {
+ return this.filterReplicationcontrollers;
+ }
+
+ public set filterReplicationcontrollers(filterReplicationcontrollers:Array) {
+ this.filterReplicationcontrollers = filterReplicationcontrollers;
+ }*/
+
+ public get replicationControllers():Array {
+ return this.replicationcontrollers;
+ }
+ public set replicationControllers(replicationControllers:Array) {
+ this.replicationcontrollers = replicationControllers;
+ }
+ public pods = [];
+ public hosts = [];
+ public get namespaces():Array {
+ return this.kubernetes.namespaces;
+ }
+ //public namespaces = [];
+ public routes = [];
+ public templates = [];
+ public redraw = false;
+ public resourceVersions = {};
+
+ // various views on the data
+ public podsByHost = {};
+ public servicesByKey = {};
+ public replicationControllersByKey = {};
+ public podsByKey = {};
+
+ public appInfos = [];
+ public appViews = [];
+ public appFolders = [];
+
+ public fetched = false;
+ public get showRunButton():boolean {
+ if (isOpenShift) {
+ return true;
+ }
+ return _.any(this.services, (service) => {
+ var name = getName(service);
+ if (name === "templates") {
+ var podCounters = service.$podCounters;
+ return podCounters && (podCounters.valid || podCounters.ready);
+ } else {
+ return false;
+ }
+ });
+ }
+
+ public buildconfigs = [];
+ public events = [];
+ public workspaces = [];
+ public projects = [];
+ public project = null;
+
+ public get serviceApps():Array {
+ return _.filter(this.services, (s) => {
+ return s.$host && s.$serviceUrl && s.$podCount
+ });
+ }
+
+ public $keepPolling() {
+ return keepPollingModel;
+ }
+
+ public orRedraw(flag) {
+ this.redraw = this.redraw || flag;
+ }
+
+ public getService(namespace, id) {
+ return this.servicesByKey[createKey(namespace, id, 'service')];
+ }
+
+ public getReplicationController(namespace, id) {
+ return this.replicationControllersByKey[createKey(namespace, id, 'replicationController')];
+ }
+
+ public getPod(namespace, id) {
+ return this.podsByKey[createKey(namespace, id, 'pod')];
+ }
+
+ public podsForNamespace(namespace = this.currentNamespace()) {
+ return _.filter(this.pods, { namespace: namespace });
+ }
+
+ public getBuildConfig(name) {
+ return _.find(this.buildconfigs, { $name: name });
+ }
+
+ public getProject(name, ns = this.currentNamespace()) {
+ var buildConfig = this.project;
+ if (!buildConfig) {
+ var text = localStorage[FABRIC8_PROJECT_JSON];
+ if (text) {
+ try {
+ buildConfig = angular.fromJson(text);
+ } catch (e) {
+ log.warn("Could not parse json for " + FABRIC8_PROJECT_JSON + ". Was: " + text + ". " + e, e);
+ }
+ }
+ }
+ if (buildConfig && ns != getNamespace(buildConfig) && name != buildConfig.$name) {
+ buildConfig = this.getBuildConfig(name);
+ }
+ return buildConfig;
+ }
+
+
+ public setProject(buildConfig) {
+ this.project = buildConfig;
+ if (buildConfig) {
+ // lets store in local storage
+ var localStorage = inject("localStorage");
+ if (localStorage) {
+ localStorage[FABRIC8_PROJECT_JSON] = angular.toJson(buildConfig);
+ }
+ }
+ }
+
+ /**
+ * Returns the current selected namespace or the default namespace
+ */
+ public currentNamespace() {
+ var answer = null;
+ if (this.kubernetes) {
+ answer = this.kubernetes.selectedNamespace;
+ }
+ return answer || defaultNamespace;
+ }
+
+ protected updateIconUrlAndAppInfo(entity, nameField: string) {
+ var answer = null;
+ var id = getName(entity);
+ entity.$iconUrl = Core.pathGet(entity, ['metadata', 'annotations', 'fabric8.' + id + '/iconUrl']);
+ entity.$info = Core.pathGet(entity, ['metadata', 'annotations', 'fabric8.' + id + '/summary']);
+ if (entity.$iconUrl) {
+ return;
+ }
+ if (id && nameField) {
+ (this.templates || []).forEach((template) => {
+ var metadata = template.metadata;
+ if (metadata) {
+ var annotations = metadata.annotations || {};
+ var iconUrl = annotations["fabric8." + id + "/iconUrl"] || annotations["fabric8/iconUrl"];
+ if (iconUrl) {
+ (template.objects || []).forEach((item) => {
+ var entityName = getName(item);
+ if (id === entityName) {
+ entity.$iconUrl = iconUrl;
+ }
+ });
+ }
+ }
+ });
+ (this.appInfos || []).forEach((appInfo) => {
+ var iconPath = appInfo.iconPath;
+ if (iconPath && !answer && iconPath !== "null") {
+ var iconUrl = gitPathToUrl(iconPath);
+ var ids = Core.pathGet(appInfo, ["names", nameField]);
+ angular.forEach(ids, (appId) => {
+ if (appId === id) {
+ entity.$iconUrl = iconUrl;
+ entity.appPath = appInfo.appPath;
+ entity.$info = appInfo;
+ }
+ });
+ }
+ });
+ }
+ if (!entity.$iconUrl) {
+ entity.$iconUrl = defaultIconUrl;
+ }
+ }
+
+ public maybeInit() {
+ this.fetched = true;
+ this.servicesByKey = {};
+ this.podsByKey = {};
+ this.replicationControllersByKey = {};
+
+ this.pods.forEach((pod) => {
+ if (!pod.kind) pod.kind = "Pod";
+ this.podsByKey[pod._key] = pod;
+ var host = getHost(pod);
+ pod.$labelsText = Kubernetes.labelsToString(getLabels(pod));
+ if (host) {
+ pod.$labelsText += labelFilterTextSeparator + "host=" + host;
+ }
+ pod.$iconUrl = defaultIconUrl;
+ this.discoverPodConnections(pod);
+ pod.$containerPorts = [];
+
+ var podStatus = pod.status || {};
+ var startTime = podStatus.startTime;
+ pod.$startTime = null;
+ if (startTime) {
+ pod.$startTime = new Date(startTime);
+ }
+ var createdTime = getCreationTimestamp(pod);
+ pod.$createdTime = null;
+ pod.$age = null;
+ if (createdTime) {
+ pod.$createdTime = new Date(createdTime);
+ pod.$age = humandate.relativeTime(pod.$createdTime);
+ }
+ var ready = isReady(pod);
+ pod.$ready = ready;
+ pod.$statusCss = statusTextToCssClass(podStatus.phase, ready);
+
+ var maxRestartCount = 0;
+ angular.forEach(Core.pathGet(pod, ["status", "containerStatuses"]), (status) => {
+ var restartCount = status.restartCount;
+ if (restartCount) {
+ if (restartCount > maxRestartCount) {
+ maxRestartCount = restartCount;
+ }
+ }
+ });
+ if (maxRestartCount ) {
+ pod.$restartCount = maxRestartCount;
+ }
+ var imageNames = "";
+ angular.forEach(Core.pathGet(pod, ["spec", "containers"]), (container) => {
+ var image = container.image;
+ if (image) {
+ if (!imageNames) {
+ imageNames = image;
+ } else {
+ imageNames = imageNames + " " + image;
+ }
+ var idx = image.lastIndexOf(":");
+ if (idx > 0) {
+ image = image.substring(0, idx);
+ }
+ var paths = image.split("/", 3);
+ if (paths.length) {
+ var answer = null;
+ if (paths.length == 3) {
+ answer = paths[1] + "/" + paths[2];
+ } else if (paths.length == 2) {
+ answer = paths[0] + "/" + paths[1];
+ } else {
+ answer = paths[0] + "/" + paths[1];
+ }
+ container.$imageLink = UrlHelpers.join("https://registry.hub.docker.com/u/", answer);
+ }
+ }
+ angular.forEach(container.ports, (port) => {
+ var containerPort = port.containerPort;
+ if (containerPort) {
+ pod.$containerPorts.push(containerPort);
+ }
+ });
+ });
+ pod.$imageNames = imageNames;
+ var podStatus = podStatus;
+ var podSpec = (pod.spec || {});
+ pod.$podIP = podStatus.podIP;
+ pod.$host = podSpec.host || podSpec.nodeName || podStatus.hostIP;
+ });
+
+ this.services.forEach((service) => {
+ if (!service.kind) service.kind = "Service";
+ this.servicesByKey[service._key] = service;
+ var selector = getSelector(service);
+ service.$pods = [];
+ if (!service.$podCounters) {
+ service.$podCounters = {};
+ }
+ var podLinkUrl = UrlHelpers.join("/kubernetes/namespace", service.metadata.namespace, "pods");
+ _.assign(service.$podCounters, selector ? createPodCounters(selector, this.pods, service.$pods, Kubernetes.labelsToString(selector, ","), podLinkUrl) : {});
+ service.$podCount = service.$pods.length;
+
+ var selectedPods = service.$pods;
+ service.connectTo = selectedPods.map((pod) => {
+ return pod._key;
+ }).join(',');
+ service.$labelsText = Kubernetes.labelsToString(getLabels(service));
+ this.updateIconUrlAndAppInfo(service, "serviceNames");
+ var spec = service.spec || {};
+ service.$portalIP = spec.portalIP;
+ service.$selectorText = Kubernetes.labelsToString(spec.selector);
+ var ports = _.map(spec.ports || [], "port");
+ service.$ports = ports;
+ service.$portsText = ports.join(", ");
+ var iconUrl = service.$iconUrl;
+ if (iconUrl && selectedPods) {
+ selectedPods.forEach((pod) => {
+ pod.$iconUrl = iconUrl;
+ });
+ }
+ service.$serviceUrl = serviceLinkUrl(service);
+ });
+
+ this.replicationControllers.forEach((replicationController) => {
+ if (!replicationController.kind) replicationController.kind = "ReplicationController";
+ this.replicationControllersByKey[replicationController._key] = replicationController
+ var selector = getSelector(replicationController);
+ replicationController.$pods = [];
+
+ if(isFilterRC(replicationController) && !isInclude(this.filterReplicationcontrollers, replicationController))
+ this.filterReplicationcontrollers.push(replicationController);
+
+ replicationController.$podCounters = selector ? createPodCounters(selector, this.pods, replicationController.$pods) : null;
+ replicationController.$podCount = replicationController.$pods.length;
+ replicationController.$replicas = (replicationController.spec || {}).replicas;
+
+ replicationController.$oracleName = getOracleName(getName(replicationController));
+ //console.log(getName(replicationController));
+ replicationController.$oracleStatus = getOracleStatus(getLabels(replicationController));
+ replicationController.$extractStatus = getExtractStatus(getLabels(replicationController));
+
+
+ var selectedPods = replicationController.$pods;
+ replicationController.connectTo = selectedPods.map((pod) => {
+ return pod._key;
+ }).join(',');
+ replicationController.$labelsText = Kubernetes.labelsToString(getLabels(replicationController));
+ replicationController.metadata.labels = Kubernetes.labelToChinese(getLabels(replicationController));
+ this.updateIconUrlAndAppInfo(replicationController, "replicationControllerNames");
+ var iconUrl = replicationController.$iconUrl;
+ if (iconUrl && selectedPods) {
+ selectedPods.forEach((pod) => {
+ pod.$iconUrl = iconUrl;
+ });
+ }
+ });
+
+ // services may not map to an icon but their pods may do via the RC
+ // so lets default it...
+ this.services.forEach((service) => {
+ var iconUrl = service.$iconUrl;
+ var selectedPods = service.$pods;
+ if (selectedPods) {
+ if (!iconUrl || iconUrl === defaultIconUrl) {
+ iconUrl = null;
+ selectedPods.forEach((pod) => {
+ if (!iconUrl) {
+ iconUrl = pod.$iconUrl;
+ if (iconUrl) {
+ service.$iconUrl = iconUrl;
+ }
+ }
+ });
+ }
+ }
+ });
+
+ this.updateApps();
+
+ var podsByHost = {};
+ this.pods.forEach((pod) => {
+ var host = getHost(pod);
+ var podsForHost = podsByHost[host];
+ if (!podsForHost) {
+ podsForHost = [];
+ podsByHost[host] = podsForHost;
+ }
+ podsForHost.push(pod);
+ });
+ this.podsByHost = podsByHost;
+
+ var tmpHosts = [];
+ for (var hostKey in podsByHost) {
+ var hostPods = [];
+ var podCounters = createPodCounters((pod) => getHost(pod) === hostKey, this.pods, hostPods, "host=" + hostKey);
+ var hostIP = null;
+ if (hostPods.length) {
+ var pod = hostPods[0];
+ var currentState = pod.status;
+ if (currentState) {
+ hostIP = currentState.hostIP;
+ }
+ }
+ var hostDetails = {
+ name: hostKey,
+ id: hostKey,
+ elementId: hostKey.replace(/\./g, '_'),
+ hostIP: hostIP,
+ pods: hostPods,
+ kind: "Host",
+ $podCounters: podCounters,
+ $iconUrl: hostIconUrl
+ };
+ tmpHosts.push(hostDetails);
+ }
+
+ this.hosts = tmpHosts;
+
+ enrichBuildConfigs(this.buildconfigs);
+ enrichEvents(this.events, this);
+ }
+
+ protected updateApps() {
+ try {
+ // lets create the app views by trying to join controllers / services / pods that are related
+ var appViews = [];
+
+ this.replicationControllers.forEach((replicationController) => {
+ var name = getName(replicationController);
+ var $iconUrl = replicationController.$iconUrl;
+ appViews.push({
+ appPath: "/dummyPath/" + name,
+ $name: name,
+ $info: {
+ $iconUrl: $iconUrl
+ },
+ $iconUrl: $iconUrl,
+ replicationControllers: [replicationController],
+ pods: replicationController.$pods || [],
+ services: []
+ });
+ });
+
+ var noMatches = [];
+ this.services.forEach((service) => {
+ // now lets see if we can find an app with an RC of the same selector
+ var matchesApp = null;
+ appViews.forEach((appView) => {
+ appView.replicationControllers.forEach((replicationController) => {
+ var repSelector = getSelector(replicationController);
+ if (repSelector &&
+ selectorMatches(repSelector, getSelector(service)) &&
+ getNamespace(service) === getNamespace(replicationController)) {
+ matchesApp = appView;
+ }
+ });
+ });
+
+ if (matchesApp) {
+ matchesApp.services.push(service);
+ } else {
+ noMatches.push(service);
+ }
+ });
+ log.debug("no matches: ", noMatches);
+ noMatches.forEach((service) => {
+ var appView = _.find(appViews, (appView) => {
+ return _.any(appView.replicationControllers, (rc) => {
+ return _.startsWith(getName(rc), getName(service));
+ });
+ });
+ if (appView) {
+ appView.services.push(service);
+ } else {
+ var $iconUrl = service.$iconUrl;
+ appViews.push({
+ appPath: "/dummyPath/" + name,
+ $name: name,
+ $info: {
+ $iconUrl: $iconUrl
+ },
+ $iconUrl: $iconUrl,
+ replicationControllers: [],
+ pods: service.$pods || [],
+ services: [service]
+ });
+ }
+ });
+
+ angular.forEach(this.routes, (route) => {
+ var metadata = route.metadata || {};
+ var spec = route.spec || {};
+ var serviceName = Core.pathGet(spec, ["to", "name"]);
+ var host = spec.host;
+ var namespace = getNamespace(route);
+ if (serviceName && host) {
+ var service = this.getService(namespace, serviceName);
+ if (service) {
+ service.$host = host;
+
+ // TODO we could use some annotations / metadata to deduce what URL we should use to open this
+ // service in the console. For now just assume its http:
+
+ if (host) {
+ var hostUrl = host;
+ if (hostUrl.indexOf("://") < 0) {
+ hostUrl = "http://" + host;
+ }
+ service.$connectUrl = UrlHelpers.join(hostUrl, "/");
+ }
+
+ // TODO definitely need that annotation, temp hack for apiman link
+ if (getName(service) === 'apiman' && host) {
+ service.$connectUrl = ( new URI().host(service.$host)
+ .path('apimanui/index.html'))
+ .query({})
+ .hash(URI.encode(angular.toJson({
+ backTo: new URI().toString(),
+ token: HawtioOAuth.getOAuthToken()
+ }))).toString();
+
+ }
+ } else {
+ log.debug("Could not find service " + serviceName + " namespace " + namespace + " for route: " + metadata.name);
+ }
+ }
+ });
+
+ appViews = _.sortBy(populateKeys(appViews), (appView) => appView._key);
+
+ ArrayHelpers.sync(this.appViews, appViews, '$name');
+
+ if (this.appInfos && this.appViews) {
+ var folderMap = {};
+ var folders = [];
+ var appMap = {};
+ angular.forEach(this.appInfos, (appInfo) => {
+ if (!appInfo.$iconUrl && appInfo.iconPath && appInfo.iconPath !== "null") {
+ appInfo.$iconUrl = gitPathToUrl(appInfo.iconPath);
+ }
+ var appPath = appInfo.appPath;
+ if (appPath) {
+ appMap[appPath] = appInfo;
+ var idx = appPath.lastIndexOf("/");
+ var folderPath = "";
+ if (idx >= 0) {
+ folderPath = appPath.substring(0, idx);
+ }
+ folderPath = Core.trimLeading(folderPath, "/");
+ var folder = folderMap[folderPath];
+ if (!folder) {
+ folder = {
+ path: folderPath,
+ expanded: true,
+ apps: []
+ };
+ folders.push(folder);
+ folderMap[folderPath] = folder;
+ }
+ folder.apps.push(appInfo);
+ }
+ });
+ this.appFolders = _.sortBy(folders, "path");
+
+ var apps = [];
+ var defaultInfo = {
+ $iconUrl: defaultIconUrl
+ };
+
+ angular.forEach(this.appViews, (appView:any) => {
+ try {
+ var appPath = appView.appPath;
+
+ /*
+ TODO
+ appView.$select = () => {
+ Kubernetes.setJson($scope, appView.id, $scope.model.apps);
+ };
+ */
+
+ var appInfo:any = angular.copy(defaultInfo);
+ if (appPath) {
+ appInfo = appMap[appPath] || appInfo;
+ }
+ if (!appView.$info) {
+ appView.$info = defaultInfo;
+ appView.$info = appInfo;
+ }
+ appView.id = appPath;
+ if (!appView.$name) {
+ appView.$name = appInfo.name || appView.$name;
+ }
+ if (!appView.$iconUrl) {
+ appView.$iconUrl = appInfo.$iconUrl;
+ }
+ apps.push(appView);
+ appView.$podCounters = createAppViewPodCounters(appView);
+ appView.$podCount = (appView.pods || []).length;
+ appView.$replicationControllersText = (appView.replicationControllers || []).map((i) => i["_key"]).join(" ");
+ appView.$servicesText= (appView.services || []).map((i) => i["_key"]).join(" ");
+ appView.$serviceViews = createAppViewServiceViews(appView);
+ } catch (e) {
+ log.warn("Failed to update appViews: " + e);
+ }
+ });
+ //this.apps = apps;
+ this.apps = this.appViews;
+ }
+ } catch (e) {
+ log.warn("Caught error: " + e);
+ }
+ }
+
+ protected discoverPodConnections(entity) {
+ var info = Core.pathGet(entity, ["status", "info"]);
+ var hostPort = null;
+ var currentState = entity.status || {};
+ var desiredState = entity.spec || {};
+ var podId = getName(entity);
+ var host = currentState["hostIP"];
+ var podIP = currentState["podIP"];
+ var hasDocker = false;
+ var foundContainerPort = null;
+ if (desiredState) {
+ var containers = desiredState.containers;
+ angular.forEach(containers, (container) => {
+ if (!hostPort) {
+ var ports = container.ports;
+ angular.forEach(ports, (port) => {
+ if (!hostPort) {
+ var containerPort = port.containerPort;
+ var portName = port.name;
+ var containerHostPort = port.hostPort;
+ if (containerPort === 8778 || "jolokia" === portName) {
+ if (containerPort) {
+ if (podIP) {
+ foundContainerPort = containerPort;
+ }
+ if (containerHostPort) {
+ hostPort = containerHostPort;
+ }
+ }
+ }
+ }
+ });
+ }
+ });
+ }
+ if (foundContainerPort && podId && isRunning(currentState)) {
+ if (!Kubernetes.isOpenShift) {
+ // TODO temp workaround for k8s on GKE https://github.com/kubernetes/kubernetes/issues/17172
+ entity.$jolokiaUrl = UrlHelpers.join(Kubernetes.masterApiUrl(),
+ "api",
+ Kubernetes.defaultApiVersion,
+ "proxy",
+ "namespaces",
+ entity.metadata.namespace ,
+ "pods",
+ //"https:" + podId + ":" + foundContainerPort,
+ podId + ":" + foundContainerPort,
+ "jolokia/");
+ } else {
+ entity.$jolokiaUrl = UrlHelpers.join(Kubernetes.masterApiUrl(),
+ "api",
+ Kubernetes.defaultApiVersion,
+ "namespaces",
+ entity.metadata.namespace ,
+ "pods",
+ "https:" + podId + ":" + foundContainerPort,
+ "proxy/jolokia/");
+
+ }
+ }
+ }
+ }
+
+ function getTemplateService(model) {
+ var key = createKey('default', 'templates', 'service');
+ var answer = model.servicesByKey[key];
+ log.debug("found template service: ", answer);
+ return answer;
+ }
+
+ /**
+ * Creates a model service which keeps track of all the pods, replication controllers and services along
+ * with their associations and status
+ */
+ _module.factory('KubernetesModel', ['$rootScope', '$http', 'KubernetesApiURL', 'KubernetesState', 'WatcherService', '$location', '$resource', ($rootScope, $http, AppLibraryURL, KubernetesState, watcher:WatcherService, $location:ng.ILocationService, $resource:ng.resource.IResourceService) => {
+
+ var $scope = new KubernetesModelService();
+ $scope.kubernetes = KubernetesState;
+
+ // create all of our resource classes
+ var typeNames = watcher.getTypes();
+ _.forEach(typeNames, (type:string) => {
+ var urlTemplate = uriTemplateForKubernetesKind(type);
+ $scope[type + 'Resource'] = createResource(type, urlTemplate, $resource, $scope);
+ });
+
+ if (!isOpenShift) {
+ // register custom URL factories for templates/projects
+ watcher.registerCustomUrlFunction(KubernetesAPI.WatchTypes.BUILD_CONFIGS, (options:KubernetesAPI.K8SOptions) => {
+ var templateService = getTemplateService($scope);
+ if (templateService) {
+ return UrlHelpers.join(templateService.proxyUrl, '/oapi/v1/namespaces/default/buildconfigs/');
+ }
+ return null;
+ });
+ // register custom URL factories for templates/projects
+ watcher.registerCustomUrlFunction(KubernetesAPI.WatchTypes.TEMPLATES, (options:KubernetesAPI.K8SOptions) => {
+ var templateService = getTemplateService($scope);
+ if (templateService) {
+ return UrlHelpers.join(templateService.proxyUrl, '/oapi/v1/namespaces/default/templates/');
+ }
+ return null;
+ });
+ }
+
+ // register for all updates on objects
+ watcher.registerListener((objects:ObjectMap) => {
+ var types = watcher.getTypes();
+ _.forEach(types, (type:string) => {
+ switch (type) {
+ case WatchTypes.SERVICES:
+ var items = populateKeys(objects[type]);
+ angular.forEach(items, (item) => {
+ item.proxyUrl = kubernetesProxyUrlForService(kubernetesApiUrl(), item);
+ });
+ $scope[type] = items;
+ break;
+ case WatchTypes.TEMPLATES:
+ case WatchTypes.ROUTES:
+ case WatchTypes.BUILDS:
+ case WatchTypes.BUILD_CONFIGS:
+ case WatchTypes.IMAGE_STREAMS:
+ // don't put a break here :-)
+ default:
+ $scope[type] = populateKeys(objects[type]);
+ }
+ log.debug("Type: ", type, " object: ", $scope[type]);
+ });
+ $scope.maybeInit();
+ $rootScope.$broadcast('kubernetesModelUpdated', $scope);
+ Core.$apply($rootScope);
+ });
+
+ // set the selected namespace if set in the location bar
+ // otherwise use whatever previously selected namespace is
+ // available
+ var search = $location.search();
+ if ('namespace' in search) {
+ watcher.setNamespace(search['namespace']);
+ }
+
+ function selectPods(pods, namespace, labels) {
+ return pods.filter((pod) => {
+ return getNamespace(pod) === namespace && selectorMatches(labels, getLabels(pod));
+ });
+ }
+ return $scope;
+ }]);
+
+}
diff --git a/plugins/kubernetes/ts/kubernetesNavigation.ts b/plugins/kubernetes/ts/kubernetesNavigation.ts
index 33f4cfa..3d3e276 100644
--- a/plugins/kubernetes/ts/kubernetesNavigation.ts
+++ b/plugins/kubernetes/ts/kubernetesNavigation.ts
@@ -1,24 +1,24 @@
-///
-///
-module Kubernetes {
-
- export function selectSubNavBar($scope, tabName, newSubTabLabel) {
- var foundTab = null;
- angular.forEach($scope.subTabConfig, (tab) => {
- if (tabName === tab.label || tabName === tab.id) {
- foundTab = tab;
- }
- });
- var breadcrumbConfig = $scope.breadcrumbConfig;
- if (foundTab && breadcrumbConfig) {
- breadcrumbConfig.push(foundTab);
- $scope.subTabConfig = [
- {
- label: newSubTabLabel
- }
- ];
- }
-
- }
-
-}
+///
+///
+module Kubernetes {
+
+ export function selectSubNavBar($scope, tabName, newSubTabLabel) {
+ var foundTab = null;
+ angular.forEach($scope.subTabConfig, (tab) => {
+ if (tabName === tab.label || tabName === tab.id) {
+ foundTab = tab;
+ }
+ });
+ var breadcrumbConfig = $scope.breadcrumbConfig;
+ if (foundTab && breadcrumbConfig) {
+ breadcrumbConfig.push(foundTab);
+ $scope.subTabConfig = [
+ {
+ label: newSubTabLabel
+ }
+ ];
+ }
+
+ }
+
+}
diff --git a/plugins/kubernetes/ts/kubernetesPlugin.ts b/plugins/kubernetes/ts/kubernetesPlugin.ts
index 22570c4..186eff5 100644
--- a/plugins/kubernetes/ts/kubernetesPlugin.ts
+++ b/plugins/kubernetes/ts/kubernetesPlugin.ts
@@ -1,277 +1,277 @@
-///
-///
-
-declare var OSOAuthConfig:any;
-declare var GoogleOAuthConfig:any;
-declare var KeycloakConfig:any;
-
-module Kubernetes {
-
- export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'ui.validate','kubernetesUI']);
- export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
- export var route = PluginHelpers.createRoutingFunction(templatePath);
-
- _module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
-
- $routeProvider
- .when(UrlHelpers.join(context, '/pods'), route('pods.html', false))
- .when(UrlHelpers.join(context, 'replicationControllers'), route('replicationControllers.html', false))
- .when(UrlHelpers.join(context, 'services'), route('services.html', false))
- .when(UrlHelpers.join(context, 'events'), route('events.html', false))
- .when(UrlHelpers.join(context, 'apps'), route('apps.html', false))
- .when(UrlHelpers.join(context, 'apps/:namespace'), route('apps.html', false))
- .when(UrlHelpers.join(context, 'templates'), route('templates.html', false))
- .when(UrlHelpers.join(context, 'hosts'), route('hosts.html', false))
- .when(UrlHelpers.join(context, 'hosts/:id'), route('host.html', true))
- .when(UrlHelpers.join(context, 'pipelines'), route('pipelines.html', false))
- .when(UrlHelpers.join(context, 'overview'), route('overview.html', true))
- .when(context, {redirectTo: UrlHelpers.join(context, 'replicationControllers')});
- console.log("===================");
- console.log(context);
-
- angular.forEach([context, "/workspaces/:workspace/projects/:project"], (context) => {
- $routeProvider
- .when(UrlHelpers.join(context, '/namespace/:namespace/podCreate'), route('podCreate.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/podEdit/:id'), route('podEdit.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/pods'), route('pods.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/pods/:id'), route('pod.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllers'), route('replicationControllers.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllers/:id'), route('replicationController.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllerCreate'), route('replicationControllerCreate.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllerEdit/:id'), route('replicationControllerEdit.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/secrets'), route('secrets.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/secrets/:id'), route('secret.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/secretCreate'), route('secret.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/services'), route('services.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/services/:id'), route('service.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/serviceCreate'), route('serviceCreate.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/serviceEdit/:id'), route('serviceEdit.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/events'), route('events.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/apps'), route('apps.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace/overview'), route('overview.html', true))
- .when(UrlHelpers.join(context, '/namespace/:namespace/templates/:targetNamespace'), route('templates.html', false))
- .when(UrlHelpers.join(context, '/namespace/:namespace'), route('apps.html', false))
- .when(UrlHelpers.join(context, 'builds'), route('builds.html', false))
- .when(UrlHelpers.join(context, 'builds/:id'), route('build.html', true))
- .when(UrlHelpers.join(context, 'buildLogs/:id'), route('buildLogs.html', true))
- .when(UrlHelpers.join(context, 'buildConfigs'), route('buildConfigs.html', false))
- .when(UrlHelpers.join(context, 'buildConfigs/:id'), route('buildConfig.html', true))
- .when(UrlHelpers.join(context, 'buildConfigEdit/:id'), route('buildConfigEdit.html', true))
- .when(UrlHelpers.join(context, 'deploymentConfigs'), route('deploymentConfigs.html', false))
- .when(UrlHelpers.join(context, 'deploymentConfigs/:id'), route('deploymentConfig.html', true))
- .when(UrlHelpers.join(context, 'imageRepositories'), route('imageRepositories.html', false))
- });
-
- angular.forEach([context, "/workspaces/:workspace", "/workspaces/:workspace/projects/:project"], (context) => {
- $routeProvider
- .when(UrlHelpers.join(context, 'buildConfigEdit'), route('buildConfigEdit.html', true))
- .when(UrlHelpers.join(context, 'buildConfigEdit/:id'), route('buildConfigEdit.html', true))
- .when(UrlHelpers.join(context, 'importProject'), route('importProject.html', true))
- });
- }]);
-
-
- _module.factory('AppLibraryURL', ['$rootScope', ($rootScope:ng.IRootScopeService) => {
- return UrlHelpers.join(kubernetesApiUrl(), "/proxy", kubernetesNamespacePath(), "/services/app-library");
- }]);
-
- _module.factory('WikiGitUrlPrefix', () => {
- return UrlHelpers.join(kubernetesApiUrl(), "/proxy", kubernetesNamespacePath(), "services/app-library");
- });
-
- _module.factory('wikiRepository', ["$location", "localStorage", ($location, localStorage) => {
- return false;
- }]);
-
- _module.factory('ConnectDialogService', ['$rootScope', ($rootScope:ng.IRootScopeService) => {
- return {
- dialog: new UI.Dialog(),
- saveCredentials: false,
- userName: null,
- password: null,
- jolokiaUrl: null,
- containerName: null,
- view: null
- };
- }]);
-
- _module.filter('kubernetesPageLink', () => entityPageLink);
-
- _module.filter('relativeTime', () => {
- return (date) => {
- return humandate.relativeTime(date);
- }
- });
-
- _module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
-
- log.debug("Running");
- viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html';
- var builder = HawtioNav.builder();
- var apps = builder.id('kube-apps')
- .href(() => UrlHelpers.join(context, 'apps'))
- .title(() => 'Apps')
- .build();
-
- var services = builder.id('kube-services')
- .href(() => UrlHelpers.join(context, 'services'))
- .title(() => 'Services')
- .build();
-
- var controllers = builder.id('kube-controllers')
- .href(() => UrlHelpers.join(context, 'replicationControllers'))
- .title(() => 'oracle服务')
- .build();
-
- var pods = builder.id('kube-pods')
- .href(() => UrlHelpers.join(context, 'pods'))
- .title(() => '测试页面')
- .build();
-
- var events = builder.id('kube-events')
- .href(() => UrlHelpers.join(context, 'events'))
- .title(() => '服务启动日志')
- .build();
-
- var hosts = builder.id('kube-hosts')
- .href(() => UrlHelpers.join(context, 'hosts'))
- .title(() => '集群节点')
- .build();
-
- var overview = builder.id('kube-overview')
- .href(() => UrlHelpers.join(context, 'overview'))
- .title(() => 'Diagram')
- .build();
-
- var builds = builder.id('kube-builds')
- .href(() => UrlHelpers.join(context, 'builds'))
- .title(() => 'Builds')
- .build();
-
- var buildConfigs = builder.id('kube-buildConfigs')
- .href(() => UrlHelpers.join(context, 'buildConfigs'))
- .title(() => 'Build Configs')
- .build();
-
- var deploys = builder.id('kube-deploys')
- .href(() => UrlHelpers.join(context, 'deploymentConfigs'))
- .title(() => 'Deploys')
- .build();
-
- var imageRepositories = builder.id('kube-imageRepositories')
- .href(() => UrlHelpers.join(context, 'imageRepositories'))
- .title(() => 'Registries')
- .build();
-
- var pipelines = builder.id('kube-pipelines')
- .href(() => UrlHelpers.join(context, 'pipelines'))
- .title(() => 'Pipelines')
- .build();
-
- var repos = builder.id('kube-repos')
- .href(() => "/forge/repos")
- .isValid(() => ServiceRegistry.hasService(fabric8ForgeServiceName) && ServiceRegistry.hasService(gogsServiceName))
- .title(() => 'Repositories')
- .build();
-
- var mainTab = builder.id('kubernetes')
- .rank(100)
- .defaultPage({
- rank: 20,
- isValid: (yes, no) => {
- yes();
- }
- })
- .href(() => context)
- .title(() => '服务集群')
- .tabs(controllers, pods, events)
- .build();
- HawtioNav.add(mainTab);
-
- /* testKubernetesModel
- HawtioNav.add({
- id: 'k8sAppSwitcher',
- title: () => '', // not used as 'template' below overrides this
- isValid: () => KubernetesModel.serviceApps.length > 0,
- context: true,
- template: () => $templateCache.get(UrlHelpers.join(templatePath, 'serviceApps.html'))
- });
- */
-
- var projectsTab = builder.id('openshift')
- .rank(100)
- .href(() => UrlHelpers.join(context, 'buildConfigs') + '?sub-tab=kube-buildConfigs')
- .title(() => 'Projects')
- // lets disable the pipelines view for now
- // pipelines,
- .tabs(repos, buildConfigs, builds, deploys, imageRepositories)
- .build();
-
- //HawtioNav.add(projectsTab);
- }]);
-
- hawtioPluginLoader.registerPreBootstrapTask({
- name: 'KubernetesInit',
- task: (next) => {
- $.getScript('osconsole/config.js')
- .done((script, textStatus) => {
- var config:KubernetesConfig = Kubernetes.osConfig = window['OPENSHIFT_CONFIG'];
- log.debug("Fetched OAuth config: ", config);
- var master:string = config.master_uri;
- if (!master && config.api && config.api.k8s) {
- var masterUri = new URI().host(config.api.k8s.hostPort).path("").query("");
- if (config.api.k8s.proto) {
- masterUri.protocol(config.api.k8s.proto);
- }
- master = masterUri.toString();
- }
-
- OSOAuthConfig = config.openshift;
- GoogleOAuthConfig = config.google;
- KeycloakConfig = config.keycloak;
-
- if (OSOAuthConfig && !master) {
- // TODO auth.master_uri no longer used right?
- // master = OSOAuthConfig.master_uri;
- if (!master) {
- var oauth_authorize_uri = OSOAuthConfig.oauth_authorize_uri;
- if (oauth_authorize_uri) {
- var text = oauth_authorize_uri;
- var idx = text.indexOf("://");
- if (idx > 0) {
- idx += 3;
- idx = text.indexOf("/", idx);
- if (idx > 0) {
- master = text.substring(0, ++idx);
- }
- }
- }
- }
- }
- if ((!Kubernetes.masterUrl || Kubernetes.masterUrl === "/") && (!master || master === "/")) {
- // lets default the master to the current protocol and host/port
- // in case the master url is "/" and we are
- // serving up static content from inside /api/v1/namespaces/default/services/fabric8 or something like that
- var href = location.href;
- if (href) {
- master = new URI(href).query("").path("").toString();
- }
- }
- if (master) {
- Kubernetes.masterUrl = master;
- next();
- return;
- }
- })
- .fail((response) => {
- log.debug("Error fetching OAUTH config: ", response);
- })
- .always(() => {
- next();
- });
- }
- }, true);
-
- hawtioPluginLoader.addModule('ngResource');
- hawtioPluginLoader.addModule(pluginName);
-}
+///
+///
+
+declare var OSOAuthConfig:any;
+declare var GoogleOAuthConfig:any;
+declare var KeycloakConfig:any;
+
+module Kubernetes {
+
+ export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'ui.validate','kubernetesUI']);
+ export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
+ export var route = PluginHelpers.createRoutingFunction(templatePath);
+
+ _module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
+
+ $routeProvider
+ .when(UrlHelpers.join(context, '/pods'), route('pods.html', false))
+ .when(UrlHelpers.join(context, 'replicationControllers'), route('replicationControllers.html', false))
+ .when(UrlHelpers.join(context, 'services'), route('services.html', false))
+ .when(UrlHelpers.join(context, 'events'), route('events.html', false))
+ .when(UrlHelpers.join(context, 'apps'), route('apps.html', false))
+ .when(UrlHelpers.join(context, 'apps/:namespace'), route('apps.html', false))
+ .when(UrlHelpers.join(context, 'templates'), route('templates.html', false))
+ .when(UrlHelpers.join(context, 'hosts'), route('hosts.html', false))
+ .when(UrlHelpers.join(context, 'hosts/:id'), route('host.html', true))
+ .when(UrlHelpers.join(context, 'pipelines'), route('pipelines.html', false))
+ .when(UrlHelpers.join(context, 'overview'), route('overview.html', true))
+ .when(context, {redirectTo: UrlHelpers.join(context, 'replicationControllers')});
+ console.log("===================");
+ console.log(context);
+
+ angular.forEach([context, "/workspaces/:workspace/projects/:project"], (context) => {
+ $routeProvider
+ .when(UrlHelpers.join(context, '/namespace/:namespace/podCreate'), route('podCreate.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/podEdit/:id'), route('podEdit.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/pods'), route('pods.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/pods/:id'), route('pod.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllers'), route('replicationControllers.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllers/:id'), route('replicationController.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllerCreate'), route('replicationControllerCreate.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllerEdit/:id'), route('replicationControllerEdit.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/secrets'), route('secrets.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/secrets/:id'), route('secret.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/secretCreate'), route('secret.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/services'), route('services.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/services/:id'), route('service.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/serviceCreate'), route('serviceCreate.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/serviceEdit/:id'), route('serviceEdit.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/events'), route('events.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/apps'), route('apps.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/overview'), route('overview.html', true))
+ .when(UrlHelpers.join(context, '/namespace/:namespace/templates/:targetNamespace'), route('templates.html', false))
+ .when(UrlHelpers.join(context, '/namespace/:namespace'), route('apps.html', false))
+ .when(UrlHelpers.join(context, 'builds'), route('builds.html', false))
+ .when(UrlHelpers.join(context, 'builds/:id'), route('build.html', true))
+ .when(UrlHelpers.join(context, 'buildLogs/:id'), route('buildLogs.html', true))
+ .when(UrlHelpers.join(context, 'buildConfigs'), route('buildConfigs.html', false))
+ .when(UrlHelpers.join(context, 'buildConfigs/:id'), route('buildConfig.html', true))
+ .when(UrlHelpers.join(context, 'buildConfigEdit/:id'), route('buildConfigEdit.html', true))
+ .when(UrlHelpers.join(context, 'deploymentConfigs'), route('deploymentConfigs.html', false))
+ .when(UrlHelpers.join(context, 'deploymentConfigs/:id'), route('deploymentConfig.html', true))
+ .when(UrlHelpers.join(context, 'imageRepositories'), route('imageRepositories.html', false))
+ });
+
+ angular.forEach([context, "/workspaces/:workspace", "/workspaces/:workspace/projects/:project"], (context) => {
+ $routeProvider
+ .when(UrlHelpers.join(context, 'buildConfigEdit'), route('buildConfigEdit.html', true))
+ .when(UrlHelpers.join(context, 'buildConfigEdit/:id'), route('buildConfigEdit.html', true))
+ .when(UrlHelpers.join(context, 'importProject'), route('importProject.html', true))
+ });
+ }]);
+
+
+ _module.factory('AppLibraryURL', ['$rootScope', ($rootScope:ng.IRootScopeService) => {
+ return UrlHelpers.join(kubernetesApiUrl(), "/proxy", kubernetesNamespacePath(), "/services/app-library");
+ }]);
+
+ _module.factory('WikiGitUrlPrefix', () => {
+ return UrlHelpers.join(kubernetesApiUrl(), "/proxy", kubernetesNamespacePath(), "services/app-library");
+ });
+
+ _module.factory('wikiRepository', ["$location", "localStorage", ($location, localStorage) => {
+ return false;
+ }]);
+
+ _module.factory('ConnectDialogService', ['$rootScope', ($rootScope:ng.IRootScopeService) => {
+ return {
+ dialog: new UI.Dialog(),
+ saveCredentials: false,
+ userName: null,
+ password: null,
+ jolokiaUrl: null,
+ containerName: null,
+ view: null
+ };
+ }]);
+
+ _module.filter('kubernetesPageLink', () => entityPageLink);
+
+ _module.filter('relativeTime', () => {
+ return (date) => {
+ return humandate.relativeTime(date);
+ }
+ });
+
+ _module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
+
+ log.debug("Running");
+ viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html';
+ var builder = HawtioNav.builder();
+ var apps = builder.id('kube-apps')
+ .href(() => UrlHelpers.join(context, 'apps'))
+ .title(() => 'Apps')
+ .build();
+
+ var services = builder.id('kube-services')
+ .href(() => UrlHelpers.join(context, 'services'))
+ .title(() => 'Services')
+ .build();
+
+ var controllers = builder.id('kube-controllers')
+ .href(() => UrlHelpers.join(context, 'replicationControllers'))
+ .title(() => 'oracle服务')
+ .build();
+
+ var pods = builder.id('kube-pods')
+ .href(() => UrlHelpers.join(context, 'pods'))
+ .title(() => '测试页面')
+ .build();
+
+ var events = builder.id('kube-events')
+ .href(() => UrlHelpers.join(context, 'events'))
+ .title(() => '服务启动日志')
+ .build();
+
+ var hosts = builder.id('kube-hosts')
+ .href(() => UrlHelpers.join(context, 'hosts'))
+ .title(() => '集群节点')
+ .build();
+
+ var overview = builder.id('kube-overview')
+ .href(() => UrlHelpers.join(context, 'overview'))
+ .title(() => 'Diagram')
+ .build();
+
+ var builds = builder.id('kube-builds')
+ .href(() => UrlHelpers.join(context, 'builds'))
+ .title(() => 'Builds')
+ .build();
+
+ var buildConfigs = builder.id('kube-buildConfigs')
+ .href(() => UrlHelpers.join(context, 'buildConfigs'))
+ .title(() => 'Build Configs')
+ .build();
+
+ var deploys = builder.id('kube-deploys')
+ .href(() => UrlHelpers.join(context, 'deploymentConfigs'))
+ .title(() => 'Deploys')
+ .build();
+
+ var imageRepositories = builder.id('kube-imageRepositories')
+ .href(() => UrlHelpers.join(context, 'imageRepositories'))
+ .title(() => 'Registries')
+ .build();
+
+ var pipelines = builder.id('kube-pipelines')
+ .href(() => UrlHelpers.join(context, 'pipelines'))
+ .title(() => 'Pipelines')
+ .build();
+
+ var repos = builder.id('kube-repos')
+ .href(() => "/forge/repos")
+ .isValid(() => ServiceRegistry.hasService(fabric8ForgeServiceName) && ServiceRegistry.hasService(gogsServiceName))
+ .title(() => 'Repositories')
+ .build();
+
+ var mainTab = builder.id('kubernetes')
+ .rank(100)
+ .defaultPage({
+ rank: 20,
+ isValid: (yes, no) => {
+ yes();
+ }
+ })
+ .href(() => context)
+ .title(() => '服务集群')
+ .tabs(controllers, pods, events)
+ .build();
+ HawtioNav.add(mainTab);
+
+ /* testKubernetesModel
+ HawtioNav.add({
+ id: 'k8sAppSwitcher',
+ title: () => '', // not used as 'template' below overrides this
+ isValid: () => KubernetesModel.serviceApps.length > 0,
+ context: true,
+ template: () => $templateCache.get(UrlHelpers.join(templatePath, 'serviceApps.html'))
+ });
+ */
+
+ var projectsTab = builder.id('openshift')
+ .rank(100)
+ .href(() => UrlHelpers.join(context, 'buildConfigs') + '?sub-tab=kube-buildConfigs')
+ .title(() => 'Projects')
+ // lets disable the pipelines view for now
+ // pipelines,
+ .tabs(repos, buildConfigs, builds, deploys, imageRepositories)
+ .build();
+
+ //HawtioNav.add(projectsTab);
+ }]);
+
+ hawtioPluginLoader.registerPreBootstrapTask({
+ name: 'KubernetesInit',
+ task: (next) => {
+ $.getScript('osconsole/config.js')
+ .done((script, textStatus) => {
+ var config:KubernetesConfig = Kubernetes.osConfig = window['OPENSHIFT_CONFIG'];
+ log.debug("Fetched OAuth config: ", config);
+ var master:string = config.master_uri;
+ if (!master && config.api && config.api.k8s) {
+ var masterUri = new URI().host(config.api.k8s.hostPort).path("").query("");
+ if (config.api.k8s.proto) {
+ masterUri.protocol(config.api.k8s.proto);
+ }
+ master = masterUri.toString();
+ }
+
+ OSOAuthConfig = config.openshift;
+ GoogleOAuthConfig = config.google;
+ KeycloakConfig = config.keycloak;
+
+ if (OSOAuthConfig && !master) {
+ // TODO auth.master_uri no longer used right?
+ // master = OSOAuthConfig.master_uri;
+ if (!master) {
+ var oauth_authorize_uri = OSOAuthConfig.oauth_authorize_uri;
+ if (oauth_authorize_uri) {
+ var text = oauth_authorize_uri;
+ var idx = text.indexOf("://");
+ if (idx > 0) {
+ idx += 3;
+ idx = text.indexOf("/", idx);
+ if (idx > 0) {
+ master = text.substring(0, ++idx);
+ }
+ }
+ }
+ }
+ }
+ if ((!Kubernetes.masterUrl || Kubernetes.masterUrl === "/") && (!master || master === "/")) {
+ // lets default the master to the current protocol and host/port
+ // in case the master url is "/" and we are
+ // serving up static content from inside /api/v1/namespaces/default/services/fabric8 or something like that
+ var href = location.href;
+ if (href) {
+ master = new URI(href).query("").path("").toString();
+ }
+ }
+ if (master) {
+ Kubernetes.masterUrl = master;
+ next();
+ return;
+ }
+ })
+ .fail((response) => {
+ log.debug("Error fetching OAUTH config: ", response);
+ })
+ .always(() => {
+ next();
+ });
+ }
+ }, true);
+
+ hawtioPluginLoader.addModule('ngResource');
+ hawtioPluginLoader.addModule(pluginName);
+}
diff --git a/plugins/kubernetes/ts/kubernetesSchema.ts b/plugins/kubernetes/ts/kubernetesSchema.ts
index 5560b3a..f1b8b38 100644
--- a/plugins/kubernetes/ts/kubernetesSchema.ts
+++ b/plugins/kubernetes/ts/kubernetesSchema.ts
@@ -1,77 +1,77 @@
-///
-///
-module Kubernetes {
-
-
- var hiddenProperties = ['status', 'deletionTimestamp'];
-
- function withProperty(schema:any, name:string, action:(any) => void) {
- if (schema.properties[name]) {
- action(schema.properties[name]);
- }
- }
-
- function hideProperties(schema) {
- _.forEach(hiddenProperties, (property) => {
- withProperty(schema, property, (property) => {
- property.hidden = true;
- })
- });
- }
-
- _module.factory('KubernetesSchema', ['SchemaRegistry', (schemas:HawtioForms.SchemaRegistry) => {
- configureSchema();
-
- schemas.addListener("k8s schema customizer", (name, schema) => {
- if (schema.properties) {
- if (schema.properties.name) {
- schema.controls = ['name', '*'];
- }
- withProperty(schema, 'portalIP', (property) => {
- property.label = "Portal IP"
- });
- withProperty(schema, 'publicIPs', (property) => {
- property.label = "Public IPs"
- });
- withProperty(schema, 'Spec', (property) => {
- property.label = 'false';
- });
- withProperty(schema, 'Metadata', (property) => {
- property.label = 'false';
- });
- hideProperties(schema);
- }
-
- if (_.endsWith(name, "ServiceSpec")) {
- schema.controls = ["portalIP", "createExternalLoadBalancer", "sessionAffinity", "publicIPs", "ports", "selector", "*"];
- withProperty(schema, 'sessionAffinity', (property) => {
- log.debug("Schema: ", schema);
- property.enum = ['None', 'ClientIP'];
- property.default = 'None';
- });
- }
-
- if (_.endsWith(name, "Service")) {
- schema.controls = undefined;
- schema.tabs = {
- 'Basic Information': ['metadata'],
- 'Details': ['*']
- }
- log.debug("Name: ", name, " Schema: ", schema);
- }
-
- });
-
-
- schemas.addSchema('kubernetes', schema);
- // now lets iterate and add all the definitions too
- angular.forEach(schema.definitions, (definition, typeName) => {
- //schemas.addSchema(typeName, definition);
- schemas.addSchema("#/definitions/" + typeName, definition);
- });
- return schema;
- }]);
-
-
-
+///
+///
+module Kubernetes {
+
+
+ var hiddenProperties = ['status', 'deletionTimestamp'];
+
+ function withProperty(schema:any, name:string, action:(any) => void) {
+ if (schema.properties[name]) {
+ action(schema.properties[name]);
+ }
+ }
+
+ function hideProperties(schema) {
+ _.forEach(hiddenProperties, (property) => {
+ withProperty(schema, property, (property) => {
+ property.hidden = true;
+ })
+ });
+ }
+
+ _module.factory('KubernetesSchema', ['SchemaRegistry', (schemas:HawtioForms.SchemaRegistry) => {
+ configureSchema();
+
+ schemas.addListener("k8s schema customizer", (name, schema) => {
+ if (schema.properties) {
+ if (schema.properties.name) {
+ schema.controls = ['name', '*'];
+ }
+ withProperty(schema, 'portalIP', (property) => {
+ property.label = "Portal IP"
+ });
+ withProperty(schema, 'publicIPs', (property) => {
+ property.label = "Public IPs"
+ });
+ withProperty(schema, 'Spec', (property) => {
+ property.label = 'false';
+ });
+ withProperty(schema, 'Metadata', (property) => {
+ property.label = 'false';
+ });
+ hideProperties(schema);
+ }
+
+ if (_.endsWith(name, "ServiceSpec")) {
+ schema.controls = ["portalIP", "createExternalLoadBalancer", "sessionAffinity", "publicIPs", "ports", "selector", "*"];
+ withProperty(schema, 'sessionAffinity', (property) => {
+ log.debug("Schema: ", schema);
+ property.enum = ['None', 'ClientIP'];
+ property.default = 'None';
+ });
+ }
+
+ if (_.endsWith(name, "Service")) {
+ schema.controls = undefined;
+ schema.tabs = {
+ 'Basic Information': ['metadata'],
+ 'Details': ['*']
+ }
+ log.debug("Name: ", name, " Schema: ", schema);
+ }
+
+ });
+
+
+ schemas.addSchema('kubernetes', schema);
+ // now lets iterate and add all the definitions too
+ angular.forEach(schema.definitions, (definition, typeName) => {
+ //schemas.addSchema(typeName, definition);
+ schemas.addSchema("#/definitions/" + typeName, definition);
+ });
+ return schema;
+ }]);
+
+
+
}
\ No newline at end of file
diff --git a/plugins/kubernetes/ts/kubernetesServices.ts b/plugins/kubernetes/ts/kubernetesServices.ts
index 4529e1b..7cd6211 100644
--- a/plugins/kubernetes/ts/kubernetesServices.ts
+++ b/plugins/kubernetes/ts/kubernetesServices.ts
@@ -1,49 +1,49 @@
-///
-
-module Kubernetes {
-
- // facade this to the watcher service
- class KubernetesStateImpl implements KubernetesState {
- constructor(private watcher:WatcherService) {
- }
- get namespaces():Array {
- return _.map(this.watcher.getObjects(WatchTypes.NAMESPACES), (namespace) => {
- return namespace.metadata.name;
- });
- }
- get selectedNamespace():string {
- return this.watcher.getNamespace();
- }
- set selectedNamespace(namespace:string) {
- this.watcher.setNamespace(namespace);
- }
- }
-
- _module.factory('KubernetesState', ['WatcherService', (watcher:WatcherService) => {
- return new KubernetesStateImpl(watcher);
- }]);
-
- // TODO this doesn't need to be a service really
- _module.factory('KubernetesApiURL', () => kubernetesApiUrl());
-
- // TODO we'll get rid of this...
- _module.factory('KubernetesVersion', [() => {
- return {
- query: () => null
- }
- }]);
-
- // TODO let's move these into KubernetesModel so controllers don't have to inject them separately
- _module.factory('KubernetesPods', ['KubernetesModel', (KubernetesModel) => {
- return KubernetesModel['podsResource'];
- }]);
-
- _module.factory('KubernetesReplicationControllers', ['KubernetesModel', (KubernetesModel) => {
- return KubernetesModel['replicationcontrollersResource'];
- }]);
-
- _module.factory('KubernetesServices', ['KubernetesModel', (KubernetesModel) => {
- return KubernetesModel['servicesResource'];
- }]);
-
-}
+///
+
+module Kubernetes {
+
+ // facade this to the watcher service
+ class KubernetesStateImpl implements KubernetesState {
+ constructor(private watcher:WatcherService) {
+ }
+ get namespaces():Array {
+ return _.map(this.watcher.getObjects(WatchTypes.NAMESPACES), (namespace) => {
+ return namespace.metadata.name;
+ });
+ }
+ get selectedNamespace():string {
+ return this.watcher.getNamespace();
+ }
+ set selectedNamespace(namespace:string) {
+ this.watcher.setNamespace(namespace);
+ }
+ }
+
+ _module.factory('KubernetesState', ['WatcherService', (watcher:WatcherService) => {
+ return new KubernetesStateImpl(watcher);
+ }]);
+
+ // TODO this doesn't need to be a service really
+ _module.factory('KubernetesApiURL', () => kubernetesApiUrl());
+
+ // TODO we'll get rid of this...
+ _module.factory('KubernetesVersion', [() => {
+ return {
+ query: () => null
+ }
+ }]);
+
+ // TODO let's move these into KubernetesModel so controllers don't have to inject them separately
+ _module.factory('KubernetesPods', ['KubernetesModel', (KubernetesModel) => {
+ return KubernetesModel['podsResource'];
+ }]);
+
+ _module.factory('KubernetesReplicationControllers', ['KubernetesModel', (KubernetesModel) => {
+ return KubernetesModel['replicationcontrollersResource'];
+ }]);
+
+ _module.factory('KubernetesServices', ['KubernetesModel', (KubernetesModel) => {
+ return KubernetesModel['servicesResource'];
+ }]);
+
+}
diff --git a/plugins/kubernetes/ts/kubernetesTopLevel.ts b/plugins/kubernetes/ts/kubernetesTopLevel.ts
index 49c9cf4..280d854 100644
--- a/plugins/kubernetes/ts/kubernetesTopLevel.ts
+++ b/plugins/kubernetes/ts/kubernetesTopLevel.ts
@@ -1,152 +1,152 @@
-///
-///
-///
-///
-
-module Kubernetes {
-
- export var FileDropController = controller("FileDropController", ["$scope", "KubernetesModel", "FileUploader", '$http', ($scope, model:KubernetesModelService, FileUploader, $http:ng.IHttpService) => {
-
- var log = Logger.get('kubernetes-file-uploader');
-
- var uploader = $scope.uploader = new FileUploader({
- autoUpload: false,
- removeAfterUpload: true,
- url: kubernetesApiUrl()
- });
-
- $scope.uploader.onAfterAddingFile = (file) => {
- var reader = new FileReader();
- reader.onload = () => {
- if (reader.readyState === 2) {
- log.debug("File added: ", file);
- var data = reader.result;
- var obj = null;
- if (_.endsWith(file._file.name, '.json')) {
- log.debug("Parsing JSON file");
- try {
- obj = angular.fromJson(data);
- } catch (err) {
- log.debug("Failed to read dropped file ", file._file.name, ": ", err);
- return;
- }
- } else if (_.endsWith(file._file.name, '.yaml')) {
- log.debug("Parsing YAML file");
- try {
- obj = jsyaml.load(data);
- } catch (err) {
- log.debug("Failed to read dropped file ", file._file.name, ": ", err);
- return;
- }
- } else {
- log.debug("Unknown file type for file: ", file._file.name);
- return;
- }
- log.debug("Dropped object: ", obj);
- if (!KubernetesAPI.getNamespace(obj)) {
- obj.metadata.namespace = model.currentNamespace();
- }
- KubernetesAPI.put({
- object: obj,
- success: (data) => {
- Core.notification("success", "Applied " + file._file.name);
- },
- error: (err) => {
- log.info("Got error applying", file._file.name, ": ", err);
- Core.notification("warning", "Failed to apply " + file._file.name + ", error: " + err.message);
- }
- });
- }
- }
- reader.readAsText(file._file);
- };
-
- $scope.uploader.onBeforeUploadItem = (item) => {
- log.debug("Uploading: ", item);
- //Core.notification('info', 'Uploading ' + item);
- };
-
- $scope.uploader.onSuccessItem = (item:FileUpload.IFileItem) => {
- log.debug("onSuccessItem: ", item);
- };
-
- $scope.uploader.onErrorItem = (item, response, status) => {
- log.debug("Failed to apply, response: ", response, " status: ", status);
- }
-
- }]);
-
- export var NamespaceController = controller('NamespaceController', ['$scope', 'WatcherService', ($scope, watcher:WatcherService) => {
- $scope.namespaces = watcher.getObjects('namespaces');
- $scope.$watchCollection('namespaces', (newValue, oldValue) => {
- if (newValue !== oldValue) {
- $scope.namespace = watcher.getNamespace();
- }
- });
- $scope.$watch('namespace', (newValue, oldValue) => {
- if (newValue !== oldValue) {
- if (newValue !== oldValue) {
- watcher.setNamespace(newValue);
- }
- }
- });
- }]);
-
- export var TopLevel = controller("TopLevel", ["$scope", "KubernetesVersion", "KubernetesState", ($scope, KubernetesVersion:ng.resource.IResourceClass, KubernetesState) => {
-
- $scope.version = undefined;
-
- $scope.showAppView = isAppView();
-
- $scope.isActive = (href) => {
- return isLinkActive(href);
- };
-
- $scope.mode = 'yaml';
- $scope.rawMode = true;
- $scope.dirty = false;
- $scope.readOnly = true;
- $scope.rawModel = null;
-
- $scope.$on('hawtioEditor_default_dirty', ($event, dirty) => {
- $scope.dirty = dirty;
- });
-
- $scope.save = (rawModel) => {
- var obj:any = null;
- var str = rawModel.replace(/\t/g, " ");
- try {
- obj = jsyaml.load(str);
- } catch (err) {
- Core.notification("warning", "Failed to save object, error: \"" + err + "\"");
- }
- if (!obj) {
- return;
- }
- $scope.readOnly = true;
- KubernetesAPI.put({
- object: obj,
- success: (data) => {
- $scope.dirty = false;
- Core.notification("success", "Saved object " + getName(obj));
- Core.$apply($scope);
- },
- error: (err) => {
- console.log("Got error: ", err);
- Core.notification("warning", "Failed to save object, error: \"" + err.message + "\"");
- $scope.dirty = false;
- Core.$apply($scope);
- }
- });
- };
-
-
- $scope.kubernetes = KubernetesState;
-
- KubernetesVersion.query((response) => {
- $scope.version = response;
- });
-
- }]);
-
-}
+///
+///
+///
+///
+
+module Kubernetes {
+
+ export var FileDropController = controller("FileDropController", ["$scope", "KubernetesModel", "FileUploader", '$http', ($scope, model:KubernetesModelService, FileUploader, $http:ng.IHttpService) => {
+
+ var log = Logger.get('kubernetes-file-uploader');
+
+ var uploader = $scope.uploader = new FileUploader({
+ autoUpload: false,
+ removeAfterUpload: true,
+ url: kubernetesApiUrl()
+ });
+
+ $scope.uploader.onAfterAddingFile = (file) => {
+ var reader = new FileReader();
+ reader.onload = () => {
+ if (reader.readyState === 2) {
+ log.debug("File added: ", file);
+ var data = reader.result;
+ var obj = null;
+ if (_.endsWith(file._file.name, '.json')) {
+ log.debug("Parsing JSON file");
+ try {
+ obj = angular.fromJson(data);
+ } catch (err) {
+ log.debug("Failed to read dropped file ", file._file.name, ": ", err);
+ return;
+ }
+ } else if (_.endsWith(file._file.name, '.yaml')) {
+ log.debug("Parsing YAML file");
+ try {
+ obj = jsyaml.load(data);
+ } catch (err) {
+ log.debug("Failed to read dropped file ", file._file.name, ": ", err);
+ return;
+ }
+ } else {
+ log.debug("Unknown file type for file: ", file._file.name);
+ return;
+ }
+ log.debug("Dropped object: ", obj);
+ if (!KubernetesAPI.getNamespace(obj)) {
+ obj.metadata.namespace = model.currentNamespace();
+ }
+ KubernetesAPI.put({
+ object: obj,
+ success: (data) => {
+ Core.notification("success", "Applied " + file._file.name);
+ },
+ error: (err) => {
+ log.info("Got error applying", file._file.name, ": ", err);
+ Core.notification("warning", "Failed to apply " + file._file.name + ", error: " + err.message);
+ }
+ });
+ }
+ }
+ reader.readAsText(file._file);
+ };
+
+ $scope.uploader.onBeforeUploadItem = (item) => {
+ log.debug("Uploading: ", item);
+ //Core.notification('info', 'Uploading ' + item);
+ };
+
+ $scope.uploader.onSuccessItem = (item:FileUpload.IFileItem) => {
+ log.debug("onSuccessItem: ", item);
+ };
+
+ $scope.uploader.onErrorItem = (item, response, status) => {
+ log.debug("Failed to apply, response: ", response, " status: ", status);
+ }
+
+ }]);
+
+ export var NamespaceController = controller('NamespaceController', ['$scope', 'WatcherService', ($scope, watcher:WatcherService) => {
+ $scope.namespaces = watcher.getObjects('namespaces');
+ $scope.$watchCollection('namespaces', (newValue, oldValue) => {
+ if (newValue !== oldValue) {
+ $scope.namespace = watcher.getNamespace();
+ }
+ });
+ $scope.$watch('namespace', (newValue, oldValue) => {
+ if (newValue !== oldValue) {
+ if (newValue !== oldValue) {
+ watcher.setNamespace(newValue);
+ }
+ }
+ });
+ }]);
+
+ export var TopLevel = controller("TopLevel", ["$scope", "KubernetesVersion", "KubernetesState", ($scope, KubernetesVersion:ng.resource.IResourceClass, KubernetesState) => {
+
+ $scope.version = undefined;
+
+ $scope.showAppView = isAppView();
+
+ $scope.isActive = (href) => {
+ return isLinkActive(href);
+ };
+
+ $scope.mode = 'yaml';
+ $scope.rawMode = true;
+ $scope.dirty = false;
+ $scope.readOnly = true;
+ $scope.rawModel = null;
+
+ $scope.$on('hawtioEditor_default_dirty', ($event, dirty) => {
+ $scope.dirty = dirty;
+ });
+
+ $scope.save = (rawModel) => {
+ var obj:any = null;
+ var str = rawModel.replace(/\t/g, " ");
+ try {
+ obj = jsyaml.load(str);
+ } catch (err) {
+ Core.notification("warning", "Failed to save object, error: \"" + err + "\"");
+ }
+ if (!obj) {
+ return;
+ }
+ $scope.readOnly = true;
+ KubernetesAPI.put({
+ object: obj,
+ success: (data) => {
+ $scope.dirty = false;
+ Core.notification("success", "Saved object " + getName(obj));
+ Core.$apply($scope);
+ },
+ error: (err) => {
+ console.log("Got error: ", err);
+ Core.notification("warning", "Failed to save object, error: \"" + err.message + "\"");
+ $scope.dirty = false;
+ Core.$apply($scope);
+ }
+ });
+ };
+
+
+ $scope.kubernetes = KubernetesState;
+
+ KubernetesVersion.query((response) => {
+ $scope.version = response;
+ });
+
+ }]);
+
+}
diff --git a/plugins/kubernetes/ts/namespace.ts b/plugins/kubernetes/ts/namespace.ts
index 5a3fe75..d2157c0 100644
--- a/plugins/kubernetes/ts/namespace.ts
+++ b/plugins/kubernetes/ts/namespace.ts
@@ -1,24 +1,24 @@
-///
-module Kubernetes {
-
- export var NamespaceController = controller("NamespaceController", ["$scope", "WatcherService", ($scope, watcher:WatcherService) => {
- $scope.watcher = watcher;
- $scope.namespaceObjects = watcher.getObjects('namespaces');
- $scope.namespace = watcher.getNamespace();
- $scope.namespaces = [];
- $scope.$watch('namespace', (newValue, oldValue) => {
- if (newValue !== oldValue) {
- watcher.setNamespace(newValue);
- }
- });
- $scope.$watch('watcher.getNamespace()', (newValue, oldValue) => {
- if (newValue !== oldValue) {
- $scope.namespace = newValue;
- }
- });
- $scope.$watchCollection('namespaceObjects', (namespaceObjects) => {
- $scope.namespaces = _.map(namespaceObjects, (namespace:any) => namespace.metadata.name);
- })
- }]);
-
+///
+module Kubernetes {
+
+ export var NamespaceController = controller("NamespaceController", ["$scope", "WatcherService", ($scope, watcher:WatcherService) => {
+ $scope.watcher = watcher;
+ $scope.namespaceObjects = watcher.getObjects('namespaces');
+ $scope.namespace = watcher.getNamespace();
+ $scope.namespaces = [];
+ $scope.$watch('namespace', (newValue, oldValue) => {
+ if (newValue !== oldValue) {
+ watcher.setNamespace(newValue);
+ }
+ });
+ $scope.$watch('watcher.getNamespace()', (newValue, oldValue) => {
+ if (newValue !== oldValue) {
+ $scope.namespace = newValue;
+ }
+ });
+ $scope.$watchCollection('namespaceObjects', (namespaceObjects) => {
+ $scope.namespaces = _.map(namespaceObjects, (namespace:any) => namespace.metadata.name);
+ })
+ }]);
+
}
\ No newline at end of file
diff --git a/plugins/kubernetes/ts/overview.ts b/plugins/kubernetes/ts/overview.ts
index f260887..dda746a 100644
--- a/plugins/kubernetes/ts/overview.ts
+++ b/plugins/kubernetes/ts/overview.ts
@@ -1,283 +1,283 @@
-///
-///
-///
-
-module Kubernetes {
-
- var OverviewDirective = _module.directive("kubernetesOverview", ["$templateCache", "$compile", "$interpolate", "$timeout", "$window", "KubernetesState", 'KubernetesModel', ($templateCache:ng.ITemplateCacheService, $compile:ng.ICompileService, $interpolate:ng.IInterpolateService, $timeout:ng.ITimeoutService, $window:ng.IWindowService, KubernetesState, KubernetesModel) => {
-
- var log = Logger.get('kubernetes-overview');
- var model = KubernetesModel;
- var state = KubernetesState;
-
- return {
- restrict: 'E',
- replace: true,
- link: (scope, element, attr) => {
- scope.model = model;
- element.css({visibility: 'hidden'});
- scope.getEntity = (type:string, key:string) => {
- switch (type) {
- case 'host':
- return model.podsByHost[key];
- case 'pod':
- return model.podsByKey[key];
- case 'replicationController':
- return model.replicationControllersByKey[key];
- case 'service':
- return model.servicesByKey[key];
- default:
- return undefined;
- }
- };
-
- scope.kubernetes = state;
-
- scope.customizeDefaultOptions = (options) => {
- options.Endpoint = ['Blank', {}];
- };
- scope.mouseEnter = ($event) => {
- if (scope.jsPlumb) {
- angular.element($event.currentTarget).addClass("hovered");
- scope.jsPlumb.getEndpoints($event.currentTarget).forEach((endpoint) => {
- endpoint.connections.forEach((connection) => {
- if (!connection.isHover()) {
- connection.setHover(true);
- connection.endpoints.forEach((e) => {
- scope.mouseEnter({
- currentTarget: e.element
- });
- });
- }
- });
- });
- }
- }
- scope.mouseLeave = ($event) => {
- if (scope.jsPlumb) {
- angular.element($event.currentTarget).removeClass("hovered");
- scope.jsPlumb.getEndpoints($event.currentTarget).forEach((endpoint) => {
- endpoint.connections.forEach((connection) => {
- if (connection.isHover()) {
- connection.setHover(false);
- connection.endpoints.forEach((e) => {
- scope.mouseLeave({
- currentTarget: e.element
- });
- });
- }
- });
- });
- }
- }
- /*
- scope.customizeEndpointOptions = (jsPlumb, node, options) => {
- var type = node.el.attr('data-type');
- // log.debug("endpoint type: ", type);
- switch (type) {
- case 'pod':
- break;
- case 'service':
- break;
- case 'replicationController':
- break;
- }
- };
- */
- scope.customizeConnectionOptions = (jsPlumb, edge, params, options) => {
- var type = edge.source.el.attr('data-type');
- options.connector = [ "Bezier", { curviness: 50, stub: 25, alwaysRespectStubs: true } ];
- params.paintStyle = {
- lineWidth: 2,
- strokeStyle: '#5555cc'
- };
- switch (type) {
- case 'pod':
- break;
- case 'service':
- params.anchors = [
- [ "Continuous", { faces: ["right"] } ],
- [ "Continuous", { faces: ["left"] } ]
- /*
- [1, 0.5, 0, 0, -10, -90],
- [0, 0.5, 0, 0, -10, -90]
- */
- ];
- break;
- case 'replicationController':
- params.anchors = [
- [ "Perimeter", { shape: "Circle" } ],
- [ "Continuous", { faces: ["right"] } ]
- /*
- [0, 0.5, 0, 0, -10, -90],
- [1, 0.5, 0, 0, -10, -90]
- */
- ];
- break;
- }
- //log.debug("connection source type: ", type);
- return options;
- };
- function interpolate(template, config) {
- return $interpolate(template)(config);
- }
- function createElement(template, thingName, thing) {
- var config = {};
- config[thingName] = thing;
- return interpolate(template, config);
- }
- function createElements(template, thingName, things) {
- return things.map((thing) => {
- return createElement(template, thingName, thing);
- });
- }
- function appendNewElements(parentEl, template, thingName, things) {
- things.forEach((thing) => {
- var key = thing['_key'] || thing['elementId'] || thing['id']
- var existing = parentEl.find("#" + key );
- if (!existing.length) {
- log.debug("existing: ", existing, " key: ", key);
- parentEl.append($compile(createElement(template, thingName, thing))(scope));
- }
- });
- }
- function namespaceFilter(item) {
- return getNamespace(item) === scope.kubernetes.selectedNamespace;
- }
- function firstDraw() {
- log.debug("First draw");
- element.empty();
- var services = model.services;
- var replicationControllers = model.replicationControllers;
- var pods = model.pods;
- var hosts = model.hosts;
- // log.debug("hosts: ", model.hosts);
- var parentEl = angular.element($templateCache.get("overviewTemplate.html"));
- var servicesEl = parentEl.find(".services");
- var hostsEl = parentEl.find(".hosts");
- var replicationControllersEl = parentEl.find(".replicationControllers");
-
- servicesEl.append(createElements($templateCache.get("serviceTemplate.html"), 'service', services.filter(namespaceFilter)));
- replicationControllersEl.append(createElements($templateCache.get("replicationControllerTemplate.html"), 'replicationController', replicationControllers.filter(namespaceFilter)));
-
- hosts.forEach((host) => {
- var hostEl = angular.element(createElement($templateCache.get("overviewHostTemplate.html"), 'host', host));
- var podContainer = angular.element(hostEl.find('.pod-container'));
- podContainer.append(createElements($templateCache.get("podTemplate.html"), "pod", host.pods));
- hostsEl.append(hostEl);
- });
- //parentEl.append(createElements($templateCache.get("podTemplate.html"), 'pod', pods));
- element.append($compile(parentEl)(scope));
- $timeout(() => { element.css({visibility: 'visible'}); }, 250);
- }
-
- function update() {
- scope.$emit('jsplumbDoWhileSuspended', () => {
- log.debug("Update");
- var services = model.services;
- var replicationControllers = model.replicationControllers;
- var pods = model.pods;
- var hosts = model.hosts;
- var parentEl = element.find('[hawtio-jsplumb]');
- var children = parentEl.find('.jsplumb-node');
- children.each((index, c) => {
- var child = angular.element(c);
- var key = child.attr('id');
- log.debug('key: ', key);
- if (Core.isBlank(key)) {
- return;
- }
- var type = child.attr('data-type');
- switch (type) {
- case 'host':
- if (key in model.podsByHost) {
- return;
- }
- break;
- case 'service':
- if (key in model.servicesByKey && getNamespace(model.servicesByKey[key]) == scope.kubernetes.selectedNamespace) {
- var service = model.servicesByKey[key];
- child.attr('connect-to', service.connectTo);
- return;
- }
- break;
- case 'pod':
- /*
- if (hasId(pods, id)) {
- return;
- }
- */
- if (key in model.podsByKey) {
- return;
- }
- break;
- case 'replicationController':
- if (key in model.replicationControllersByKey) {
- var replicationController = model.replicationControllersByKey[key];
- child.attr('connect-to', replicationController.connectTo);
- return;
- }
- break;
- default:
- log.debug("Ignoring element with unknown type");
- return;
- }
- log.debug("Removing: ", key);
- child.remove();
- });
- var servicesEl = element.find(".services");
- var replicationControllersEl = element.find(".replicationControllers");
- var hostsEl = element.find(".hosts");
-
- appendNewElements(servicesEl, $templateCache.get("serviceTemplate.html"), "service", services);
- appendNewElements(replicationControllersEl, $templateCache.get("replicationControllerTemplate.html"), "replicationController", replicationControllers);
- appendNewElements(hostsEl, $templateCache.get("overviewHostTemplate.html"), "host", hosts);
- hosts.forEach((host) => {
- var hostEl = angular.element(hostsEl.find("#" + host.elementId));
- var podContainer = angular.element(hostEl.find('.pod-container'));
- appendNewElements(podContainer, $templateCache.get("podTemplate.html"), "pod", host.pods);
- });
- });
- }
-
- function refreshDrawing() {
- log.debug("Refreshing drawing");
- if (element.children().length === 0) {
- firstDraw();
- } else {
- update();
- }
- Core.$apply(scope);
- }
-
- scope.$on('kubernetesModelUpdated', _.debounce(refreshDrawing, 500, { trailing: true}));
- setTimeout(refreshDrawing, 100);
- }
- };
- }]);
-
- var OverviewBoxController = controller("OverviewBoxController", ["$scope", "$location", ($scope, $location:ng.ILocationService) => {
- $scope.viewDetails = (entity, path:string) => {
- if (entity) {
- var namespace = getNamespace(entity);
- var id = getName(entity);
- $location.path(UrlHelpers.join('/kubernetes/namespace', namespace, path, id));
- } else {
- log.warn("No entity for viewDetails!");
- }
- }
- }]);
-
- var scopeName = "OverviewController";
-
- var OverviewController = controller(scopeName, ["$scope", "$location", "$http", "$timeout", "$routeParams", "KubernetesModel","KubernetesState", "KubernetesApiURL", ($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL) => {
- $scope.name = scopeName;
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- //$scope.subTabConfig = [];
- }]);
-
-}
+///
+///
+///
+
+module Kubernetes {
+
+ var OverviewDirective = _module.directive("kubernetesOverview", ["$templateCache", "$compile", "$interpolate", "$timeout", "$window", "KubernetesState", 'KubernetesModel', ($templateCache:ng.ITemplateCacheService, $compile:ng.ICompileService, $interpolate:ng.IInterpolateService, $timeout:ng.ITimeoutService, $window:ng.IWindowService, KubernetesState, KubernetesModel) => {
+
+ var log = Logger.get('kubernetes-overview');
+ var model = KubernetesModel;
+ var state = KubernetesState;
+
+ return {
+ restrict: 'E',
+ replace: true,
+ link: (scope, element, attr) => {
+ scope.model = model;
+ element.css({visibility: 'hidden'});
+ scope.getEntity = (type:string, key:string) => {
+ switch (type) {
+ case 'host':
+ return model.podsByHost[key];
+ case 'pod':
+ return model.podsByKey[key];
+ case 'replicationController':
+ return model.replicationControllersByKey[key];
+ case 'service':
+ return model.servicesByKey[key];
+ default:
+ return undefined;
+ }
+ };
+
+ scope.kubernetes = state;
+
+ scope.customizeDefaultOptions = (options) => {
+ options.Endpoint = ['Blank', {}];
+ };
+ scope.mouseEnter = ($event) => {
+ if (scope.jsPlumb) {
+ angular.element($event.currentTarget).addClass("hovered");
+ scope.jsPlumb.getEndpoints($event.currentTarget).forEach((endpoint) => {
+ endpoint.connections.forEach((connection) => {
+ if (!connection.isHover()) {
+ connection.setHover(true);
+ connection.endpoints.forEach((e) => {
+ scope.mouseEnter({
+ currentTarget: e.element
+ });
+ });
+ }
+ });
+ });
+ }
+ }
+ scope.mouseLeave = ($event) => {
+ if (scope.jsPlumb) {
+ angular.element($event.currentTarget).removeClass("hovered");
+ scope.jsPlumb.getEndpoints($event.currentTarget).forEach((endpoint) => {
+ endpoint.connections.forEach((connection) => {
+ if (connection.isHover()) {
+ connection.setHover(false);
+ connection.endpoints.forEach((e) => {
+ scope.mouseLeave({
+ currentTarget: e.element
+ });
+ });
+ }
+ });
+ });
+ }
+ }
+ /*
+ scope.customizeEndpointOptions = (jsPlumb, node, options) => {
+ var type = node.el.attr('data-type');
+ // log.debug("endpoint type: ", type);
+ switch (type) {
+ case 'pod':
+ break;
+ case 'service':
+ break;
+ case 'replicationController':
+ break;
+ }
+ };
+ */
+ scope.customizeConnectionOptions = (jsPlumb, edge, params, options) => {
+ var type = edge.source.el.attr('data-type');
+ options.connector = [ "Bezier", { curviness: 50, stub: 25, alwaysRespectStubs: true } ];
+ params.paintStyle = {
+ lineWidth: 2,
+ strokeStyle: '#5555cc'
+ };
+ switch (type) {
+ case 'pod':
+ break;
+ case 'service':
+ params.anchors = [
+ [ "Continuous", { faces: ["right"] } ],
+ [ "Continuous", { faces: ["left"] } ]
+ /*
+ [1, 0.5, 0, 0, -10, -90],
+ [0, 0.5, 0, 0, -10, -90]
+ */
+ ];
+ break;
+ case 'replicationController':
+ params.anchors = [
+ [ "Perimeter", { shape: "Circle" } ],
+ [ "Continuous", { faces: ["right"] } ]
+ /*
+ [0, 0.5, 0, 0, -10, -90],
+ [1, 0.5, 0, 0, -10, -90]
+ */
+ ];
+ break;
+ }
+ //log.debug("connection source type: ", type);
+ return options;
+ };
+ function interpolate(template, config) {
+ return $interpolate(template)(config);
+ }
+ function createElement(template, thingName, thing) {
+ var config = {};
+ config[thingName] = thing;
+ return interpolate(template, config);
+ }
+ function createElements(template, thingName, things) {
+ return things.map((thing) => {
+ return createElement(template, thingName, thing);
+ });
+ }
+ function appendNewElements(parentEl, template, thingName, things) {
+ things.forEach((thing) => {
+ var key = thing['_key'] || thing['elementId'] || thing['id']
+ var existing = parentEl.find("#" + key );
+ if (!existing.length) {
+ log.debug("existing: ", existing, " key: ", key);
+ parentEl.append($compile(createElement(template, thingName, thing))(scope));
+ }
+ });
+ }
+ function namespaceFilter(item) {
+ return getNamespace(item) === scope.kubernetes.selectedNamespace;
+ }
+ function firstDraw() {
+ log.debug("First draw");
+ element.empty();
+ var services = model.services;
+ var replicationControllers = model.replicationControllers;
+ var pods = model.pods;
+ var hosts = model.hosts;
+ // log.debug("hosts: ", model.hosts);
+ var parentEl = angular.element($templateCache.get("overviewTemplate.html"));
+ var servicesEl = parentEl.find(".services");
+ var hostsEl = parentEl.find(".hosts");
+ var replicationControllersEl = parentEl.find(".replicationControllers");
+
+ servicesEl.append(createElements($templateCache.get("serviceTemplate.html"), 'service', services.filter(namespaceFilter)));
+ replicationControllersEl.append(createElements($templateCache.get("replicationControllerTemplate.html"), 'replicationController', replicationControllers.filter(namespaceFilter)));
+
+ hosts.forEach((host) => {
+ var hostEl = angular.element(createElement($templateCache.get("overviewHostTemplate.html"), 'host', host));
+ var podContainer = angular.element(hostEl.find('.pod-container'));
+ podContainer.append(createElements($templateCache.get("podTemplate.html"), "pod", host.pods));
+ hostsEl.append(hostEl);
+ });
+ //parentEl.append(createElements($templateCache.get("podTemplate.html"), 'pod', pods));
+ element.append($compile(parentEl)(scope));
+ $timeout(() => { element.css({visibility: 'visible'}); }, 250);
+ }
+
+ function update() {
+ scope.$emit('jsplumbDoWhileSuspended', () => {
+ log.debug("Update");
+ var services = model.services;
+ var replicationControllers = model.replicationControllers;
+ var pods = model.pods;
+ var hosts = model.hosts;
+ var parentEl = element.find('[hawtio-jsplumb]');
+ var children = parentEl.find('.jsplumb-node');
+ children.each((index, c) => {
+ var child = angular.element(c);
+ var key = child.attr('id');
+ log.debug('key: ', key);
+ if (Core.isBlank(key)) {
+ return;
+ }
+ var type = child.attr('data-type');
+ switch (type) {
+ case 'host':
+ if (key in model.podsByHost) {
+ return;
+ }
+ break;
+ case 'service':
+ if (key in model.servicesByKey && getNamespace(model.servicesByKey[key]) == scope.kubernetes.selectedNamespace) {
+ var service = model.servicesByKey[key];
+ child.attr('connect-to', service.connectTo);
+ return;
+ }
+ break;
+ case 'pod':
+ /*
+ if (hasId(pods, id)) {
+ return;
+ }
+ */
+ if (key in model.podsByKey) {
+ return;
+ }
+ break;
+ case 'replicationController':
+ if (key in model.replicationControllersByKey) {
+ var replicationController = model.replicationControllersByKey[key];
+ child.attr('connect-to', replicationController.connectTo);
+ return;
+ }
+ break;
+ default:
+ log.debug("Ignoring element with unknown type");
+ return;
+ }
+ log.debug("Removing: ", key);
+ child.remove();
+ });
+ var servicesEl = element.find(".services");
+ var replicationControllersEl = element.find(".replicationControllers");
+ var hostsEl = element.find(".hosts");
+
+ appendNewElements(servicesEl, $templateCache.get("serviceTemplate.html"), "service", services);
+ appendNewElements(replicationControllersEl, $templateCache.get("replicationControllerTemplate.html"), "replicationController", replicationControllers);
+ appendNewElements(hostsEl, $templateCache.get("overviewHostTemplate.html"), "host", hosts);
+ hosts.forEach((host) => {
+ var hostEl = angular.element(hostsEl.find("#" + host.elementId));
+ var podContainer = angular.element(hostEl.find('.pod-container'));
+ appendNewElements(podContainer, $templateCache.get("podTemplate.html"), "pod", host.pods);
+ });
+ });
+ }
+
+ function refreshDrawing() {
+ log.debug("Refreshing drawing");
+ if (element.children().length === 0) {
+ firstDraw();
+ } else {
+ update();
+ }
+ Core.$apply(scope);
+ }
+
+ scope.$on('kubernetesModelUpdated', _.debounce(refreshDrawing, 500, { trailing: true}));
+ setTimeout(refreshDrawing, 100);
+ }
+ };
+ }]);
+
+ var OverviewBoxController = controller("OverviewBoxController", ["$scope", "$location", ($scope, $location:ng.ILocationService) => {
+ $scope.viewDetails = (entity, path:string) => {
+ if (entity) {
+ var namespace = getNamespace(entity);
+ var id = getName(entity);
+ $location.path(UrlHelpers.join('/kubernetes/namespace', namespace, path, id));
+ } else {
+ log.warn("No entity for viewDetails!");
+ }
+ }
+ }]);
+
+ var scopeName = "OverviewController";
+
+ var OverviewController = controller(scopeName, ["$scope", "$location", "$http", "$timeout", "$routeParams", "KubernetesModel","KubernetesState", "KubernetesApiURL", ($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL) => {
+ $scope.name = scopeName;
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ //$scope.subTabConfig = [];
+ }]);
+
+}
diff --git a/plugins/kubernetes/ts/pipelines.ts b/plugins/kubernetes/ts/pipelines.ts
index e29ea13..9232443 100644
--- a/plugins/kubernetes/ts/pipelines.ts
+++ b/plugins/kubernetes/ts/pipelines.ts
@@ -1,174 +1,174 @@
-///
-///
-
-module Kubernetes {
-
- export var PipelinesController = controller("PipelinesController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- /**
- * Lets update the various data to join them together to a pipeline model
- */
- function updateData() {
- var pipelineSteps = {};
- if ($scope.buildConfigs && $scope.builds && $scope.deploymentConfigs) {
- enrichBuildConfigs($scope.buildConfigs, $scope.builds);
- $scope.fetched = true;
-
- angular.forEach($scope.buildConfigs, (buildConfig) => {
- var pipelineKey = createPipelineKey(buildConfig);
- if (pipelineKey) {
- pipelineSteps[pipelineKey] = {
- buildConfig: buildConfig,
- builds: [],
- triggeredBy: null,
- triggersSteps: [],
- $class: 'pipeline-build'
- }
- }
- });
- angular.forEach($scope.builds, (build) => {
- var pipelineKey = createPipelineKey(build);
- if (pipelineKey) {
- var pipeline = pipelineSteps[pipelineKey];
- if (!pipeline) {
- //console.log("warning no pipeline generated for buildConfig for key " + pipelineKey + " for build " + angular.toJson(build, true));
- console.log("warning no pipeline generated for buildConfig for key " + pipelineKey + " for build " + build.$name);
- } else {
- pipeline.builds.push(build);
- }
- }
- });
-
- // TODO now we need to look at the triggers to figure out which pipelineSteps triggers each pipelineStep
-
-
- // now lets create an array of all pipelines, starting from the first known step with a list of the steps
-
- var pipelines = [];
- angular.forEach(pipelineSteps, (pipelineStep, key) => {
- if (!pipelineStep.triggeredBy) {
- // we are a root step....
- pipelines.push(pipelineStep);
- // now lets add all the steps for this key...
- pipelineStep.triggersSteps.push(pipelineStep);
- angular.forEach(pipelineSteps, (step) => {
- if (step.triggeredBy === key) {
- pipelineStep.triggersSteps.push(step);
- }
- });
- }
- });
-
- angular.forEach($scope.deploymentConfigs, (deploymentConfig) => {
- if (!deploymentConfig.kind) {
- deploymentConfig.kind = "DeploymentConfig";
- }
- angular.forEach(deploymentConfig.triggers, (trigger) => {
- var type = trigger.type;
- var imageChangeParams = trigger.imageChangeParams;
- if (imageChangeParams && type === "ImageChange") {
- var from = imageChangeParams.from;
- if (from) {
- var name = from.name;
- if (from.kind === "ImageRepository") {
- var tag = imageChangeParams.tag || "latest";
- if (name) {
- // now lets find a pipeline step which fires from this
- angular.forEach(pipelineSteps, (pipelineStep, key) => {
- var to = Core.pathGet(pipelineStep, ["buildConfig", "parameters", "output", "to"]);
- if (to && (to.kind === "ImageRepository" || to.kind === "ImageStream")) {
- var toName = to.name;
- if (toName === name) {
- var selector = Core.pathGet(deploymentConfig, ["template", "controllerTemplate", "selector"]);
- var pods = [];
- var $podCounters = selector ? createPodCounters(selector, KubernetesModel.podsForNamespace(), pods) : null;
- var deployPipelineStep = {
- buildConfig: deploymentConfig,
- $class: 'pipeline-deploy',
- $podCounters: $podCounters,
- $pods: pods
- };
- pipelineStep.triggersSteps.push(deployPipelineStep);
- }
- }
- });
- }
- }
- }
- }
- });
- });
- $scope.pipelines = pipelines;
- }
- }
-
- /**
- * Lets create a unique key for build / config we can use to do linking of builds / configs / triggers
- */
- function createPipelineKey(buildConfig) {
- return Core.pathGet(buildConfig, ["parameters", "source", "git", "uri"]);
- }
-
- $scope.$keepPolling = () => keepPollingModel;
- $scope.fetch = PollHelpers.setupPolling($scope, (next:() => void) => {
- var ready = 0;
- var numServices = 3;
-
- function maybeNext() {
- if (++ready >= numServices) {
- next();
- }
- }
-
- var url = buildsRestURL();
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.builds = enrichBuilds(data.items);
- updateData();
- }
- maybeNext();
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- maybeNext();
-
- });
- url = buildConfigsRestURL();
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.buildConfigs = data.items;
- updateData();
- }
- maybeNext();
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- maybeNext();
- });
- url = deploymentConfigsRestURL();
- $http.get(url).
- success(function (data, status, headers, config) {
- if (data) {
- $scope.deploymentConfigs = data.items;
- updateData();
- }
- maybeNext();
- }).
- error(function (data, status, headers, config) {
- log.warn("Failed to load " + url + " " + data + " " + status);
- maybeNext();
- });
- });
-
- $scope.fetch();
- }]);
-
-}
+///
+///
+
+module Kubernetes {
+
+ export var PipelinesController = controller("PipelinesController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ /**
+ * Lets update the various data to join them together to a pipeline model
+ */
+ function updateData() {
+ var pipelineSteps = {};
+ if ($scope.buildConfigs && $scope.builds && $scope.deploymentConfigs) {
+ enrichBuildConfigs($scope.buildConfigs, $scope.builds);
+ $scope.fetched = true;
+
+ angular.forEach($scope.buildConfigs, (buildConfig) => {
+ var pipelineKey = createPipelineKey(buildConfig);
+ if (pipelineKey) {
+ pipelineSteps[pipelineKey] = {
+ buildConfig: buildConfig,
+ builds: [],
+ triggeredBy: null,
+ triggersSteps: [],
+ $class: 'pipeline-build'
+ }
+ }
+ });
+ angular.forEach($scope.builds, (build) => {
+ var pipelineKey = createPipelineKey(build);
+ if (pipelineKey) {
+ var pipeline = pipelineSteps[pipelineKey];
+ if (!pipeline) {
+ //console.log("warning no pipeline generated for buildConfig for key " + pipelineKey + " for build " + angular.toJson(build, true));
+ console.log("warning no pipeline generated for buildConfig for key " + pipelineKey + " for build " + build.$name);
+ } else {
+ pipeline.builds.push(build);
+ }
+ }
+ });
+
+ // TODO now we need to look at the triggers to figure out which pipelineSteps triggers each pipelineStep
+
+
+ // now lets create an array of all pipelines, starting from the first known step with a list of the steps
+
+ var pipelines = [];
+ angular.forEach(pipelineSteps, (pipelineStep, key) => {
+ if (!pipelineStep.triggeredBy) {
+ // we are a root step....
+ pipelines.push(pipelineStep);
+ // now lets add all the steps for this key...
+ pipelineStep.triggersSteps.push(pipelineStep);
+ angular.forEach(pipelineSteps, (step) => {
+ if (step.triggeredBy === key) {
+ pipelineStep.triggersSteps.push(step);
+ }
+ });
+ }
+ });
+
+ angular.forEach($scope.deploymentConfigs, (deploymentConfig) => {
+ if (!deploymentConfig.kind) {
+ deploymentConfig.kind = "DeploymentConfig";
+ }
+ angular.forEach(deploymentConfig.triggers, (trigger) => {
+ var type = trigger.type;
+ var imageChangeParams = trigger.imageChangeParams;
+ if (imageChangeParams && type === "ImageChange") {
+ var from = imageChangeParams.from;
+ if (from) {
+ var name = from.name;
+ if (from.kind === "ImageRepository") {
+ var tag = imageChangeParams.tag || "latest";
+ if (name) {
+ // now lets find a pipeline step which fires from this
+ angular.forEach(pipelineSteps, (pipelineStep, key) => {
+ var to = Core.pathGet(pipelineStep, ["buildConfig", "parameters", "output", "to"]);
+ if (to && (to.kind === "ImageRepository" || to.kind === "ImageStream")) {
+ var toName = to.name;
+ if (toName === name) {
+ var selector = Core.pathGet(deploymentConfig, ["template", "controllerTemplate", "selector"]);
+ var pods = [];
+ var $podCounters = selector ? createPodCounters(selector, KubernetesModel.podsForNamespace(), pods) : null;
+ var deployPipelineStep = {
+ buildConfig: deploymentConfig,
+ $class: 'pipeline-deploy',
+ $podCounters: $podCounters,
+ $pods: pods
+ };
+ pipelineStep.triggersSteps.push(deployPipelineStep);
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+ });
+ });
+ $scope.pipelines = pipelines;
+ }
+ }
+
+ /**
+ * Lets create a unique key for build / config we can use to do linking of builds / configs / triggers
+ */
+ function createPipelineKey(buildConfig) {
+ return Core.pathGet(buildConfig, ["parameters", "source", "git", "uri"]);
+ }
+
+ $scope.$keepPolling = () => keepPollingModel;
+ $scope.fetch = PollHelpers.setupPolling($scope, (next:() => void) => {
+ var ready = 0;
+ var numServices = 3;
+
+ function maybeNext() {
+ if (++ready >= numServices) {
+ next();
+ }
+ }
+
+ var url = buildsRestURL();
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.builds = enrichBuilds(data.items);
+ updateData();
+ }
+ maybeNext();
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ maybeNext();
+
+ });
+ url = buildConfigsRestURL();
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.buildConfigs = data.items;
+ updateData();
+ }
+ maybeNext();
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ maybeNext();
+ });
+ url = deploymentConfigsRestURL();
+ $http.get(url).
+ success(function (data, status, headers, config) {
+ if (data) {
+ $scope.deploymentConfigs = data.items;
+ updateData();
+ }
+ maybeNext();
+ }).
+ error(function (data, status, headers, config) {
+ log.warn("Failed to load " + url + " " + data + " " + status);
+ maybeNext();
+ });
+ });
+
+ $scope.fetch();
+ }]);
+
+}
diff --git a/plugins/kubernetes/ts/pod.ts b/plugins/kubernetes/ts/pod.ts
index 047d224..0242e0f 100644
--- a/plugins/kubernetes/ts/pod.ts
+++ b/plugins/kubernetes/ts/pod.ts
@@ -1,71 +1,71 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var PodController = controller("PodController",
- ["$scope", "KubernetesModel", "KubernetesState", "ServiceRegistry", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "$window", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, ServiceRegistry,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, $window, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.rawModel = null;
-
- $scope.itemConfig = {
- properties: {
- 'containers/image$': {
- template: $templateCache.get('imageTemplate.html')
- },
- 'status/phase': {
- template: $templateCache.get('statusTemplate.html')
- },
- '\\/Env\\/': {
- template: $templateCache.get('envItemTemplate.html')
- },
- '^\\/labels$': {
- template: $templateCache.get('labelTemplate.html')
- },
- '\\/env\\/key$': {
- hidden: true
- }
- }
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- $scope.$watch('model.pods', (newValue, oldValue) => {
- updateData();
- }, true);
-
- $scope.flipRaw = () => {
- $scope.rawMode = !$scope.rawMode;
- Core.$apply($scope);
- };
-
- $scope.openLogs = () => {
- var pods = [$scope.item];
- openLogsForPods(ServiceRegistry, $window, KubernetesModel.currentNamespace(), pods);
- };
-
- updateData();
-
- function updateData() {
- $scope.id = $routeParams["id"];
- $scope.item = $scope.model.getPod(KubernetesState.selectedNamespace, $scope.id);
- if ($scope.item) {
- $scope.rawModel = toRawYaml($scope.item);
- }
- Core.$apply($scope);
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var PodController = controller("PodController",
+ ["$scope", "KubernetesModel", "KubernetesState", "ServiceRegistry", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "$window", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, ServiceRegistry,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, $window, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.rawModel = null;
+
+ $scope.itemConfig = {
+ properties: {
+ 'containers/image$': {
+ template: $templateCache.get('imageTemplate.html')
+ },
+ 'status/phase': {
+ template: $templateCache.get('statusTemplate.html')
+ },
+ '\\/Env\\/': {
+ template: $templateCache.get('envItemTemplate.html')
+ },
+ '^\\/labels$': {
+ template: $templateCache.get('labelTemplate.html')
+ },
+ '\\/env\\/key$': {
+ hidden: true
+ }
+ }
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ $scope.$watch('model.pods', (newValue, oldValue) => {
+ updateData();
+ }, true);
+
+ $scope.flipRaw = () => {
+ $scope.rawMode = !$scope.rawMode;
+ Core.$apply($scope);
+ };
+
+ $scope.openLogs = () => {
+ var pods = [$scope.item];
+ openLogsForPods(ServiceRegistry, $window, KubernetesModel.currentNamespace(), pods);
+ };
+
+ updateData();
+
+ function updateData() {
+ $scope.id = $routeParams["id"];
+ $scope.item = $scope.model.getPod(KubernetesState.selectedNamespace, $scope.id);
+ if ($scope.item) {
+ $scope.rawModel = toRawYaml($scope.item);
+ }
+ Core.$apply($scope);
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/podEdit.ts b/plugins/kubernetes/ts/podEdit.ts
index 87f6bdf..4adf067 100644
--- a/plugins/kubernetes/ts/podEdit.ts
+++ b/plugins/kubernetes/ts/podEdit.ts
@@ -1,41 +1,41 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var PodEditController = controller("PodEditController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, schemas:HawtioForms.SchemaRegistry) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
- $scope.schema = KubernetesSchema;
- $scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.Pod");
- //$scope.config = KubernetesSchema.definitions.kubernetes_v1beta2_Pod;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- updateData();
-
- function updateData() {
- if ($scope.id) {
- $scope.entity = $scope.model.getPod(KubernetesState.selectedNamespace, $scope.id);
- Core.$apply($scope);
- $scope.fetched = true;
- } else {
- $scope.fetched = true;
- }
- }
-
- $scope.save = ()=>{
- console.log($scope.entity);
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var PodEditController = controller("PodEditController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, schemas:HawtioForms.SchemaRegistry) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+ $scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.Pod");
+ //$scope.config = KubernetesSchema.definitions.kubernetes_v1beta2_Pod;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ updateData();
+
+ function updateData() {
+ if ($scope.id) {
+ $scope.entity = $scope.model.getPod(KubernetesState.selectedNamespace, $scope.id);
+ Core.$apply($scope);
+ $scope.fetched = true;
+ } else {
+ $scope.fetched = true;
+ }
+ }
+
+ $scope.save = ()=>{
+ console.log($scope.entity);
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/podLogs.ts b/plugins/kubernetes/ts/podLogs.ts
index 7f1fd69..7d63ee9 100644
--- a/plugins/kubernetes/ts/podLogs.ts
+++ b/plugins/kubernetes/ts/podLogs.ts
@@ -1,164 +1,164 @@
-///
-///
-
-module Kubernetes {
-
- var log = Logger.get("kubernetes-pod-logs");
-
- _module.service("PodLogReplacements", () => {
- return [];
- });
-
- _module.run((PodLogReplacements) => {
- var log = Logger.get("pod-log-replacers");
- // Add ANSI escape character replacer
- // adapted from https://github.com/mmalecki/ansispan
- var colors = {
- '30': 'black',
- '31': 'red',
- '32': 'green',
- '33': 'yellow',
- '34': 'blue',
- '35': 'purple',
- '36': 'cyan',
- '37': 'white'
- }
- PodLogReplacements.push((msg) => {
- if (!msg) {
- return msg;
- }
- var end = "";
- _.forOwn(colors, (color, code) => {
- var start = ``;
- msg = msg.replace(new RegExp('\033\\[' + code + 'm', 'g'), start)
- msg = msg.replace(new RegExp('\033\\[0;' + code + 'm', 'g'), start);
- });
- msg = msg.replace(/\033\[1m/g, '').replace(/\033\[22m/g, '');
- msg = msg.replace(/\033\[3m/g, '').replace(/\033\[23m/g, '');
- msg = msg.replace(/\033\[m/g, end);
- msg = msg.replace(/\033\[0m/g, end);
- msg = msg.replace(/\033\[39m/g, end);
- msg = msg.replace(/\033\[2m/g, '');
- msg = msg.replace(/\033\[0;39m/g, end);
- log.debug("Running replacement on message: ", msg);
- return msg;
- });
- });
-
- _module.controller("Kubernetes.PodLogLinkController", ($scope, $interval, TerminalService, $templateCache) => {
-
- $scope.openLogs = (entity) => {
- log.debug("Open logs: ", entity);
- TerminalService.newTerminal($interval, entity.metadata.selfLink, entity.$oracleName, entity,$templateCache.get(UrlHelpers.join(templatePath, 'logShell.html')));
- }
-
- });
-
- _module.directive('podLogDisplay', (userDetails, PodLogReplacements) => {
- return {
- restrict: 'E',
- template: `
-
- `,
- link: (scope:any, element, attr) => {
- var link = scope.$eval('podLink');
- var name = scope.$eval('containerName');
-
- if (!link) {
- return;
- }
-
- scope.fetched = false;
- scope.previous = false;
- scope.messages = [];
-
- link = UrlHelpers.join(masterApiUrl(), link, 'log');
- link = KubernetesAPI.wsUrl(link);
- link.search({
- follow: true,
- tailLines: 1000,
- access_token: userDetails.token
- });
-
- var messages = [];
-
- var pullMessages = _.debounce(() => {
- scope.messages = scope.messages.concat(_.remove(messages, () => true).map((msg) => {
- PodLogReplacements.forEach((replFunc:any) => {
- if (angular.isFunction(replFunc)) {
- msg = replFunc(msg);
- }
- });
- return msg;
- }));
- if (!scope.fetched) {
- scope.fetched = true;
- }
- Core.$apply(scope);
- }, 1000);
-
- function initSocket(link) {
- scope.fetched = false;
- messages.length = 0;
- scope.messages.length = 0;
- var ws = new WebSocket(link.toString(), 'base64.binary.k8s.io');
- ws.onmessage = (event) => {
- try {
- var message = window.atob(event.data);
- messages.push(message);
- pullMessages();
- } catch (err) {
- // we'll just ignore these
- //log.debug("Failed to decode message: ", event.data, " error: ", err);
- }
- }
- return ws;
- }
-
- var ws = initSocket(link);
-
- scope.$watch('previous', (value, old) => {
- if (value !== old) {
- if (link.hasSearch('previous')) {
- link.removeSearch('previous').addSearch('previous', scope.previous);
- } else {
- link.addSearch('previous', scope.previous);
- }
- ws.close();
- ws = initSocket(link);
- }
- });
-
- element.on('$destroy', () => {
- if (ws) {
- try {
- ws.close();
- } catch (err) {
- // nothing to do
- }
- delete ws;
- }
- });
- }
- }
- });
-
- _module.directive('podLogWindow', ($compile, TerminalService) => {
- return {
- restrict: 'A',
- scope: false,
- link: (scope:any, element, attr) => {
- addWindowActions(scope, element, TerminalService);
- scope.atBottom = true;
- scope.$watch('atBottom', (val) => {
- console.log("atBottom: ", val);
- });
- }
- };
- });
-
-}
+///
+///
+
+module Kubernetes {
+
+ var log = Logger.get("kubernetes-pod-logs");
+
+ _module.service("PodLogReplacements", () => {
+ return [];
+ });
+
+ _module.run((PodLogReplacements) => {
+ var log = Logger.get("pod-log-replacers");
+ // Add ANSI escape character replacer
+ // adapted from https://github.com/mmalecki/ansispan
+ var colors = {
+ '30': 'black',
+ '31': 'red',
+ '32': 'green',
+ '33': 'yellow',
+ '34': 'blue',
+ '35': 'purple',
+ '36': 'cyan',
+ '37': 'white'
+ }
+ PodLogReplacements.push((msg) => {
+ if (!msg) {
+ return msg;
+ }
+ var end = "";
+ _.forOwn(colors, (color, code) => {
+ var start = ``;
+ msg = msg.replace(new RegExp('\033\\[' + code + 'm', 'g'), start)
+ msg = msg.replace(new RegExp('\033\\[0;' + code + 'm', 'g'), start);
+ });
+ msg = msg.replace(/\033\[1m/g, '').replace(/\033\[22m/g, '');
+ msg = msg.replace(/\033\[3m/g, '').replace(/\033\[23m/g, '');
+ msg = msg.replace(/\033\[m/g, end);
+ msg = msg.replace(/\033\[0m/g, end);
+ msg = msg.replace(/\033\[39m/g, end);
+ msg = msg.replace(/\033\[2m/g, '');
+ msg = msg.replace(/\033\[0;39m/g, end);
+ log.debug("Running replacement on message: ", msg);
+ return msg;
+ });
+ });
+
+ _module.controller("Kubernetes.PodLogLinkController", ($scope, $interval, TerminalService, $templateCache) => {
+
+ $scope.openLogs = (entity) => {
+ log.debug("Open logs: ", entity);
+ TerminalService.newTerminal($interval, entity.metadata.selfLink, entity.$oracleName, entity,$templateCache.get(UrlHelpers.join(templatePath, 'logShell.html')));
+ }
+
+ });
+
+ _module.directive('podLogDisplay', (userDetails, PodLogReplacements) => {
+ return {
+ restrict: 'E',
+ template: `
+
+ `,
+ link: (scope:any, element, attr) => {
+ var link = scope.$eval('podLink');
+ var name = scope.$eval('containerName');
+
+ if (!link) {
+ return;
+ }
+
+ scope.fetched = false;
+ scope.previous = false;
+ scope.messages = [];
+
+ link = UrlHelpers.join(masterApiUrl(), link, 'log');
+ link = KubernetesAPI.wsUrl(link);
+ link.search({
+ follow: true,
+ tailLines: 1000,
+ access_token: userDetails.token
+ });
+
+ var messages = [];
+
+ var pullMessages = _.debounce(() => {
+ scope.messages = scope.messages.concat(_.remove(messages, () => true).map((msg) => {
+ PodLogReplacements.forEach((replFunc:any) => {
+ if (angular.isFunction(replFunc)) {
+ msg = replFunc(msg);
+ }
+ });
+ return msg;
+ }));
+ if (!scope.fetched) {
+ scope.fetched = true;
+ }
+ Core.$apply(scope);
+ }, 1000);
+
+ function initSocket(link) {
+ scope.fetched = false;
+ messages.length = 0;
+ scope.messages.length = 0;
+ var ws = new WebSocket(link.toString(), 'base64.binary.k8s.io');
+ ws.onmessage = (event) => {
+ try {
+ var message = window.atob(event.data);
+ messages.push(message);
+ pullMessages();
+ } catch (err) {
+ // we'll just ignore these
+ //log.debug("Failed to decode message: ", event.data, " error: ", err);
+ }
+ }
+ return ws;
+ }
+
+ var ws = initSocket(link);
+
+ scope.$watch('previous', (value, old) => {
+ if (value !== old) {
+ if (link.hasSearch('previous')) {
+ link.removeSearch('previous').addSearch('previous', scope.previous);
+ } else {
+ link.addSearch('previous', scope.previous);
+ }
+ ws.close();
+ ws = initSocket(link);
+ }
+ });
+
+ element.on('$destroy', () => {
+ if (ws) {
+ try {
+ ws.close();
+ } catch (err) {
+ // nothing to do
+ }
+ delete ws;
+ }
+ });
+ }
+ }
+ });
+
+ _module.directive('podLogWindow', ($compile, TerminalService) => {
+ return {
+ restrict: 'A',
+ scope: false,
+ link: (scope:any, element, attr) => {
+ addWindowActions(scope, element, TerminalService);
+ scope.atBottom = true;
+ scope.$watch('atBottom', (val) => {
+ console.log("atBottom: ", val);
+ });
+ }
+ };
+ });
+
+}
diff --git a/plugins/kubernetes/ts/pods.ts b/plugins/kubernetes/ts/pods.ts
index 26b9bfe..6132958 100644
--- a/plugins/kubernetes/ts/pods.ts
+++ b/plugins/kubernetes/ts/pods.ts
@@ -1,162 +1,162 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var EnvItem = controller("EnvItem", ["$scope", ($scope) => {
- var parts = $scope.data.split('=');
- $scope.key = parts.shift();
- $scope.value = parts.join('=');
- }]);
-
- // main controller for the page
- export var Pods = controller("Pods", ["$scope", "KubernetesModel", "KubernetesPods", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesPods:ng.resource.IResourceClass, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.$on('kubernetesModelUpdated', function () {
- Core.$apply($scope);
- });
-
- $scope.itemSchema = Forms.createFormConfiguration();
-
- $scope.tableConfig = {
- data: 'model.pods',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- {
- field: '_key',
- displayName: 'Name',
- defaultSort: true,
- cellTemplate: $templateCache.get("idTemplate.html")
- },
- {
- field: '$statusCss',
- displayName: 'Status',
- cellTemplate: $templateCache.get("statusTemplate.html")
- },
- { field: '$eventCount',
- displayName: 'Events',
- cellTemplate: $templateCache.get("eventSummaryTemplate.html")
- },
- {
- field: '$restartCount',
- displayName: 'Restarts'
- },
- {
- field: '$createdTime',
- displayName: 'Age',
- cellTemplate: $templateCache.get("ageTemplate.html")
- },
- {
- field: '$imageNames',
- displayName: 'Images',
- cellTemplate: $templateCache.get("imageTemplate.html")
- },
- {
- field: '$host',
- displayName: 'Host',
- cellTemplate: $templateCache.get("hostTemplate.html")
- },
- {
- field: '$labelsText',
- displayName: 'Labels',
- cellTemplate: $templateCache.get("labelTemplate.html")
- },
- {
- field: '$podIP',
- displayName: 'Pod IP',
- customSortField: (field) => {
- return Kubernetes.sortByPodIp(field.$podIP);
- }
- }
- ]
- };
-
- $scope.openLogs = () => {
- var pods = $scope.tableConfig.selectedItems;
- if (!pods || !pods.length) {
- if ($scope.id) {
- var item = $scope.item;
- if (item) {
- pods = [item];
- }
- }
- }
- openLogsForPods(ServiceRegistry, $window, KubernetesModel.currentNamespace(), pods);
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.deletePrompt = (selected) => {
- if (angular.isString(selected)) {
- selected = [{
- id: selected
- }];
- }
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: 'metadata.name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected:Array, next:KubePod) {
- if (next) {
- log.debug("deleting: ", getName(next));
- KubernetesPods.delete({
- id: getName(next)
- }, undefined, () => {
- log.debug("deleted: ", getName(next));
- deleteSelected(selected, selected.shift());
- }, (error) => {
- log.debug("Error deleting: ", error);
- deleteSelected(selected, selected.shift());
- });
- }
- }
- deleteSelected(selected, selected.shift());
- }
- },
- title: 'Delete pods?',
- action: 'The following pods will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
-
- $scope.createPods= () => {
- var xhr= new XMLHttpRequest();
- xhr.onreadystatechange = () => {
- if (xhr.readyState == 4) {//4表示数据已经调用完成
- if (xhr.status == 200) {//HTTP的状态码
- var obj=JSON.parse(xhr.responseText);
- var object = {
- "name": "newpod",
- "labels": {
- "aim": "test",
- "app": "oracle"
- },
- "path": '/home/',
- "port": 1525
- }
- Kubernetes.createRC(object);
-
- }else{
- //alter("shibai");
- }
- }
- };
- xhr.open("POST", "/oracleAppPath", false);//与服务器连接并发送
- xhr.send(null);
- };
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var EnvItem = controller("EnvItem", ["$scope", ($scope) => {
+ var parts = $scope.data.split('=');
+ $scope.key = parts.shift();
+ $scope.value = parts.join('=');
+ }]);
+
+ // main controller for the page
+ export var Pods = controller("Pods", ["$scope", "KubernetesModel", "KubernetesPods", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesPods:ng.resource.IResourceClass, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.$on('kubernetesModelUpdated', function () {
+ Core.$apply($scope);
+ });
+
+ $scope.itemSchema = Forms.createFormConfiguration();
+
+ $scope.tableConfig = {
+ data: 'model.pods',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ {
+ field: '_key',
+ displayName: 'Name',
+ defaultSort: true,
+ cellTemplate: $templateCache.get("idTemplate.html")
+ },
+ {
+ field: '$statusCss',
+ displayName: 'Status',
+ cellTemplate: $templateCache.get("statusTemplate.html")
+ },
+ { field: '$eventCount',
+ displayName: 'Events',
+ cellTemplate: $templateCache.get("eventSummaryTemplate.html")
+ },
+ {
+ field: '$restartCount',
+ displayName: 'Restarts'
+ },
+ {
+ field: '$createdTime',
+ displayName: 'Age',
+ cellTemplate: $templateCache.get("ageTemplate.html")
+ },
+ {
+ field: '$imageNames',
+ displayName: 'Images',
+ cellTemplate: $templateCache.get("imageTemplate.html")
+ },
+ {
+ field: '$host',
+ displayName: 'Host',
+ cellTemplate: $templateCache.get("hostTemplate.html")
+ },
+ {
+ field: '$labelsText',
+ displayName: 'Labels',
+ cellTemplate: $templateCache.get("labelTemplate.html")
+ },
+ {
+ field: '$podIP',
+ displayName: 'Pod IP',
+ customSortField: (field) => {
+ return Kubernetes.sortByPodIp(field.$podIP);
+ }
+ }
+ ]
+ };
+
+ $scope.openLogs = () => {
+ var pods = $scope.tableConfig.selectedItems;
+ if (!pods || !pods.length) {
+ if ($scope.id) {
+ var item = $scope.item;
+ if (item) {
+ pods = [item];
+ }
+ }
+ }
+ openLogsForPods(ServiceRegistry, $window, KubernetesModel.currentNamespace(), pods);
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.deletePrompt = (selected) => {
+ if (angular.isString(selected)) {
+ selected = [{
+ id: selected
+ }];
+ }
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: 'metadata.name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected:Array, next:KubePod) {
+ if (next) {
+ log.debug("deleting: ", getName(next));
+ KubernetesPods.delete({
+ id: getName(next)
+ }, undefined, () => {
+ log.debug("deleted: ", getName(next));
+ deleteSelected(selected, selected.shift());
+ }, (error) => {
+ log.debug("Error deleting: ", error);
+ deleteSelected(selected, selected.shift());
+ });
+ }
+ }
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: 'Delete pods?',
+ action: 'The following pods will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+
+ $scope.createPods= () => {
+ var xhr= new XMLHttpRequest();
+ xhr.onreadystatechange = () => {
+ if (xhr.readyState == 4) {//4表示数据已经调用完成
+ if (xhr.status == 200) {//HTTP的状态码
+ var obj=JSON.parse(xhr.responseText);
+ var object = {
+ "name": "newpod",
+ "labels": {
+ "aim": "test",
+ "app": "oracle"
+ },
+ "path": '/home/',
+ "port": 1525
+ }
+ Kubernetes.createRC(object);
+
+ }else{
+ //alter("shibai");
+ }
+ }
+ };
+ xhr.open("POST", "/oracleAppPath", false);//与服务器连接并发送
+ xhr.send(null);
+ };
+ }]);
+}
diff --git a/plugins/kubernetes/ts/readPlacedivision.ts b/plugins/kubernetes/ts/readPlacedivision.ts
index 7e58ab0..9115d77 100644
--- a/plugins/kubernetes/ts/readPlacedivision.ts
+++ b/plugins/kubernetes/ts/readPlacedivision.ts
@@ -1,518 +1,518 @@
-/*
-read a object from jiangsu province , such as nanjing with some information
-读取江苏的某个地区的信息,以及系统信息
- */
-module Kubernetes{
- public var system_arr = [{"sys_name":"部门预算","sys_id":"1"},{"sys_name":"非税收入收缴管理系统","sys_id":"2"},
- {"sys_name":"预算执行系统","sys_id":"3"},{"sys_name":"资产管理系统","sys_id":"4"},{"sys_name":"用友财政综合管理信息系统","sys_id":"5"},
- {"sys_name":"用友A++","sys_id":"6"},{"sys_name":"浦口财政一体化","sys_id":"7"},{"sys_name":"栖霞区财政业务信息管理系统","sys_id":"8"},
- {"sys_name":"一体化系统","sys_id":"9"},{"sys_name":"财政管理一体化系统","sys_id":"10"},{"sys_name":"滨江开发区财政分局","sys_id":"11"},
- {"sys_name":"江宁经济技术开发区财政分局","sys_id":"12"},{"sys_name":"江宁科学园财政分局","sys_id":"13"},{"sys_name":"财政一体化系统","sys_id":"14"},
- {"sys_name":"A++财政一体化平台","sys_id":"15"},{"sys_name":"非税系统","sys_id":"16"},{"sys_name":"一体化预算执行系统","sys_id":"17"},
- {"sys_name":"一体化","sys_id":"18"},{"sys_name":"国库集中支付管理信息系统","sys_id":"19"},{"sys_name":"国库集中支付","sys_id":"20"},
- {"sys_name":"财政专户核算及非税系统","sys_id":"21"},{"sys_name":"集中支付系统","sys_id":"22"},{"sys_name":"财政专户核算系统","sys_id":"23"},
- {"sys_name":"非税收缴系统","sys_id":"24"},{"sys_name":"财政一体化平台","sys_id":"25"},{"sys_name":"富深预算执行","sys_id":"26"},
- {"sys_name":"用友非税及票据","sys_id":"27"},{"sys_name":"用友预算执行","sys_id":"28"},{"sys_name":"江苏省财政预算执行系统","sys_id":"29"},
- {"sys_name":"用友通用软件","sys_id":"30"},{"sys_name":"联友软件/通用财务","sys_id":"31"},{"sys_name":"用友GRPG-U8R10财政管理软件","sys_id":"32"},
- {"sys_name":"用友GPP-R10财政管理软件","sys_id":"33"},{"sys_name":"富深协通财政一体化管理信息系统","sys_id":"34"},{"sys_name":"财务统一核算系统","sys_id":"35"},
- {"sys_name":"公共财政管理软件","sys_id":"36"},{"sys_name":"A++财政一体化信息平台","sys_id":"37"},{"sys_name":"新中大公共财务管理软件","sys_id":"38"},
- {"sys_name":"富深财政一体化管理系统","sys_id":"39"},{"sys_name":"新中大公共财政管理系统","sys_id":"40"},{"sys_name":"富深协通财政一体化业务管理系统软件","sys_id":"41"},
- {"sys_name":"新中大公共财政管理软件Gsoft","sys_id":"42"},{"sys_name":"财政一体化业务系统","sys_id":"43"},{"sys_name":"财政一体化软件","sys_id":"44"},
- {"sys_name":"非税收入系统","sys_id":"45"},{"sys_name":"总预算系统","sys_id":"46"},{"sys_name":"国库集中支付系统","sys_id":"47"},{"sys_name":"用款计划系统","sys_id":"48"},
- {"sys_name":"指标管理系统","sys_id":"49"},{"sys_name":"财政综合业务管理平台","sys_id":"50"},{"sys_name":"财政一体化管理信息系统","sys_id":"51"},{"sys_name":"工资统发","sys_id":"52"},
- {"sys_name":"国有资产","sys_id":"53"},{"sys_name":"乡镇非税收入","sys_id":"54"},{"sys_name":"乡镇集中支付","sys_id":"55"},{"sys_name":"非税征缴系统","sys_id":"56"},
- {"sys_name":"预算编制与执行系统","sys_id":"57"},{"sys_name":"预算管理综合业务平台","sys_id":"58"},{"sys_name":"u8管理软件","sys_id":"59"},{"sys_name":"财政指标管理系统","sys_id":"60"},
- {"sys_name":"用友GRP-R9财务管理软件","sys_id":"61"},{"sys_name":"用友GRP-U8财政管理软件","sys_id":"62"},{"sys_name":"账务处理系统","sys_id":"63"},{"sys_name":"R9i财政管理软件","sys_id":"64"},
- {"sys_name":"u8财政管理软件","sys_id":"65"},{"sys_name":"相城区财政综合管理信息系统","sys_id":"66"},{"sys_name":"财政非税综合管理系统","sys_id":"67"},{"sys_name":"财政综合管理平台","sys_id":"68"},
- {"sys_name":"吴江区财政一体化","sys_id":"69"},{"sys_name":"用友R9","sys_id":"70"},{"sys_name":"财政公共应用服务平台","sys_id":"71"},{"sys_name":"金蝶K/3创新管理平台","sys_id":"72"},{"sys_name":"账务数据系统","sys_id":"73"},
- {"sys_name":"公共财政服务平台","sys_id":"74"},{"sys_name":"会计核算系统","sys_id":"75"},{"sys_name":"项目库","sys_id":"76"},{"sys_name":"财政总预算(外)专户管理系统","sys_id":"77"},
- {"sys_name":"城建资金专户管理系统","sys_id":"78"},{"sys_name":"农保专户管理系统","sys_id":"79"},{"sys_name":"农业发展基金专户管理系统","sys_id":"80"},
- {"sys_name":"失地农民保障资金专户","sys_id":"81"},{"sys_name":"非税收入征管系统","sys_id":"82"},{"sys_name":"工资统发人员信息","sys_id":"83"},
- {"sys_name":"预算指标-国库集中支付系统","sys_id":"84"},{"sys_name":"总预算会计核算系统","sys_id":"85"},{"sys_name":"部门预算编审系统","sys_id":"86"},
- {"sys_name":"公务消费管理系统","sys_id":"87"},{"sys_name":"国有资产管理系统","sys_id":"88"},{"sys_name":"区镇财政管理“一体化”系统","sys_id":"89"},
- {"sys_name":"县本级财政管理“一体化”系统","sys_id":"90"},{"sys_name":"用友政务","sys_id":"91"},{"sys_name":"财政专户核算(行政口专项资金)","sys_id":"92"},
- {"sys_name":"财政专户核算(经建口专项资金)","sys_id":"93"},{"sys_name":"财政专户核算(农业保险专账)","sys_id":"94"},{"sys_name":"财政专户核算(农业综合开发专账)","sys_id":"95"},
- {"sys_name":"财政专户核算(社保资金专账)","sys_id":"96"},{"sys_name":"财政专户核算(土地出让专账)","sys_id":"97"},{"sys_name":"财政专户核算(综合口专项资金)","sys_id":"98"},
- {"sys_name":"非税收入管理系统","sys_id":"99"},{"sys_name":"农业专向及农业发展基金专项","sys_id":"100"},{"sys_name":"总预算会计核算","sys_id":"101"},{"sys_name":"金财工程一体化支撑平台","sys_id":"102"},
- {"sys_name":"非税收缴","sys_id":"103"},{"sys_name":"学校预算执行","sys_id":"104"},{"sys_name":"预算执行","sys_id":"105"},{"sys_name":"专项资金","sys_id":"106"},
- {"sys_name":"总预算","sys_id":"107"},{"sys_name":"部门预算系统","sys_id":"108"},{"sys_name":"财政专户核算","sys_id":"109"},{"sys_name":"财政专户账务系统","sys_id":"110"},
- {"sys_name":"富深财政一体化业务管理系统","sys_id":"111"},{"sys_name":"国有资产系统","sys_id":"112"},{"sys_name":"国库专项资金管理系统","sys_id":"113"},
- {"sys_name":"非税收缴管理系统","sys_id":"114"},{"sys_name":"财政管理系统(新农保)","sys_id":"115"},{"sys_name":"财政管理系统(城市居民医疗统筹)","sys_id":"116"},
- {"sys_name":"财政管理系统(集中支付中心)","sys_id":"117"},{"sys_name":"财政管理系统(解困金)","sys_id":"118"},{"sys_name":"财政管理系统(旧城改造)","sys_id":"119"},
- {"sys_name":"财政管理系统(社保资金账户)","sys_id":"120"},{"sys_name":"财政管理系统(土地出让专帐)","sys_id":"121"},{"sys_name":"财政管理系统(预拨及非集中支付中心)","sys_id":"122"},
- {"sys_name":"财政管理系统(预算外资金)","sys_id":"123"},{"sys_name":"总预算会计","sys_id":"124"},{"sys_name":"财务核算系统","sys_id":"125"},{"sys_name":"工资统发系统","sys_id":"126"},
- {"sys_name":"预算编审系统","sys_id":"127"},{"sys_name":"预算管理系统","sys_id":"128"},{"sys_name":"预算外资金(从联网审计中取数)","sys_id":"129"},
- {"sys_name":"G6-E财务管理系统","sys_id":"130"},{"sys_name":"新中大公共财政管理软件","sys_id":"131"},{"sys_name":"用友GRP/R9财政管理软件","sys_id":"132"},
- {"sys_name":"用友GRP-U8R10","sys_id":"133"},{"sys_name":"财政一体化管理系统(基建户)","sys_id":"134"},{"sys_name":"财政一体化管理系统(集中支付中心)","sys_id":"135"},
- {"sys_name":"财政一体化管理系统(农业综合开发)","sys_id":"136"},{"sys_name":"财政一体化管理系统(预算外资金)","sys_id":"137"},{"sys_name":"财政一体化管理系统(支农专户)","sys_id":"138"},
- {"sys_name":"财政一体化管理系统(总预算)","sys_id":"139"},{"sys_name":"国资管理系统","sys_id":"140"},{"sys_name":"乡财县管系统","sys_id":"141"},{"sys_name":"预算编制管理系统","sys_id":"142"},
- {"sys_name":"盐城市_市本级_部门预算","sys_id":"143"},{"sys_name":"盐城市_市本级_非税收管理系统","sys_id":"144"},{"sys_name":"盐城市_市本级_预算执行系统","sys_id":"145"},
- {"sys_name":"盐城市_亭湖区_财政专户","sys_id":"146"},{"sys_name":"盐城市_亭湖区_非税收入管理","sys_id":"147"},{"sys_name":"盐城市_亭湖区_国库集中支付管理","sys_id":"148"},
- {"sys_name":"盐城市_亭湖区_预算指标管理","sys_id":"149"},{"sys_name":"盐城市_亭湖区_总预算会计核算","sys_id":"150"},{"sys_name":"盐城市_盐都区_财政专户核算系统","sys_id":"151"},
- {"sys_name":"盐城市_盐都区_非税收入管理系统","sys_id":"152"},{"sys_name":"盐城市_盐都区_国库集中支付系统","sys_id":"153"},{"sys_name":"盐城市_盐都区_总预算会计核算系统","sys_id":"154"},
- {"sys_name":"盐城市_响水县_部门预算管理系统","sys_id":"155"},{"sys_name":"盐城市_响水县_财政一体化信息系统","sys_id":"156"},{"sys_name":"盐城市_响水县_非税收入收缴管理系统","sys_id":"157"},
- {"sys_name":"盐城市_滨海县财政一体化","sys_id":"158"},{"sys_name":"盐城市_阜宁县_财政管理软件","sys_id":"159"},{"sys_name":"盐城市_阜宁县_财政管理软件用友U8","sys_id":"160"},
- {"sys_name":"盐城市_射阳县_财政预算执行一体化系统","sys_id":"161"},{"sys_name":"盐城市_建湖县_非税收缴","sys_id":"162"},
- {"sys_name":"盐城市_建湖县_财政一体化","sys_id":"163"},{"sys_name":"盐城市_建湖县_国库集中支付","sys_id":"164"},
- {"sys_name":"盐城市_东台市_部门预算编审系统","sys_id":"165"},{"sys_name":"盐城市_东台市_财政一体化信息系统","sys_id":"166"},
- {"sys_name":"盐城市_东台市_财政专户核算系统","sys_id":"167"},{"sys_name":"盐城市_东台市_非税收入收缴管理系统","sys_id":"168"},
- {"sys_name":"盐城市_东台市_总预算会计核算系统","sys_id":"169"},{"sys_name":"盐城市_大丰区_部门预算系统","sys_id":"170"},
- {"sys_name":"盐城市_大丰区_财政一体化","sys_id":"171"},{"sys_name":"盐城市_大丰区_总预算会计核算财务软件","sys_id":"172"},
- {"sys_name":"盐城市_经济技术开发区_部门预算软件","sys_id":"173"},{"sys_name":"盐城市_经济技术开发区_国库集中支付","sys_id":"174"},
- {"sys_name":"老非税收入征缴系统","sys_id":"175"},{"sys_name":"扬州财政一体化信息管理系统","sys_id":"176"},{"sys_name":"非税收入征收","sys_id":"177"},
- {"sys_name":"部门预算编制","sys_id":"178"},{"sys_name":"非税收入收缴","sys_id":"179"},{"sys_name":"行政事业性单位国有资产管理","sys_id":"180"},
- {"sys_name":"财政业务系统","sys_id":"181"},{"sys_name":"财政业务综合系统","sys_id":"182"},{"sys_name":"江都开发区预算执行系统","sys_id":"183"},
- {"sys_name":"财政一体化","sys_id":"184"},{"sys_name":"富深协通财政一体化业务管理系统","sys_id":"185"},{"sys_name":"富深协通非税收缴系统","sys_id":"186"},
- {"sys_name":"富深协通工资统发系统","sys_id":"187"},{"sys_name":"非税收入","sys_id":"188"},{"sys_name":"财政综合业务系统","sys_id":"189"},
- {"sys_name":"泰州市_市本级_部门预算系统","sys_id":"190"},{"sys_name":"泰州市_市本级_非税收入系统","sys_id":"191"},{"sys_name":"泰州市_市本级_绩效管理系统","sys_id":"192"},
- {"sys_name":"泰州市_市本级_预算执行系统","sys_id":"193"},{"sys_name":"泰州市_市本级_综合治税系统","sys_id":"194"},{"sys_name":"泰州市_海陵区_部门预算编制系统","sys_id":"195"},
- {"sys_name":"泰州市_海陵区_县区财政一体化","sys_id":"196"},{"sys_name":"泰州市_高港区_预算执行系统","sys_id":"197"},
- {"sys_name":"泰州市_姜堰区_部门预算系统","sys_id":"198"},{"sys_name":"泰州市_姜堰区_财政一体化系统","sys_id":"199"},
- {"sys_name":"泰州市_姜堰区_非税收缴系统","sys_id":"200"},{"sys_name":"泰州市_姜堰区_预算执行系统","sys_id":"201"},
- {"sys_name":"泰州市_医药高新区_财政一体化系统","sys_id":"202"},{"sys_name":"泰州市_兴化市_部门预算","sys_id":"203"},
- {"sys_name":"泰州市_兴化市_非税收缴","sys_id":"204"},{"sys_name":"泰州市_兴化市_国库集中支付","sys_id":"205"},
- {"sys_name":"泰州市_靖江市_预算执行系统","sys_id":"206"},{"sys_name":"泰州市_靖江市_非税收入收缴","sys_id":"207"},
- {"sys_name":"泰州市_靖江市_部门预算编审系统","sys_id":"208"},{"sys_name":"泰州市_泰兴市_部门预算系统","sys_id":"209"},
- {"sys_name":"泰州市_泰兴市_非税收入管理系统","sys_id":"210"},{"sys_name":"泰州市_泰兴市_预算执行系统","sys_id":"211"},
- {"sys_name":"部门预算管理系统","sys_id":"212"},{"sys_name":"财政一体化平台及国库集中支付系统","sys_id":"213"},
- {"sys_name":"新中大非税收入管理","sys_id":"214"},{"sys_name":"联友财务管理系统","sys_id":"215"},{"sys_name":"国库集中支付、指标管理系统","sys_id":"216"},
- {"sys_name":"开发区总预算系统","sys_id":"217"},{"sys_name":"国库账务系统","sys_id":"218"},{"sys_name":"化学工业园区非税收入管理系统","sys_id":"219"},
- {"sys_name":"非税收入账套","sys_id":"220"},{"sys_name":"化学工业园区预算执行系统","sys_id":"221"},{"sys_name":"会计核算","sys_id":"222"},
- {"sys_name":"总预算会计账","sys_id":"223"},{"sys_name":"预算内外收支核算系统","sys_id":"224"},{"sys_name":"账户核算系统","sys_id":"225"},
- {"sys_name":"总预算核算系统","sys_id":"226"},{"sys_name":"账务处理系统(收支分类改革升级版)","sys_id":"227"},{"sys_name":"财政预算外业务","sys_id":"228"},
- {"sys_name":"用友U8R10财政一体化平台","sys_id":"229"},{"sys_name":"开发区财政系统","sys_id":"230"},{"sys_name":"高新区总预算系统","sys_id":"231"},
- {"sys_name":"开发区公共财政服务平台","sys_id":"232"},{"sys_name":"用友GRP-U8管理软件","sys_id":"233"},{"sys_name":"盐城市_城南新区_国库集中支付系统","sys_id":"234"},
- {"sys_name":"盐城市_城南新区_总预算账务处理系统","sys_id":"235"},{"sys_name":"财政预算指标管理","sys_id":"236"},{"sys_name":"泰州市_市本级_行政管理系统","sys_id":"237"},
- {"sys_name":"新中大财务软件","sys_id":"238"},{"sys_name":"开发区新中大财务核算系统","sys_id":"239"},{"sys_name":"开发区账务系统","sys_id":"240"}];
-
- public var origin_place_arr = [{"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"部门预算","sys_code":"BMYS"},
- {"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"资产管理系统","sys_code":"ZCGL"},
- {"city_code":"3201","city":"南京市","county":"玄武区","county_code":"320102","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3201","city":"南京市","county":"秦淮区","county_code":"320104","sys_name":"用友财政综合管理信息系统","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"建邺区","county_code":"320105","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3201","city":"南京市","county":"鼓楼区","county_code":"320106","sys_name":"用友A++","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"浦口区","county_code":"320111","sys_name":"浦口财政一体化","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"栖霞区","county_code":"320113","sys_name":"栖霞区财政业务信息管理系统","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"雨花台区","county_code":"320114","sys_name":"一体化系统","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"财政管理一体化系统","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"滨江开发区财政分局","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"江宁经济技术开发区财政分局","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"江宁科学园财政分局","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"六合区","county_code":"320116","sys_name":"一体化系统","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"高淳区","county_code":"320118","sys_name":"财政一体化系统","sys_code":"YTH"},
- {"city_code":"3201","city":"南京市","county":"溧水区","county_code":"320124","sys_name":"A++财政一体化平台","sys_code":"YTH"},
- {"city_code":"3202","city":"无锡市","county":"市本级","county_code":"320200","sys_name":"财政一体化系统","sys_code":"YTH"},
- {"city_code":"3202","city":"无锡市","county":"市本级","county_code":"320200","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3202","city":"无锡市","county":"崇安区","county_code":"320202","sys_name":"非税系统","sys_code":"FSSR"},
- {"city_code":"3202","city":"无锡市","county":"崇安区","county_code":"320202","sys_name":"一体化预算执行系统","sys_code":"YTH"},
- {"city_code":"3202","city":"无锡市","county":"南长区","county_code":"320203","sys_name":"非税系统","sys_code":"FSSR"},
- {"city_code":"3202","city":"无锡市","county":"南长区","county_code":"320203","sys_name":"一体化","sys_code":"YTH"},
- {"city_code":"3202","city":"无锡市","county":"北塘区","county_code":"320204","sys_name":"国库集中支付管理信息系统","sys_code":"GKZF"},
- {"city_code":"3202","city":"无锡市","county":"锡山区","county_code":"320205","sys_name":"国库集中支付","sys_code":"GKZF"},
- {"city_code":"3202","city":"无锡市","county":"锡山区","county_code":"320205","sys_name":"财政专户核算及非税系统","sys_code":"ZHHS_FSSR"},
- {"city_code":"3202","city":"无锡市","county":"惠山区","county_code":"320206","sys_name":"财政一体化系统","sys_code":"YTH"},
- {"city_code":"3202","city":"无锡市","county":"滨湖区","county_code":"320211","sys_name":"集中支付系统","sys_code":"GKZF"},
- {"city_code":"3202","city":"无锡市","county":"滨湖区","county_code":"320211","sys_name":"非税系统","sys_code":"FSSR"},
- {"city_code":"3202","city":"无锡市","county":"滨湖区","county_code":"320211","sys_name":"财政专户核算系统","sys_code":"ZHHS"},
- {"city_code":"3202","city":"无锡市","county":"新区","county_code":"320214","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3202","city":"无锡市","county":"新区","county_code":"320214","sys_name":"非税收缴系统","sys_code":"FSSR"},
- {"city_code":"3202","city":"无锡市","county":"新区","county_code":"320214","sys_name":"财政专户核算系统","sys_code":"ZHHS"},
- {"city_code":"3202","city":"无锡市","county":"江阴市","county_code":"320281","sys_name":"财政一体化平台","sys_code":"YTH"},
- {"city_code":"3202","city":"无锡市","county":"宜兴市","county_code":"320282","sys_name":"非税收缴系统","sys_code":"FSSR"},
- {"city_code":"3202","city":"无锡市","county":"宜兴市","county_code":"320282","sys_name":"财政一体化平台","sys_code":"YTH"},
- {"city_code":"3203","city":"徐州市","county":"市本级","county_code":"320300","sys_name":"富深预算执行","sys_code":"YSZX"},
- {"city_code":"3203","city":"徐州市","county":"市本级","county_code":"320300","sys_name":"用友非税及票据","sys_code":"FSSR"},
- {"city_code":"3203","city":"徐州市","county":"市本级","county_code":"320300","sys_name":"用友预算执行","sys_code":"YSZX"},
- {"city_code":"3203","city":"徐州市","county":"鼓楼区","county_code":"320302","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
- {"city_code":"3203","city":"徐州市","county":"鼓楼区","county_code":"320302","sys_name":"用友通用软件","sys_code":"KJHS"},
- {"city_code":"3203","city":"徐州市","county":"云龙区","county_code":"320303","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
- {"city_code":"3203","city":"徐州市","county":"云龙区","county_code":"320303","sys_name":"联友软件/通用财务","sys_code":"KJHS"},
- {"city_code":"3203","city":"徐州市","county":"云龙区","county_code":"320303","sys_name":"用友GRPG-U8R10财政管理软件","sys_code":"YSZX"},
- {"city_code":"3203","city":"徐州市","county":"贾汪区","county_code":"320305","sys_name":"用友GPP-R10财政管理软件","sys_code":"KJHS"},
- {"city_code":"3203","city":"徐州市","county":"泉山区","county_code":"320311","sys_name":"富深协通财政一体化管理信息系统","sys_code":"YTH"},
- {"city_code":"3203","city":"徐州市","county":"铜山区","county_code":"320312","sys_name":"财务统一核算系统","sys_code":"KJHS"},
- {"city_code":"3203","city":"徐州市","county":"铜山区","county_code":"320312","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3203","city":"徐州市","county":"铜山区","county_code":"320312","sys_name":"公共财政管理软件","sys_code":"YSZX"},
- {"city_code":"3203","city":"徐州市","county":"丰县","county_code":"320321","sys_name":"A++财政一体化信息平台","sys_code":"YTH"},
- {"city_code":"3203","city":"徐州市","county":"丰县","county_code":"320321","sys_name":"新中大公共财务管理软件","sys_code":"KJHS"},
- {"city_code":"3203","city":"徐州市","county":"沛县","county_code":"320322","sys_name":"富深财政一体化管理系统","sys_code":"YTH"},
- {"city_code":"3203","city":"徐州市","county":"沛县","county_code":"320322","sys_name":"新中大公共财政管理系统","sys_code":"KJHS"},
- {"city_code":"3203","city":"徐州市","county":"睢宁县","county_code":"320324","sys_name":"富深协通财政一体化业务管理系统软件","sys_code":"YTH"},
- {"city_code":"3203","city":"徐州市","county":"睢宁县","county_code":"320324","sys_name":"新中大公共财政管理软件Gsoft","sys_code":"KJHS"},
- {"city_code":"3203","city":"徐州市","county":"新沂市","county_code":"320381","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
- {"city_code":"3203","city":"徐州市","county":"邳州","county_code":"320382","sys_name":"财政一体化系统","sys_code":"YTH"},
- {"city_code":"3204","city":"常州市","county":"本级","county_code":"320400","sys_name":"财政一体化业务系统","sys_code":"YTH"},
- {"city_code":"3204","city":"常州市","county":"天宁区","county_code":"320402","sys_name":"财政一体化软件","sys_code":"YTH"},
- {"city_code":"3204","city":"常州市","county":"天宁区","county_code":"320402","sys_name":"非税收入系统","sys_code":"FSSR"},
- {"city_code":"3204","city":"常州市","county":"天宁区","county_code":"320402","sys_name":"总预算系统","sys_code":"YSZX"},
- {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"非税收入系统","sys_code":"FSSR"},
- {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"用款计划系统","sys_code":"JHGL"},
- {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"指标管理系统","sys_code":"ZBGL"},
- {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"总预算系统","sys_code":"ZYS"},
- {"city_code":"3204","city":"常州市","county":"新北区","county_code":"320411","sys_name":"财政综合业务管理平台","sys_code":"YTH"},
- {"city_code":"3204","city":"常州市","county":"武进区","county_code":"320412","sys_name":"财政一体化管理信息系统","sys_code":"YTH"},
- {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"部门预算","sys_code":"BMYS"},
- {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"工资统发","sys_code":"GZTF"},
- {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"国有资产","sys_code":"ZCGL"},
- {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"乡镇非税收入","sys_code":"XZFS"},
- {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"乡镇集中支付","sys_code":"XZGK"},
- {"city_code":"3204","city":"常州市","county":"金坛区","county_code":"320482","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3205","city":"苏州市","county":"市本级","county_code":"320500","sys_name":"非税征缴系统","sys_code":"FSSR"},
- {"city_code":"3205","city":"苏州市","county":"市本级","county_code":"320500","sys_name":"预算编制与执行系统","sys_code":"YSZX"},
- {"city_code":"3205","city":"苏州市","county":"工业园区","county_code":"320501","sys_name":"预算管理综合业务平台","sys_code":"YSGL"},
- {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"u8管理软件","sys_code":"CZGL"},
- {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"财政指标管理系统","sys_code":"ZBGL"},
- {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"用友GRP-R9财务管理软件","sys_code":"CWGL"},
- {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"用友GRP-U8财政管理软件","sys_code":"CWGL"},
- {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"账务处理系统","sys_code":"ZWCL"},
- {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"R9i财政管理软件","sys_code":"CZGL"},
- {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"部门预算","sys_code":"BMYS"},
- {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"财政一体化平台","sys_code":"YTH"},
- {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"非税系统","sys_code":"FSSR"},
- {"city_code":"3205","city":"苏州市","county":"相城区","county_code":"320507","sys_name":"u8财政管理软件","sys_code":"CZGL"},
- {"city_code":"3205","city":"苏州市","county":"相城区","county_code":"320507","sys_name":"相城区财政综合管理信息系统","sys_code":"YTH"},
- {"city_code":"3205","city":"苏州市","county":"姑苏区","county_code":"320508","sys_name":"财政非税综合管理系统","sys_code":"FSSR"},
- {"city_code":"3205","city":"苏州市","county":"姑苏区","county_code":"320508","sys_name":"财政综合管理平台","sys_code":"YTH"},
- {"city_code":"3205","city":"苏州市","county":"吴江区","county_code":"320509","sys_name":"吴江区财政一体化","sys_code":"YTH"},
- {"city_code":"3205","city":"苏州市","county":"常熟市","county_code":"320581","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3205","city":"苏州市","county":"常熟市","county_code":"320581","sys_name":"用友R9","sys_code":"KJHS"},
- {"city_code":"3205","city":"苏州市","county":"常熟市","county_code":"320581","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3205","city":"苏州市","county":"张家港市","county_code":"320582","sys_name":"财政公共应用服务平台","sys_code":"GGFW"},
- {"city_code":"3205","city":"苏州市","county":"张家港市","county_code":"320582","sys_name":"金蝶K/3创新管理平台","sys_code":"CZGL"},
- {"city_code":"3205","city":"苏州市","county":"张家港市","county_code":"320582","sys_name":"账务数据系统","sys_code":"KJHS"},
- {"city_code":"3205","city":"苏州市","county":"昆山市","county_code":"320583","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3205","city":"苏州市","county":"昆山市","county_code":"320583","sys_name":"公共财政服务平台","sys_code":"GGFW"},
- {"city_code":"3205","city":"苏州市","county":"昆山市","county_code":"320583","sys_name":"国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"非税收入系统","sys_code":"FSSR"},
- {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"会计核算系统","sys_code":"KJHS"},
- {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"项目库","sys_code":"XMK"},
- {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"本级","county_code":"320600","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"崇川区","county_code":"320602","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"财政总预算(外)专户管理系统","sys_code":"YSWZH"},
- {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"城建资金专户管理系统","sys_code":"CJZH"},
- {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"农保专户管理系统","sys_code":"NBZH"},
- {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"农业发展基金专户管理系统","sys_code":"NFJJ"},
- {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"失地农民保障资金专户","sys_code":"SDNM"},
- {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"非税收入征管系统","sys_code":"FSSR"},
- {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"工资统发人员信息","sys_code":"GZTF"},
- {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"预算指标-国库集中支付系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"总预算会计核算系统","sys_code":"KJHS"},
- {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"部门预算编审系统","sys_code":"BMYS"},
- {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"公务消费管理系统","sys_code":"GWXF"},
- {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"国有资产管理系统","sys_code":"ZCGL"},
- {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"区镇财政管理“一体化”系统","sys_code":"XZYTH"},
- {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"县本级财政管理“一体化”系统","sys_code":"YTH"},
- {"city_code":"3206","city":"南通市","county":"如东县","county_code":"320623","sys_name":"用友政务","sys_code":"YTH"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(行政口专项资金)","sys_code":"ZHXZ"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(经建口专项资金)","sys_code":"ZHJJ"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(农业保险专账)","sys_code":"ZHNB"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(农业综合开发专账)","sys_code":"ZHNF"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(社保资金专账)","sys_code":"ZHSB"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(土地出让专账)","sys_code":"ZHTD"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(综合口专项资金)","sys_code":"ZHZH"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"农业专向及农业发展基金专项","sys_code":"NFZX"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"总预算会计核算","sys_code":"KJHS"},
- {"city_code":"3206","city":"南通市","county":"如皋市","county_code":"320682","sys_name":"金财工程一体化支撑平台","sys_code":"YTH"},
- {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"非税收缴","sys_code":"FSSR"},
- {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"学校预算执行","sys_code":"YSZXXX"},
- {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"预算执行","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"专项资金","sys_code":"ZXZJ"},
- {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"总预算","sys_code":"ZYS"},
- {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"部门预算系统","sys_code":"BMYS"},
- {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"财政专户核算","sys_code":"ZHHS"},
- {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"非税收入系统","sys_code":"FSSR"},
- {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3207","city":"连云港市","county":"连云区","county_code":"320703","sys_name":"财政专户账务系统","sys_code":"ZHHS"},
- {"city_code":"3207","city":"连云港市","county":"连云区","county_code":"320703","sys_name":"富深财政一体化管理系统","sys_code":"YTH"},
- {"city_code":"3207","city":"连云港市","county":"海州区","county_code":"320706","sys_name":"富深财政一体化业务管理系统","sys_code":""},
- {"city_code":"3207","city":"连云港市","county":"海州区","county_code":"320706","sys_name":"新中大公共财政管理系统","sys_code":""},
- {"city_code":"3207","city":"连云港市","county":"赣榆区","county_code":"320721","sys_name":"财政一体化平台","sys_code":"YTH"},
- {"city_code":"3207","city":"连云港市","county":"赣榆区","county_code":"320721","sys_name":"国有资产系统","sys_code":"CZGL"},
- {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"部门预算系统","sys_code":"BMYS"},
- {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"国库专项资金管理系统","sys_code":"ZXZJ"},
- {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"国有资产管理系统","sys_code":"ZCGL"},
- {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3207","city":"连云港市","county":"灌云县","county_code":"320723","sys_name":"财政一体化平台","sys_code":"YTH"},
- {"city_code":"3207","city":"连云港市","county":"灌南县","county_code":"320724","sys_name":"非税系统","sys_code":"FSSR"},
- {"city_code":"3207","city":"连云港市","county":"灌南县","county_code":"320724","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3208","city":"淮安市","county":"市本级","county_code":"320800","sys_name":"非税收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3208","city":"淮安市","county":"市本级","county_code":"320800","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(新农保)","sys_code":"ZHNB"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(城市居民医疗统筹)","sys_code":"ZHYB"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(集中支付中心)","sys_code":"GKZF"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(解困金)","sys_code":"ZHJK"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(旧城改造)","sys_code":"ZHCG"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(社保资金账户)","sys_code":"ZHSB"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(土地出让专帐)","sys_code":"ZHTD"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(预拨及非集中支付中心)","sys_code":"ZHYB"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(预算外资金)","sys_code":"YSW"},
- {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"总预算会计","sys_code":"KJHS"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"财务核算系统","sys_code":"KJHS"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"工资统发系统","sys_code":"GZTF"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"用友政务","sys_code":"YYZW"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算编审系统","sys_code":"BMYS"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算管理系统","sys_code":"YSGL"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算外资金(从联网审计中取数)","sys_code":"YSW"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算编审系统","sys_code":"YSBS"},
- {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"G6-E财务管理系统","sys_code":"CWGL"},
- {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
- {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"新中大公共财政管理软件","sys_code":"CZGL"},
- {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"用友GRP/R9财政管理软件","sys_code":"CZGL"},
- {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"用友GRP-U8R10","sys_code":"CWGL"},
- {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算编审系统","sys_code":"YSBS"},
- {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(基建户)","sys_code":"ZHJJ"},
- {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(集中支付中心)","sys_code":"GKZF"},
- {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(农业综合开发)","sys_code":"ZHNF"},
- {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(预算外资金)","sys_code":"YSW"},
- {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(支农专户)","sys_code":"ZHZN"},
- {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(总预算)","sys_code":"KJHS"},
- {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"非税征缴系统","sys_code":"FSSR"},
- {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"国资管理系统","sys_code":"ZCGL"},
- {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"乡财县管系统","sys_code":"XCXG"},
- {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"乡财县管系统","sys_code":"XCXG"},
- {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"预算编制管理系统","sys_code":"YSBS"},
- {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3208","city":"淮安市","county":"洪泽县","county_code":"320829","sys_name":"非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3208","city":"淮安市","county":"洪泽县","county_code":"320829","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3208","city":"淮安市","county":"盱眙县","county_code":"320830","sys_name":"财政一体化平台","sys_code":"YTH"},
- {"city_code":"3208","city":"淮安市","county":"金湖县","county_code":"320831","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3209","city":"盐城市","county":"市本级","county_code":"320900","sys_name":"盐城市_市本级_部门预算","sys_code":"BMYS"},
- {"city_code":"3209","city":"盐城市","county":"市本级","county_code":"320900","sys_name":"盐城市_市本级_非税收管理系统","sys_code":"FSSR"},
- {"city_code":"3209","city":"盐城市","county":"市本级","county_code":"320900","sys_name":"盐城市_市本级_预算执行系统","sys_code":"YSZX"},
- {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_财政专户","sys_code":"ZHHS"},
- {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_非税收入管理","sys_code":"FSSR"},
- {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_国库集中支付管理","sys_code":"GKZF"},
- {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_预算指标管理","sys_code":"ZBGL"},
- {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_总预算会计核算","sys_code":"KJHS"},
- {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_财政专户核算系统","sys_code":"ZHHS"},
- {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_总预算会计核算系统","sys_code":"KJHS"},
- {"city_code":"3209","city":"盐城市","county":"响水县","county_code":"320921","sys_name":"盐城市_响水县_部门预算管理系统","sys_code":"BMYS"},
- {"city_code":"3209","city":"盐城市","county":"响水县","county_code":"320921","sys_name":"盐城市_响水县_财政一体化信息系统","sys_code":"YTH"},
- {"city_code":"3209","city":"盐城市","county":"响水县","county_code":"320921","sys_name":"盐城市_响水县_非税收入收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3209","city":"盐城市","county":"滨海县","county_code":"320922","sys_name":"盐城市_滨海县财政一体化","sys_code":"YTH"},
- {"city_code":"3209","city":"盐城市","county":"阜宁县","county_code":"320923","sys_name":"盐城市_阜宁县_财政管理软件","sys_code":"CZGL"},
- {"city_code":"3209","city":"盐城市","county":"阜宁县","county_code":"320923","sys_name":"盐城市_阜宁县_财政管理软件用友U8","sys_code":"YYZW"},
- {"city_code":"3209","city":"盐城市","county":"射阳县","county_code":"320924","sys_name":"盐城市_射阳县_财政预算执行一体化系统","sys_code":"YTH"},
- {"city_code":"3209","city":"盐城市","county":"建湖县","county_code":"320925","sys_name":"盐城市_建湖县_非税收缴","sys_code":"FSSR"},
- {"city_code":"3209","city":"盐城市","county":"建湖县","county_code":"320925","sys_name":"盐城市_建湖县_财政一体化","sys_code":"YTH"},
- {"city_code":"3209","city":"盐城市","county":"建湖县","county_code":"320925","sys_name":"盐城市_建湖县_国库集中支付","sys_code":"GKZF"},
- {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_部门预算编审系统","sys_code":"BMYS"},
- {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_财政一体化信息系统","sys_code":"YTH"},
- {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_财政专户核算系统","sys_code":"ZHHS"},
- {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_非税收入收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_总预算会计核算系统","sys_code":"KJHS"},
- {"city_code":"3209","city":"盐城市","county":"大丰区","county_code":"320982","sys_name":"盐城市_大丰区_部门预算系统","sys_code":"BMYS"},
- {"city_code":"3209","city":"盐城市","county":"大丰区","county_code":"320982","sys_name":"盐城市_大丰区_财政一体化","sys_code":"YTH"},
- {"city_code":"3209","city":"盐城市","county":"大丰区","county_code":"320982","sys_name":"盐城市_大丰区_总预算会计核算财务软件","sys_code":"KJHS"},
- {"city_code":"3209","city":"盐城市","county":"经济技术开发区","county_code":"320991","sys_name":"盐城市_经济技术开发区_部门预算软件","sys_code":"BMYS"},
- {"city_code":"3209","city":"盐城市","county":"经济技术开发区","county_code":"320991","sys_name":"盐城市_经济技术开发区_国库集中支付","sys_code":"GKZF"},
- {"city_code":"3210","city":"扬州市","county":"市本级","county_code":"321000","sys_name":"财政专户核算","sys_code":"ZHHS"},
- {"city_code":"3210","city":"扬州市","county":"市本级","county_code":"321000","sys_name":"老非税收入征缴系统","sys_code":"FSSR"},
- {"city_code":"3210","city":"扬州市","county":"市本级","county_code":"321000","sys_name":"扬州财政一体化信息管理系统","sys_code":"YTH"},
- {"city_code":"3210","city":"扬州市","county":"广陵区","county_code":"321002","sys_name":"财政一体化系统","sys_code":"YTH"},
- {"city_code":"3210","city":"扬州市","county":"广陵区","county_code":"321002","sys_name":"非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3210","city":"扬州市","county":"邗江区","county_code":"321003","sys_name":"财政一体化系统","sys_code":"YTH"},
- {"city_code":"3210","city":"扬州市","county":"邗江区","county_code":"321003","sys_name":"非税系统","sys_code":"FSSR"},
- {"city_code":"3210","city":"扬州市","county":"邗江区","county_code":"321003","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3210","city":"扬州市","county":"宝应县","county_code":"321023","sys_name":"非税收入征收","sys_code":"FSSR"},
- {"city_code":"3210","city":"扬州市","county":"宝应县","county_code":"321023","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"部门预算编制","sys_code":"BMYS"},
- {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"非税收入收缴","sys_code":"FSSR"},
- {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"行政事业性单位国有资产管理","sys_code":"ZCGL"},
- {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3210","city":"扬州市","county":"高邮市","county_code":"321084","sys_name":"财政业务系统","sys_code":"YTH"},
- {"city_code":"3210","city":"扬州市","county":"江都区","county_code":"321088","sys_name":"财政业务综合系统","sys_code":"ZHYW"},
- {"city_code":"3210","city":"扬州市","county":"江都区","county_code":"321088","sys_name":"江都开发区预算执行系统","sys_code":"YSZX"},
- {"city_code":"3211","city":"镇江市","county":"市本级","county_code":"321100","sys_name":"财政一体化","sys_code":"YTH"},
- {"city_code":"3211","city":"镇江市","county":"京口区","county_code":"321102","sys_name":"富深协通财政一体化业务管理系统","sys_code":"YTH"},
- {"city_code":"3211","city":"镇江市","county":"京口区","county_code":"321102","sys_name":"富深协通非税收缴系统","sys_code":"FSSR"},
- {"city_code":"3211","city":"镇江市","county":"京口区","county_code":"321102","sys_name":"富深协通工资统发系统","sys_code":"GZTF"},
- {"city_code":"3211","city":"镇江市","county":"润州区","county_code":"321111","sys_name":"部门预算系统","sys_code":"BMYS"},
- {"city_code":"3211","city":"镇江市","county":"润州区","county_code":"321111","sys_name":"财政一体化","sys_code":"YTH"},
- {"city_code":"3211","city":"镇江市","county":"润州区","county_code":"321111","sys_name":"非税收入","sys_code":"FSSR"},
- {"city_code":"3211","city":"镇江市","county":"丹徒区","county_code":"321112","sys_name":"财政综合业务系统","sys_code":"YTH"},
- {"city_code":"3211","city":"镇江市","county":"丹阳市","county_code":"321181","sys_name":"部门预算系统","sys_code":"BMYS"},
- {"city_code":"3211","city":"镇江市","county":"丹阳市","county_code":"321181","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3211","city":"镇江市","county":"扬中市","county_code":"321182","sys_name":"部门预算系统","sys_code":"BMYS"},
- {"city_code":"3211","city":"镇江市","county":"扬中市","county_code":"321182","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3211","city":"镇江市","county":"句容市","county_code":"321183","sys_name":"非税收入","sys_code":"FSSR"},
- {"city_code":"3211","city":"镇江市","county":"句容市","county_code":"321183","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_部门预算系统","sys_code":"BMYS"},
- {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_非税收入系统","sys_code":"FSSR"},
- {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_绩效管理系统","sys_code":"JXGL"},
- {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_预算执行系统","sys_code":"YSZX"},
- {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_综合治税系统","sys_code":"ZHZS"},
- {"city_code":"3212","city":"泰州市","county":"海陵区","county_code":"321202","sys_name":"泰州市_海陵区_部门预算编制系统","sys_code":"BMYS"},
- {"city_code":"3212","city":"泰州市","county":"海陵区","county_code":"321202","sys_name":"泰州市_海陵区_县区财政一体化","sys_code":"YTH"},
- {"city_code":"3212","city":"泰州市","county":"高港区","county_code":"321203","sys_name":"泰州市_高港区_预算执行系统","sys_code":"YSZX"},
- {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_部门预算系统","sys_code":"BMYS"},
- {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_财政一体化系统","sys_code":"YTH"},
- {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_非税收缴系统","sys_code":"FSSR"},
- {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_预算执行系统","sys_code":"YSZX"},
- {"city_code":"3212","city":"泰州市","county":"医药高新区","county_code":"321205","sys_name":"泰州市_医药高新区_财政一体化系统","sys_code":"YTH"},
- {"city_code":"3212","city":"泰州市","county":"兴化市","county_code":"321281","sys_name":"泰州市_兴化市_部门预算","sys_code":"BMYS"},
- {"city_code":"3212","city":"泰州市","county":"兴化市","county_code":"321281","sys_name":"泰州市_兴化市_非税收缴","sys_code":"FSSR"},
- {"city_code":"3212","city":"泰州市","county":"兴化市","county_code":"321281","sys_name":"泰州市_兴化市_国库集中支付","sys_code":"GKZF"},
- {"city_code":"3212","city":"泰州市","county":"靖江市","county_code":"321282","sys_name":"泰州市_靖江市_预算执行系统","sys_code":"YSZX"},
- {"city_code":"3212","city":"泰州市","county":"靖江市","county_code":"321282","sys_name":"泰州市_靖江市_非税收入收缴","sys_code":"FSSR"},
- {"city_code":"3212","city":"泰州市","county":"靖江市","county_code":"321282","sys_name":"泰州市_靖江市_部门预算编审系统","sys_code":"BMYS"},
- {"city_code":"3212","city":"泰州市","county":"泰兴市","county_code":"321283","sys_name":"泰州市_泰兴市_部门预算系统","sys_code":"BMYS"},
- {"city_code":"3212","city":"泰州市","county":"泰兴市","county_code":"321283","sys_name":"泰州市_泰兴市_非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3212","city":"泰州市","county":"泰兴市","county_code":"321283","sys_name":"泰州市_泰兴市_预算执行系统","sys_code":"BMYS"},
- {"city_code":"3213","city":"宿迁市","county":"市本级","county_code":"321300","sys_name":"部门预算管理系统","sys_code":"BMYS"},
- {"city_code":"3213","city":"宿迁市","county":"市本级","county_code":"321300","sys_name":"非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3213","city":"宿迁市","county":"市本级","county_code":"321300","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3213","city":"宿迁市","county":"宿城区","county_code":"321302","sys_name":"财政一体化平台及国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3213","city":"宿迁市","county":"宿城区","county_code":"321302","sys_name":"新中大非税收入管理","sys_code":"FSSR"},
- {"city_code":"3213","city":"宿迁市","county":"宿城区","county_code":"321302","sys_name":"总预算会计核算系统","sys_code":"KJHS"},
- {"city_code":"3213","city":"宿迁市","county":"宿豫区","county_code":"321311","sys_name":"非税收缴管理系统","sys_code":"FSSR"},
- {"city_code":"3213","city":"宿迁市","county":"宿豫区","county_code":"321311","sys_name":"联友财务管理系统","sys_code":"CWGL"},
- {"city_code":"3213","city":"宿迁市","county":"宿豫区","county_code":"321311","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"国库集中支付、指标管理系统","sys_code":"YSZX"},
- {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"开发区总预算系统","sys_code":"BMYS"},
- {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"总预算会计核算","sys_code":"KJHS"},
- {"city_code":"3213","city":"宿迁市","county":"泗阳县","county_code":"321323","sys_name":"预算执行","sys_code":"YSZX"},
- {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"部门预算系统","sys_code":"BMYS"},
- {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"国库账务系统","sys_code":"KJHS"},
- {"city_code":"3201","city":"南京市","county":"高新区","county_code":"320100GXQ","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3201","city":"南京市","county":"化工园区","county_code":"320100HGY","sys_name":"化学工业园区非税收入管理系统","sys_code":"FSSR"},
- {"city_code":"3201","city":"南京市","county":"经济技术开发区","county_code":"320100JKQ","sys_name":"非税收入账套","sys_code":"FSZT"},
- {"city_code":"3201","city":"南京市","county":"化工园区","county_code":"320101HGY","sys_name":"化学工业园区预算执行系统","sys_code":"YSZX"},
- {"city_code":"3201","city":"南京市","county":"经济技术开发区","county_code":"320101JKQ","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3201","city":"南京市","county":"化工园区","county_code":"320102HGY","sys_name":"会计核算","sys_code":"KYHS"},
- {"city_code":"3201","city":"南京市","county":"经济技术开发区","county_code":"320102JKQ","sys_name":"总预算会计账","sys_code":"KJHS"},
- {"city_code":"3202","city":"无锡市","county":"锡山开发区","county_code":"320205KFQ","sys_name":"预算内外收支核算系统","sys_code":"KJHS"},
- {"city_code":"3202","city":"无锡市","county":"滨湖区马山开发区","county_code":"320211KFQ","sys_name":"账户核算系统","sys_code":"ZHHS"},
- {"city_code":"3202","city":"无锡市","county":"江阴开发区","county_code":"320281kfq","sys_name":"财政一体化平台","sys_code":"YTH"},
- {"city_code":"3202","city":"无锡市","county":"江阴开发区","county_code":"320281kfq","sys_name":"账户核算系统","sys_code":"ZHHS"},
- {"city_code":"3202","city":"无锡市","county":"宜兴环科园","county_code":"320282KFQ","sys_name":"财务核算系统","sys_code":"ZHHS"},
- {"city_code":"3202","city":"无锡市","county":"宜兴开发区","county_code":"320282KFQ","sys_name":"总预算核算系统","sys_code":"ZHHS"},
- {"city_code":"3203","city":"徐州市","county":"经济技术开发区","county_code":"320300JKQ","sys_name":"富深协通财政一体化业务管理系统软件","sys_code":"YTH"},
- {"city_code":"3203","city":"徐州市","county":"经济技术开发区","county_code":"320300JKQ","sys_name":"账务处理系统(收支分类改革升级版)","sys_code":"KJHS"},
- {"city_code":"3204","city":"常州市","county":"天宁经开区","county_code":"320402JKQ","sys_name":"账务处理系统","sys_code":"KJHS"},
- {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320404KFQ","sys_name":"国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320405KFQ","sys_name":"用款计划系统","sys_code":"JHGL"},
- {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320406KFQ","sys_name":"指标管理系统","sys_code":"ZBGL"},
- {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320407KFQ","sys_name":"总预算系统","sys_code":"ZYS"},
- {"city_code":"3204","city":"常州市","county":"经开区","county_code":"320412JKQ","sys_name":"财政预算外业务","sys_code":"YSW"},
- {"city_code":"3204","city":"常州市","county":"经开区","county_code":"320412JKQ","sys_name":"非税收缴系统","sys_code":"FSSR"},
- {"city_code":"3204","city":"常州市","county":"经开区","county_code":"320412JKQ","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3204","city":"常州市","county":"武进高新区","county_code":"320413GXQ","sys_name":"财政一体化管理信息系统","sys_code":"YTH"},
- {"city_code":"3204","city":"常州市","county":"溧阳中关村","county_code":"320481ZGC","sys_name":"用友U8R10财政一体化平台","sys_code":"YTH"},
- {"city_code":"3204","city":"常州市","county":"溧阳中关村开发区","county_code":"320481ZGCKF","sys_name":"用友U8R10财政一体化平台","sys_code":"YTH"},
- {"city_code":"3205","city":"苏州市","county":"相城区开发区","county_code":"320507KFQ","sys_name":"开发区财政系统","sys_code":"YTH"},
- {"city_code":"3205","city":"苏州市","county":"常熟市高新区","county_code":"320581GXQ","sys_name":"高新区总预算系统","sys_code":"ZYS"},
- {"city_code":"3205","city":"苏州市","county":"昆山市开发区","county_code":"320583KFQ","sys_name":"开发区公共财政服务平台","sys_code":"YTH"},
- {"city_code":"3205","city":"苏州市","county":"太仓市新区","county_code":"320585XQ","sys_name":"非税收入系统","sys_code":"FSSR"},
- {"city_code":"3205","city":"苏州市","county":"太仓市新区","county_code":"320586XQ","sys_name":"会计核算系统","sys_code":"KJHS"},
- {"city_code":"3205","city":"苏州市","county":"太仓市新区","county_code":"320587XQ","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"开发区","county_code":"320600KFQ","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"苏通园区","county_code":"320600STY","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3206","city":"南通市","county":"通州湾示范区","county_code":"320600TZW","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3207","city":"连云港市","county":"开发区","county_code":"320701KFQ","sys_name":"非税收入","sys_code":"FSSR"},
- {"city_code":"3208","city":"淮安市","county":"开发区","county_code":"320800KFQ","sys_name":"用友GRP-U8管理软件","sys_code":"YTH"},
- {"city_code":"3209","city":"盐城市","county":"城南新区","county_code":"320900CZXQ","sys_name":"盐城市_城南新区_国库集中支付系统","sys_code":"GKZF"},
- {"city_code":"3209","city":"盐城市","county":"城南新区","county_code":"320901CZXQ","sys_name":"盐城市_城南新区_总预算账务处理系统","sys_code":"KJHS"},
- {"city_code":"3210","city":"扬州市","county":"化工园区","county_code":"321000HGY","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3210","city":"扬州市","county":"开发区","county_code":"321000KFQ","sys_name":"非税收入收缴","sys_code":"FSSR"},
- {"city_code":"3210","city":"扬州市","county":"科技新城","county_code":"321000KJC","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3210","city":"扬州市","county":"蜀冈-瘦西湖风景名胜区","county_code":"321000SXH","sys_name":"财政预算指标管理","sys_code":"ZBGL"},
- {"city_code":"3210","city":"扬州市","county":"蜀冈-瘦西湖风景名胜区","county_code":"321000SXH","sys_name":"总预算会计核算","sys_code":"KJHS"},
- {"city_code":"3210","city":"扬州市","county":"开发区","county_code":"321001KFQ","sys_name":"一体化系统","sys_code":"YTH"},
- {"city_code":"3210","city":"扬州市","county":"开发区","county_code":"321002KFQ","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3210","city":"扬州市","county":"高邮开发区","county_code":"321084KFQ","sys_name":"财政业务系统","sys_code":"YTH"},
- {"city_code":"3211","city":"镇江市","county":"新区","county_code":"321100XQ","sys_name":"财政一体化","sys_code":"YTH"},
- {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_行政管理系统","sys_code":"XZGL"},
- {"city_code":"3213","city":"宿迁市","county":"湖滨新城","county_code":"321300HBXC","sys_name":"新中大财务软件","sys_code":"KJHS"},
- {"city_code":"3213","city":"宿迁市","county":"经开区","county_code":"321300JKQ","sys_name":"新中大公共财政管理软件","sys_code":"YTH"},
- {"city_code":"3213","city":"宿迁市","county":"洋河新区","county_code":"321300YHXQ","sys_name":"预算执行系统","sys_code":"YSZX"},
- {"city_code":"3213","city":"宿迁市","county":"宿豫区开发区","county_code":"321311KFQ","sys_name":"开发区新中大财务核算系统","sys_code":"KJHS"},
- {"city_code":"3213","city":"宿迁市","county":"泗洪县开发区","county_code":"321324KFQ","sys_name":"开发区账务系统","sys_code":"KJHS"}];
-
-
-
-
- export function getCountyByCode(code){
- //var jsobj = JSON.parse(origin_place_arr);
- var jsobj = origin_place_arr;
-
- var jsonlength = jsobj.length;
- for (var i = 0; i < jsonlength; i++) {
- if(jsobj[i].county_code == code){
- return jsobj[i].city+jsobj[i].county;
- }
- }
- return code;
- }
-
- export function getCodeByCounty(place){
- place = place.replace(/\s*\t*/gim,"");
- //var jsobj = JSON.parse(origin_place_arr);
- var jsobj = origin_place_arr;
-
- var jsonlength = jsobj.length;
- for (var i = 0; i < jsonlength; i++) {
- if(jsobj[i].city === "" || jsobj[i].city == undefined)
- continue;
- if(jsobj[i].county === "" || jsobj[i].county == undefined)
- continue;
- if((place.indexOf(jsobj[i].city) != -1) && (place.indexOf(jsobj[i].county) != -1)){
- return jsobj[i].county_code;
- }
- }
- return place;
- }
-
- export function getSystemNameById(id){
- var temJson = system_arr;
- var sys_size = temJson.length;
- for (var i = 0; i < sys_size; i++) {
- if(temJson[i].sys_id == id){
- return temJson[i].sys_name;
- }
- }
- return id;
- }
-
-
-
- export function getIdBySystemName(name){
- var temJson = system_arr;
- var sys_size = temJson.length;
- for (var i = 0; i < sys_size; i++) {
- if(temJson[i].sys_name == name){
- return temJson[i].sys_id;
- }
- }
- return name;
- }
-
- export function getCodeBySystemName(name){
- var jsobj = origin_place_arr;
-
- var jsonlength = jsobj.length;
- for (var i = 0; i < jsonlength; i++) {
- if(jsobj[i].sys_name == name){
- return jsobj[i].sys_code;
- }
- }
- return name;
- }
-}
-
-
+/*
+read a object from jiangsu province , such as nanjing with some information
+读取江苏的某个地区的信息,以及系统信息
+ */
+module Kubernetes{
+ public var system_arr = [{"sys_name":"部门预算","sys_id":"1"},{"sys_name":"非税收入收缴管理系统","sys_id":"2"},
+ {"sys_name":"预算执行系统","sys_id":"3"},{"sys_name":"资产管理系统","sys_id":"4"},{"sys_name":"用友财政综合管理信息系统","sys_id":"5"},
+ {"sys_name":"用友A++","sys_id":"6"},{"sys_name":"浦口财政一体化","sys_id":"7"},{"sys_name":"栖霞区财政业务信息管理系统","sys_id":"8"},
+ {"sys_name":"一体化系统","sys_id":"9"},{"sys_name":"财政管理一体化系统","sys_id":"10"},{"sys_name":"滨江开发区财政分局","sys_id":"11"},
+ {"sys_name":"江宁经济技术开发区财政分局","sys_id":"12"},{"sys_name":"江宁科学园财政分局","sys_id":"13"},{"sys_name":"财政一体化系统","sys_id":"14"},
+ {"sys_name":"A++财政一体化平台","sys_id":"15"},{"sys_name":"非税系统","sys_id":"16"},{"sys_name":"一体化预算执行系统","sys_id":"17"},
+ {"sys_name":"一体化","sys_id":"18"},{"sys_name":"国库集中支付管理信息系统","sys_id":"19"},{"sys_name":"国库集中支付","sys_id":"20"},
+ {"sys_name":"财政专户核算及非税系统","sys_id":"21"},{"sys_name":"集中支付系统","sys_id":"22"},{"sys_name":"财政专户核算系统","sys_id":"23"},
+ {"sys_name":"非税收缴系统","sys_id":"24"},{"sys_name":"财政一体化平台","sys_id":"25"},{"sys_name":"富深预算执行","sys_id":"26"},
+ {"sys_name":"用友非税及票据","sys_id":"27"},{"sys_name":"用友预算执行","sys_id":"28"},{"sys_name":"江苏省财政预算执行系统","sys_id":"29"},
+ {"sys_name":"用友通用软件","sys_id":"30"},{"sys_name":"联友软件/通用财务","sys_id":"31"},{"sys_name":"用友GRPG-U8R10财政管理软件","sys_id":"32"},
+ {"sys_name":"用友GPP-R10财政管理软件","sys_id":"33"},{"sys_name":"富深协通财政一体化管理信息系统","sys_id":"34"},{"sys_name":"财务统一核算系统","sys_id":"35"},
+ {"sys_name":"公共财政管理软件","sys_id":"36"},{"sys_name":"A++财政一体化信息平台","sys_id":"37"},{"sys_name":"新中大公共财务管理软件","sys_id":"38"},
+ {"sys_name":"富深财政一体化管理系统","sys_id":"39"},{"sys_name":"新中大公共财政管理系统","sys_id":"40"},{"sys_name":"富深协通财政一体化业务管理系统软件","sys_id":"41"},
+ {"sys_name":"新中大公共财政管理软件Gsoft","sys_id":"42"},{"sys_name":"财政一体化业务系统","sys_id":"43"},{"sys_name":"财政一体化软件","sys_id":"44"},
+ {"sys_name":"非税收入系统","sys_id":"45"},{"sys_name":"总预算系统","sys_id":"46"},{"sys_name":"国库集中支付系统","sys_id":"47"},{"sys_name":"用款计划系统","sys_id":"48"},
+ {"sys_name":"指标管理系统","sys_id":"49"},{"sys_name":"财政综合业务管理平台","sys_id":"50"},{"sys_name":"财政一体化管理信息系统","sys_id":"51"},{"sys_name":"工资统发","sys_id":"52"},
+ {"sys_name":"国有资产","sys_id":"53"},{"sys_name":"乡镇非税收入","sys_id":"54"},{"sys_name":"乡镇集中支付","sys_id":"55"},{"sys_name":"非税征缴系统","sys_id":"56"},
+ {"sys_name":"预算编制与执行系统","sys_id":"57"},{"sys_name":"预算管理综合业务平台","sys_id":"58"},{"sys_name":"u8管理软件","sys_id":"59"},{"sys_name":"财政指标管理系统","sys_id":"60"},
+ {"sys_name":"用友GRP-R9财务管理软件","sys_id":"61"},{"sys_name":"用友GRP-U8财政管理软件","sys_id":"62"},{"sys_name":"账务处理系统","sys_id":"63"},{"sys_name":"R9i财政管理软件","sys_id":"64"},
+ {"sys_name":"u8财政管理软件","sys_id":"65"},{"sys_name":"相城区财政综合管理信息系统","sys_id":"66"},{"sys_name":"财政非税综合管理系统","sys_id":"67"},{"sys_name":"财政综合管理平台","sys_id":"68"},
+ {"sys_name":"吴江区财政一体化","sys_id":"69"},{"sys_name":"用友R9","sys_id":"70"},{"sys_name":"财政公共应用服务平台","sys_id":"71"},{"sys_name":"金蝶K/3创新管理平台","sys_id":"72"},{"sys_name":"账务数据系统","sys_id":"73"},
+ {"sys_name":"公共财政服务平台","sys_id":"74"},{"sys_name":"会计核算系统","sys_id":"75"},{"sys_name":"项目库","sys_id":"76"},{"sys_name":"财政总预算(外)专户管理系统","sys_id":"77"},
+ {"sys_name":"城建资金专户管理系统","sys_id":"78"},{"sys_name":"农保专户管理系统","sys_id":"79"},{"sys_name":"农业发展基金专户管理系统","sys_id":"80"},
+ {"sys_name":"失地农民保障资金专户","sys_id":"81"},{"sys_name":"非税收入征管系统","sys_id":"82"},{"sys_name":"工资统发人员信息","sys_id":"83"},
+ {"sys_name":"预算指标-国库集中支付系统","sys_id":"84"},{"sys_name":"总预算会计核算系统","sys_id":"85"},{"sys_name":"部门预算编审系统","sys_id":"86"},
+ {"sys_name":"公务消费管理系统","sys_id":"87"},{"sys_name":"国有资产管理系统","sys_id":"88"},{"sys_name":"区镇财政管理“一体化”系统","sys_id":"89"},
+ {"sys_name":"县本级财政管理“一体化”系统","sys_id":"90"},{"sys_name":"用友政务","sys_id":"91"},{"sys_name":"财政专户核算(行政口专项资金)","sys_id":"92"},
+ {"sys_name":"财政专户核算(经建口专项资金)","sys_id":"93"},{"sys_name":"财政专户核算(农业保险专账)","sys_id":"94"},{"sys_name":"财政专户核算(农业综合开发专账)","sys_id":"95"},
+ {"sys_name":"财政专户核算(社保资金专账)","sys_id":"96"},{"sys_name":"财政专户核算(土地出让专账)","sys_id":"97"},{"sys_name":"财政专户核算(综合口专项资金)","sys_id":"98"},
+ {"sys_name":"非税收入管理系统","sys_id":"99"},{"sys_name":"农业专向及农业发展基金专项","sys_id":"100"},{"sys_name":"总预算会计核算","sys_id":"101"},{"sys_name":"金财工程一体化支撑平台","sys_id":"102"},
+ {"sys_name":"非税收缴","sys_id":"103"},{"sys_name":"学校预算执行","sys_id":"104"},{"sys_name":"预算执行","sys_id":"105"},{"sys_name":"专项资金","sys_id":"106"},
+ {"sys_name":"总预算","sys_id":"107"},{"sys_name":"部门预算系统","sys_id":"108"},{"sys_name":"财政专户核算","sys_id":"109"},{"sys_name":"财政专户账务系统","sys_id":"110"},
+ {"sys_name":"富深财政一体化业务管理系统","sys_id":"111"},{"sys_name":"国有资产系统","sys_id":"112"},{"sys_name":"国库专项资金管理系统","sys_id":"113"},
+ {"sys_name":"非税收缴管理系统","sys_id":"114"},{"sys_name":"财政管理系统(新农保)","sys_id":"115"},{"sys_name":"财政管理系统(城市居民医疗统筹)","sys_id":"116"},
+ {"sys_name":"财政管理系统(集中支付中心)","sys_id":"117"},{"sys_name":"财政管理系统(解困金)","sys_id":"118"},{"sys_name":"财政管理系统(旧城改造)","sys_id":"119"},
+ {"sys_name":"财政管理系统(社保资金账户)","sys_id":"120"},{"sys_name":"财政管理系统(土地出让专帐)","sys_id":"121"},{"sys_name":"财政管理系统(预拨及非集中支付中心)","sys_id":"122"},
+ {"sys_name":"财政管理系统(预算外资金)","sys_id":"123"},{"sys_name":"总预算会计","sys_id":"124"},{"sys_name":"财务核算系统","sys_id":"125"},{"sys_name":"工资统发系统","sys_id":"126"},
+ {"sys_name":"预算编审系统","sys_id":"127"},{"sys_name":"预算管理系统","sys_id":"128"},{"sys_name":"预算外资金(从联网审计中取数)","sys_id":"129"},
+ {"sys_name":"G6-E财务管理系统","sys_id":"130"},{"sys_name":"新中大公共财政管理软件","sys_id":"131"},{"sys_name":"用友GRP/R9财政管理软件","sys_id":"132"},
+ {"sys_name":"用友GRP-U8R10","sys_id":"133"},{"sys_name":"财政一体化管理系统(基建户)","sys_id":"134"},{"sys_name":"财政一体化管理系统(集中支付中心)","sys_id":"135"},
+ {"sys_name":"财政一体化管理系统(农业综合开发)","sys_id":"136"},{"sys_name":"财政一体化管理系统(预算外资金)","sys_id":"137"},{"sys_name":"财政一体化管理系统(支农专户)","sys_id":"138"},
+ {"sys_name":"财政一体化管理系统(总预算)","sys_id":"139"},{"sys_name":"国资管理系统","sys_id":"140"},{"sys_name":"乡财县管系统","sys_id":"141"},{"sys_name":"预算编制管理系统","sys_id":"142"},
+ {"sys_name":"盐城市_市本级_部门预算","sys_id":"143"},{"sys_name":"盐城市_市本级_非税收管理系统","sys_id":"144"},{"sys_name":"盐城市_市本级_预算执行系统","sys_id":"145"},
+ {"sys_name":"盐城市_亭湖区_财政专户","sys_id":"146"},{"sys_name":"盐城市_亭湖区_非税收入管理","sys_id":"147"},{"sys_name":"盐城市_亭湖区_国库集中支付管理","sys_id":"148"},
+ {"sys_name":"盐城市_亭湖区_预算指标管理","sys_id":"149"},{"sys_name":"盐城市_亭湖区_总预算会计核算","sys_id":"150"},{"sys_name":"盐城市_盐都区_财政专户核算系统","sys_id":"151"},
+ {"sys_name":"盐城市_盐都区_非税收入管理系统","sys_id":"152"},{"sys_name":"盐城市_盐都区_国库集中支付系统","sys_id":"153"},{"sys_name":"盐城市_盐都区_总预算会计核算系统","sys_id":"154"},
+ {"sys_name":"盐城市_响水县_部门预算管理系统","sys_id":"155"},{"sys_name":"盐城市_响水县_财政一体化信息系统","sys_id":"156"},{"sys_name":"盐城市_响水县_非税收入收缴管理系统","sys_id":"157"},
+ {"sys_name":"盐城市_滨海县财政一体化","sys_id":"158"},{"sys_name":"盐城市_阜宁县_财政管理软件","sys_id":"159"},{"sys_name":"盐城市_阜宁县_财政管理软件用友U8","sys_id":"160"},
+ {"sys_name":"盐城市_射阳县_财政预算执行一体化系统","sys_id":"161"},{"sys_name":"盐城市_建湖县_非税收缴","sys_id":"162"},
+ {"sys_name":"盐城市_建湖县_财政一体化","sys_id":"163"},{"sys_name":"盐城市_建湖县_国库集中支付","sys_id":"164"},
+ {"sys_name":"盐城市_东台市_部门预算编审系统","sys_id":"165"},{"sys_name":"盐城市_东台市_财政一体化信息系统","sys_id":"166"},
+ {"sys_name":"盐城市_东台市_财政专户核算系统","sys_id":"167"},{"sys_name":"盐城市_东台市_非税收入收缴管理系统","sys_id":"168"},
+ {"sys_name":"盐城市_东台市_总预算会计核算系统","sys_id":"169"},{"sys_name":"盐城市_大丰区_部门预算系统","sys_id":"170"},
+ {"sys_name":"盐城市_大丰区_财政一体化","sys_id":"171"},{"sys_name":"盐城市_大丰区_总预算会计核算财务软件","sys_id":"172"},
+ {"sys_name":"盐城市_经济技术开发区_部门预算软件","sys_id":"173"},{"sys_name":"盐城市_经济技术开发区_国库集中支付","sys_id":"174"},
+ {"sys_name":"老非税收入征缴系统","sys_id":"175"},{"sys_name":"扬州财政一体化信息管理系统","sys_id":"176"},{"sys_name":"非税收入征收","sys_id":"177"},
+ {"sys_name":"部门预算编制","sys_id":"178"},{"sys_name":"非税收入收缴","sys_id":"179"},{"sys_name":"行政事业性单位国有资产管理","sys_id":"180"},
+ {"sys_name":"财政业务系统","sys_id":"181"},{"sys_name":"财政业务综合系统","sys_id":"182"},{"sys_name":"江都开发区预算执行系统","sys_id":"183"},
+ {"sys_name":"财政一体化","sys_id":"184"},{"sys_name":"富深协通财政一体化业务管理系统","sys_id":"185"},{"sys_name":"富深协通非税收缴系统","sys_id":"186"},
+ {"sys_name":"富深协通工资统发系统","sys_id":"187"},{"sys_name":"非税收入","sys_id":"188"},{"sys_name":"财政综合业务系统","sys_id":"189"},
+ {"sys_name":"泰州市_市本级_部门预算系统","sys_id":"190"},{"sys_name":"泰州市_市本级_非税收入系统","sys_id":"191"},{"sys_name":"泰州市_市本级_绩效管理系统","sys_id":"192"},
+ {"sys_name":"泰州市_市本级_预算执行系统","sys_id":"193"},{"sys_name":"泰州市_市本级_综合治税系统","sys_id":"194"},{"sys_name":"泰州市_海陵区_部门预算编制系统","sys_id":"195"},
+ {"sys_name":"泰州市_海陵区_县区财政一体化","sys_id":"196"},{"sys_name":"泰州市_高港区_预算执行系统","sys_id":"197"},
+ {"sys_name":"泰州市_姜堰区_部门预算系统","sys_id":"198"},{"sys_name":"泰州市_姜堰区_财政一体化系统","sys_id":"199"},
+ {"sys_name":"泰州市_姜堰区_非税收缴系统","sys_id":"200"},{"sys_name":"泰州市_姜堰区_预算执行系统","sys_id":"201"},
+ {"sys_name":"泰州市_医药高新区_财政一体化系统","sys_id":"202"},{"sys_name":"泰州市_兴化市_部门预算","sys_id":"203"},
+ {"sys_name":"泰州市_兴化市_非税收缴","sys_id":"204"},{"sys_name":"泰州市_兴化市_国库集中支付","sys_id":"205"},
+ {"sys_name":"泰州市_靖江市_预算执行系统","sys_id":"206"},{"sys_name":"泰州市_靖江市_非税收入收缴","sys_id":"207"},
+ {"sys_name":"泰州市_靖江市_部门预算编审系统","sys_id":"208"},{"sys_name":"泰州市_泰兴市_部门预算系统","sys_id":"209"},
+ {"sys_name":"泰州市_泰兴市_非税收入管理系统","sys_id":"210"},{"sys_name":"泰州市_泰兴市_预算执行系统","sys_id":"211"},
+ {"sys_name":"部门预算管理系统","sys_id":"212"},{"sys_name":"财政一体化平台及国库集中支付系统","sys_id":"213"},
+ {"sys_name":"新中大非税收入管理","sys_id":"214"},{"sys_name":"联友财务管理系统","sys_id":"215"},{"sys_name":"国库集中支付、指标管理系统","sys_id":"216"},
+ {"sys_name":"开发区总预算系统","sys_id":"217"},{"sys_name":"国库账务系统","sys_id":"218"},{"sys_name":"化学工业园区非税收入管理系统","sys_id":"219"},
+ {"sys_name":"非税收入账套","sys_id":"220"},{"sys_name":"化学工业园区预算执行系统","sys_id":"221"},{"sys_name":"会计核算","sys_id":"222"},
+ {"sys_name":"总预算会计账","sys_id":"223"},{"sys_name":"预算内外收支核算系统","sys_id":"224"},{"sys_name":"账户核算系统","sys_id":"225"},
+ {"sys_name":"总预算核算系统","sys_id":"226"},{"sys_name":"账务处理系统(收支分类改革升级版)","sys_id":"227"},{"sys_name":"财政预算外业务","sys_id":"228"},
+ {"sys_name":"用友U8R10财政一体化平台","sys_id":"229"},{"sys_name":"开发区财政系统","sys_id":"230"},{"sys_name":"高新区总预算系统","sys_id":"231"},
+ {"sys_name":"开发区公共财政服务平台","sys_id":"232"},{"sys_name":"用友GRP-U8管理软件","sys_id":"233"},{"sys_name":"盐城市_城南新区_国库集中支付系统","sys_id":"234"},
+ {"sys_name":"盐城市_城南新区_总预算账务处理系统","sys_id":"235"},{"sys_name":"财政预算指标管理","sys_id":"236"},{"sys_name":"泰州市_市本级_行政管理系统","sys_id":"237"},
+ {"sys_name":"新中大财务软件","sys_id":"238"},{"sys_name":"开发区新中大财务核算系统","sys_id":"239"},{"sys_name":"开发区账务系统","sys_id":"240"}];
+
+ public var origin_place_arr = [{"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"部门预算","sys_code":"BMYS"},
+ {"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3201","city":"南京市","county":"市本级","county_code":"320100","sys_name":"资产管理系统","sys_code":"ZCGL"},
+ {"city_code":"3201","city":"南京市","county":"玄武区","county_code":"320102","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3201","city":"南京市","county":"秦淮区","county_code":"320104","sys_name":"用友财政综合管理信息系统","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"建邺区","county_code":"320105","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3201","city":"南京市","county":"鼓楼区","county_code":"320106","sys_name":"用友A++","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"浦口区","county_code":"320111","sys_name":"浦口财政一体化","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"栖霞区","county_code":"320113","sys_name":"栖霞区财政业务信息管理系统","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"雨花台区","county_code":"320114","sys_name":"一体化系统","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"财政管理一体化系统","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"滨江开发区财政分局","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"江宁经济技术开发区财政分局","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"江宁区","county_code":"320115","sys_name":"江宁科学园财政分局","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"六合区","county_code":"320116","sys_name":"一体化系统","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"高淳区","county_code":"320118","sys_name":"财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3201","city":"南京市","county":"溧水区","county_code":"320124","sys_name":"A++财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3202","city":"无锡市","county":"市本级","county_code":"320200","sys_name":"财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3202","city":"无锡市","county":"市本级","county_code":"320200","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3202","city":"无锡市","county":"崇安区","county_code":"320202","sys_name":"非税系统","sys_code":"FSSR"},
+ {"city_code":"3202","city":"无锡市","county":"崇安区","county_code":"320202","sys_name":"一体化预算执行系统","sys_code":"YTH"},
+ {"city_code":"3202","city":"无锡市","county":"南长区","county_code":"320203","sys_name":"非税系统","sys_code":"FSSR"},
+ {"city_code":"3202","city":"无锡市","county":"南长区","county_code":"320203","sys_name":"一体化","sys_code":"YTH"},
+ {"city_code":"3202","city":"无锡市","county":"北塘区","county_code":"320204","sys_name":"国库集中支付管理信息系统","sys_code":"GKZF"},
+ {"city_code":"3202","city":"无锡市","county":"锡山区","county_code":"320205","sys_name":"国库集中支付","sys_code":"GKZF"},
+ {"city_code":"3202","city":"无锡市","county":"锡山区","county_code":"320205","sys_name":"财政专户核算及非税系统","sys_code":"ZHHS_FSSR"},
+ {"city_code":"3202","city":"无锡市","county":"惠山区","county_code":"320206","sys_name":"财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3202","city":"无锡市","county":"滨湖区","county_code":"320211","sys_name":"集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3202","city":"无锡市","county":"滨湖区","county_code":"320211","sys_name":"非税系统","sys_code":"FSSR"},
+ {"city_code":"3202","city":"无锡市","county":"滨湖区","county_code":"320211","sys_name":"财政专户核算系统","sys_code":"ZHHS"},
+ {"city_code":"3202","city":"无锡市","county":"新区","county_code":"320214","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3202","city":"无锡市","county":"新区","county_code":"320214","sys_name":"非税收缴系统","sys_code":"FSSR"},
+ {"city_code":"3202","city":"无锡市","county":"新区","county_code":"320214","sys_name":"财政专户核算系统","sys_code":"ZHHS"},
+ {"city_code":"3202","city":"无锡市","county":"江阴市","county_code":"320281","sys_name":"财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3202","city":"无锡市","county":"宜兴市","county_code":"320282","sys_name":"非税收缴系统","sys_code":"FSSR"},
+ {"city_code":"3202","city":"无锡市","county":"宜兴市","county_code":"320282","sys_name":"财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3203","city":"徐州市","county":"市本级","county_code":"320300","sys_name":"富深预算执行","sys_code":"YSZX"},
+ {"city_code":"3203","city":"徐州市","county":"市本级","county_code":"320300","sys_name":"用友非税及票据","sys_code":"FSSR"},
+ {"city_code":"3203","city":"徐州市","county":"市本级","county_code":"320300","sys_name":"用友预算执行","sys_code":"YSZX"},
+ {"city_code":"3203","city":"徐州市","county":"鼓楼区","county_code":"320302","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3203","city":"徐州市","county":"鼓楼区","county_code":"320302","sys_name":"用友通用软件","sys_code":"KJHS"},
+ {"city_code":"3203","city":"徐州市","county":"云龙区","county_code":"320303","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3203","city":"徐州市","county":"云龙区","county_code":"320303","sys_name":"联友软件/通用财务","sys_code":"KJHS"},
+ {"city_code":"3203","city":"徐州市","county":"云龙区","county_code":"320303","sys_name":"用友GRPG-U8R10财政管理软件","sys_code":"YSZX"},
+ {"city_code":"3203","city":"徐州市","county":"贾汪区","county_code":"320305","sys_name":"用友GPP-R10财政管理软件","sys_code":"KJHS"},
+ {"city_code":"3203","city":"徐州市","county":"泉山区","county_code":"320311","sys_name":"富深协通财政一体化管理信息系统","sys_code":"YTH"},
+ {"city_code":"3203","city":"徐州市","county":"铜山区","county_code":"320312","sys_name":"财务统一核算系统","sys_code":"KJHS"},
+ {"city_code":"3203","city":"徐州市","county":"铜山区","county_code":"320312","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3203","city":"徐州市","county":"铜山区","county_code":"320312","sys_name":"公共财政管理软件","sys_code":"YSZX"},
+ {"city_code":"3203","city":"徐州市","county":"丰县","county_code":"320321","sys_name":"A++财政一体化信息平台","sys_code":"YTH"},
+ {"city_code":"3203","city":"徐州市","county":"丰县","county_code":"320321","sys_name":"新中大公共财务管理软件","sys_code":"KJHS"},
+ {"city_code":"3203","city":"徐州市","county":"沛县","county_code":"320322","sys_name":"富深财政一体化管理系统","sys_code":"YTH"},
+ {"city_code":"3203","city":"徐州市","county":"沛县","county_code":"320322","sys_name":"新中大公共财政管理系统","sys_code":"KJHS"},
+ {"city_code":"3203","city":"徐州市","county":"睢宁县","county_code":"320324","sys_name":"富深协通财政一体化业务管理系统软件","sys_code":"YTH"},
+ {"city_code":"3203","city":"徐州市","county":"睢宁县","county_code":"320324","sys_name":"新中大公共财政管理软件Gsoft","sys_code":"KJHS"},
+ {"city_code":"3203","city":"徐州市","county":"新沂市","county_code":"320381","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3203","city":"徐州市","county":"邳州","county_code":"320382","sys_name":"财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3204","city":"常州市","county":"本级","county_code":"320400","sys_name":"财政一体化业务系统","sys_code":"YTH"},
+ {"city_code":"3204","city":"常州市","county":"天宁区","county_code":"320402","sys_name":"财政一体化软件","sys_code":"YTH"},
+ {"city_code":"3204","city":"常州市","county":"天宁区","county_code":"320402","sys_name":"非税收入系统","sys_code":"FSSR"},
+ {"city_code":"3204","city":"常州市","county":"天宁区","county_code":"320402","sys_name":"总预算系统","sys_code":"YSZX"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"非税收入系统","sys_code":"FSSR"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"用款计划系统","sys_code":"JHGL"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"指标管理系统","sys_code":"ZBGL"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区","county_code":"320404","sys_name":"总预算系统","sys_code":"ZYS"},
+ {"city_code":"3204","city":"常州市","county":"新北区","county_code":"320411","sys_name":"财政综合业务管理平台","sys_code":"YTH"},
+ {"city_code":"3204","city":"常州市","county":"武进区","county_code":"320412","sys_name":"财政一体化管理信息系统","sys_code":"YTH"},
+ {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"部门预算","sys_code":"BMYS"},
+ {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"工资统发","sys_code":"GZTF"},
+ {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"国有资产","sys_code":"ZCGL"},
+ {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"乡镇非税收入","sys_code":"XZFS"},
+ {"city_code":"3204","city":"常州市","county":"溧阳市","county_code":"320481","sys_name":"乡镇集中支付","sys_code":"XZGK"},
+ {"city_code":"3204","city":"常州市","county":"金坛区","county_code":"320482","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3205","city":"苏州市","county":"市本级","county_code":"320500","sys_name":"非税征缴系统","sys_code":"FSSR"},
+ {"city_code":"3205","city":"苏州市","county":"市本级","county_code":"320500","sys_name":"预算编制与执行系统","sys_code":"YSZX"},
+ {"city_code":"3205","city":"苏州市","county":"工业园区","county_code":"320501","sys_name":"预算管理综合业务平台","sys_code":"YSGL"},
+ {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"u8管理软件","sys_code":"CZGL"},
+ {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"财政指标管理系统","sys_code":"ZBGL"},
+ {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"用友GRP-R9财务管理软件","sys_code":"CWGL"},
+ {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"用友GRP-U8财政管理软件","sys_code":"CWGL"},
+ {"city_code":"3205","city":"苏州市","county":"虎丘区","county_code":"320505","sys_name":"账务处理系统","sys_code":"ZWCL"},
+ {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"R9i财政管理软件","sys_code":"CZGL"},
+ {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"部门预算","sys_code":"BMYS"},
+ {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3205","city":"苏州市","county":"吴中区","county_code":"320506","sys_name":"非税系统","sys_code":"FSSR"},
+ {"city_code":"3205","city":"苏州市","county":"相城区","county_code":"320507","sys_name":"u8财政管理软件","sys_code":"CZGL"},
+ {"city_code":"3205","city":"苏州市","county":"相城区","county_code":"320507","sys_name":"相城区财政综合管理信息系统","sys_code":"YTH"},
+ {"city_code":"3205","city":"苏州市","county":"姑苏区","county_code":"320508","sys_name":"财政非税综合管理系统","sys_code":"FSSR"},
+ {"city_code":"3205","city":"苏州市","county":"姑苏区","county_code":"320508","sys_name":"财政综合管理平台","sys_code":"YTH"},
+ {"city_code":"3205","city":"苏州市","county":"吴江区","county_code":"320509","sys_name":"吴江区财政一体化","sys_code":"YTH"},
+ {"city_code":"3205","city":"苏州市","county":"常熟市","county_code":"320581","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3205","city":"苏州市","county":"常熟市","county_code":"320581","sys_name":"用友R9","sys_code":"KJHS"},
+ {"city_code":"3205","city":"苏州市","county":"常熟市","county_code":"320581","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3205","city":"苏州市","county":"张家港市","county_code":"320582","sys_name":"财政公共应用服务平台","sys_code":"GGFW"},
+ {"city_code":"3205","city":"苏州市","county":"张家港市","county_code":"320582","sys_name":"金蝶K/3创新管理平台","sys_code":"CZGL"},
+ {"city_code":"3205","city":"苏州市","county":"张家港市","county_code":"320582","sys_name":"账务数据系统","sys_code":"KJHS"},
+ {"city_code":"3205","city":"苏州市","county":"昆山市","county_code":"320583","sys_name":"非税收入收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3205","city":"苏州市","county":"昆山市","county_code":"320583","sys_name":"公共财政服务平台","sys_code":"GGFW"},
+ {"city_code":"3205","city":"苏州市","county":"昆山市","county_code":"320583","sys_name":"国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"非税收入系统","sys_code":"FSSR"},
+ {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"会计核算系统","sys_code":"KJHS"},
+ {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"项目库","sys_code":"XMK"},
+ {"city_code":"3205","city":"苏州市","county":"太仓市","county_code":"320585","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"本级","county_code":"320600","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"崇川区","county_code":"320602","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"财政总预算(外)专户管理系统","sys_code":"YSWZH"},
+ {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"城建资金专户管理系统","sys_code":"CJZH"},
+ {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"农保专户管理系统","sys_code":"NBZH"},
+ {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"农业发展基金专户管理系统","sys_code":"NFJJ"},
+ {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"失地农民保障资金专户","sys_code":"SDNM"},
+ {"city_code":"3206","city":"南通市","county":"港闸区","county_code":"320611","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"非税收入征管系统","sys_code":"FSSR"},
+ {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"工资统发人员信息","sys_code":"GZTF"},
+ {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"预算指标-国库集中支付系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"通州区","county_code":"320612","sys_name":"总预算会计核算系统","sys_code":"KJHS"},
+ {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"部门预算编审系统","sys_code":"BMYS"},
+ {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"公务消费管理系统","sys_code":"GWXF"},
+ {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"国有资产管理系统","sys_code":"ZCGL"},
+ {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"区镇财政管理“一体化”系统","sys_code":"XZYTH"},
+ {"city_code":"3206","city":"南通市","county":"海安县","county_code":"320621","sys_name":"县本级财政管理“一体化”系统","sys_code":"YTH"},
+ {"city_code":"3206","city":"南通市","county":"如东县","county_code":"320623","sys_name":"用友政务","sys_code":"YTH"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(行政口专项资金)","sys_code":"ZHXZ"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(经建口专项资金)","sys_code":"ZHJJ"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(农业保险专账)","sys_code":"ZHNB"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(农业综合开发专账)","sys_code":"ZHNF"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(社保资金专账)","sys_code":"ZHSB"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(土地出让专账)","sys_code":"ZHTD"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"财政专户核算(综合口专项资金)","sys_code":"ZHZH"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"农业专向及农业发展基金专项","sys_code":"NFZX"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"启东市","county_code":"320681","sys_name":"总预算会计核算","sys_code":"KJHS"},
+ {"city_code":"3206","city":"南通市","county":"如皋市","county_code":"320682","sys_name":"金财工程一体化支撑平台","sys_code":"YTH"},
+ {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"非税收缴","sys_code":"FSSR"},
+ {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"学校预算执行","sys_code":"YSZXXX"},
+ {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"预算执行","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"专项资金","sys_code":"ZXZJ"},
+ {"city_code":"3206","city":"南通市","county":"海门市","county_code":"320684","sys_name":"总预算","sys_code":"ZYS"},
+ {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"财政专户核算","sys_code":"ZHHS"},
+ {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"非税收入系统","sys_code":"FSSR"},
+ {"city_code":"3207","city":"连云港市","county":"市本级","county_code":"320700","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3207","city":"连云港市","county":"连云区","county_code":"320703","sys_name":"财政专户账务系统","sys_code":"ZHHS"},
+ {"city_code":"3207","city":"连云港市","county":"连云区","county_code":"320703","sys_name":"富深财政一体化管理系统","sys_code":"YTH"},
+ {"city_code":"3207","city":"连云港市","county":"海州区","county_code":"320706","sys_name":"富深财政一体化业务管理系统","sys_code":""},
+ {"city_code":"3207","city":"连云港市","county":"海州区","county_code":"320706","sys_name":"新中大公共财政管理系统","sys_code":""},
+ {"city_code":"3207","city":"连云港市","county":"赣榆区","county_code":"320721","sys_name":"财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3207","city":"连云港市","county":"赣榆区","county_code":"320721","sys_name":"国有资产系统","sys_code":"CZGL"},
+ {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"国库专项资金管理系统","sys_code":"ZXZJ"},
+ {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"国有资产管理系统","sys_code":"ZCGL"},
+ {"city_code":"3207","city":"连云港市","county":"东海县","county_code":"320722","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3207","city":"连云港市","county":"灌云县","county_code":"320723","sys_name":"财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3207","city":"连云港市","county":"灌南县","county_code":"320724","sys_name":"非税系统","sys_code":"FSSR"},
+ {"city_code":"3207","city":"连云港市","county":"灌南县","county_code":"320724","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3208","city":"淮安市","county":"市本级","county_code":"320800","sys_name":"非税收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3208","city":"淮安市","county":"市本级","county_code":"320800","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(新农保)","sys_code":"ZHNB"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(城市居民医疗统筹)","sys_code":"ZHYB"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(集中支付中心)","sys_code":"GKZF"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(解困金)","sys_code":"ZHJK"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(旧城改造)","sys_code":"ZHCG"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(社保资金账户)","sys_code":"ZHSB"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(土地出让专帐)","sys_code":"ZHTD"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(预拨及非集中支付中心)","sys_code":"ZHYB"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"财政管理系统(预算外资金)","sys_code":"YSW"},
+ {"city_code":"3208","city":"淮安市","county":"清河区","county_code":"320802","sys_name":"总预算会计","sys_code":"KJHS"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"财务核算系统","sys_code":"KJHS"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"工资统发系统","sys_code":"GZTF"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"用友政务","sys_code":"YYZW"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算编审系统","sys_code":"BMYS"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算管理系统","sys_code":"YSGL"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算外资金(从联网审计中取数)","sys_code":"YSW"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算编审系统","sys_code":"YSBS"},
+ {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"G6-E财务管理系统","sys_code":"CWGL"},
+ {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"江苏省财政预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"新中大公共财政管理软件","sys_code":"CZGL"},
+ {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"用友GRP/R9财政管理软件","sys_code":"CZGL"},
+ {"city_code":"3208","city":"淮安市","county":"淮阴区","county_code":"320804","sys_name":"用友GRP-U8R10","sys_code":"CWGL"},
+ {"city_code":"3208","city":"淮安市","county":"淮安区","county_code":"320803","sys_name":"预算编审系统","sys_code":"YSBS"},
+ {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(基建户)","sys_code":"ZHJJ"},
+ {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(集中支付中心)","sys_code":"GKZF"},
+ {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(农业综合开发)","sys_code":"ZHNF"},
+ {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(预算外资金)","sys_code":"YSW"},
+ {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(支农专户)","sys_code":"ZHZN"},
+ {"city_code":"3208","city":"淮安市","county":"清浦区","county_code":"320811","sys_name":"财政一体化管理系统(总预算)","sys_code":"KJHS"},
+ {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"非税征缴系统","sys_code":"FSSR"},
+ {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"国资管理系统","sys_code":"ZCGL"},
+ {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"乡财县管系统","sys_code":"XCXG"},
+ {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"乡财县管系统","sys_code":"XCXG"},
+ {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"预算编制管理系统","sys_code":"YSBS"},
+ {"city_code":"3208","city":"淮安市","county":"涟水县","county_code":"320826","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3208","city":"淮安市","county":"洪泽县","county_code":"320829","sys_name":"非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3208","city":"淮安市","county":"洪泽县","county_code":"320829","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3208","city":"淮安市","county":"盱眙县","county_code":"320830","sys_name":"财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3208","city":"淮安市","county":"金湖县","county_code":"320831","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3209","city":"盐城市","county":"市本级","county_code":"320900","sys_name":"盐城市_市本级_部门预算","sys_code":"BMYS"},
+ {"city_code":"3209","city":"盐城市","county":"市本级","county_code":"320900","sys_name":"盐城市_市本级_非税收管理系统","sys_code":"FSSR"},
+ {"city_code":"3209","city":"盐城市","county":"市本级","county_code":"320900","sys_name":"盐城市_市本级_预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_财政专户","sys_code":"ZHHS"},
+ {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_非税收入管理","sys_code":"FSSR"},
+ {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_国库集中支付管理","sys_code":"GKZF"},
+ {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_预算指标管理","sys_code":"ZBGL"},
+ {"city_code":"3209","city":"盐城市","county":"亭湖区","county_code":"320902","sys_name":"盐城市_亭湖区_总预算会计核算","sys_code":"KJHS"},
+ {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_财政专户核算系统","sys_code":"ZHHS"},
+ {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3209","city":"盐城市","county":"盐都区","county_code":"320903","sys_name":"盐城市_盐都区_总预算会计核算系统","sys_code":"KJHS"},
+ {"city_code":"3209","city":"盐城市","county":"响水县","county_code":"320921","sys_name":"盐城市_响水县_部门预算管理系统","sys_code":"BMYS"},
+ {"city_code":"3209","city":"盐城市","county":"响水县","county_code":"320921","sys_name":"盐城市_响水县_财政一体化信息系统","sys_code":"YTH"},
+ {"city_code":"3209","city":"盐城市","county":"响水县","county_code":"320921","sys_name":"盐城市_响水县_非税收入收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3209","city":"盐城市","county":"滨海县","county_code":"320922","sys_name":"盐城市_滨海县财政一体化","sys_code":"YTH"},
+ {"city_code":"3209","city":"盐城市","county":"阜宁县","county_code":"320923","sys_name":"盐城市_阜宁县_财政管理软件","sys_code":"CZGL"},
+ {"city_code":"3209","city":"盐城市","county":"阜宁县","county_code":"320923","sys_name":"盐城市_阜宁县_财政管理软件用友U8","sys_code":"YYZW"},
+ {"city_code":"3209","city":"盐城市","county":"射阳县","county_code":"320924","sys_name":"盐城市_射阳县_财政预算执行一体化系统","sys_code":"YTH"},
+ {"city_code":"3209","city":"盐城市","county":"建湖县","county_code":"320925","sys_name":"盐城市_建湖县_非税收缴","sys_code":"FSSR"},
+ {"city_code":"3209","city":"盐城市","county":"建湖县","county_code":"320925","sys_name":"盐城市_建湖县_财政一体化","sys_code":"YTH"},
+ {"city_code":"3209","city":"盐城市","county":"建湖县","county_code":"320925","sys_name":"盐城市_建湖县_国库集中支付","sys_code":"GKZF"},
+ {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_部门预算编审系统","sys_code":"BMYS"},
+ {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_财政一体化信息系统","sys_code":"YTH"},
+ {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_财政专户核算系统","sys_code":"ZHHS"},
+ {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_非税收入收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3209","city":"盐城市","county":"东台市","county_code":"320981","sys_name":"盐城市_东台市_总预算会计核算系统","sys_code":"KJHS"},
+ {"city_code":"3209","city":"盐城市","county":"大丰区","county_code":"320982","sys_name":"盐城市_大丰区_部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3209","city":"盐城市","county":"大丰区","county_code":"320982","sys_name":"盐城市_大丰区_财政一体化","sys_code":"YTH"},
+ {"city_code":"3209","city":"盐城市","county":"大丰区","county_code":"320982","sys_name":"盐城市_大丰区_总预算会计核算财务软件","sys_code":"KJHS"},
+ {"city_code":"3209","city":"盐城市","county":"经济技术开发区","county_code":"320991","sys_name":"盐城市_经济技术开发区_部门预算软件","sys_code":"BMYS"},
+ {"city_code":"3209","city":"盐城市","county":"经济技术开发区","county_code":"320991","sys_name":"盐城市_经济技术开发区_国库集中支付","sys_code":"GKZF"},
+ {"city_code":"3210","city":"扬州市","county":"市本级","county_code":"321000","sys_name":"财政专户核算","sys_code":"ZHHS"},
+ {"city_code":"3210","city":"扬州市","county":"市本级","county_code":"321000","sys_name":"老非税收入征缴系统","sys_code":"FSSR"},
+ {"city_code":"3210","city":"扬州市","county":"市本级","county_code":"321000","sys_name":"扬州财政一体化信息管理系统","sys_code":"YTH"},
+ {"city_code":"3210","city":"扬州市","county":"广陵区","county_code":"321002","sys_name":"财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3210","city":"扬州市","county":"广陵区","county_code":"321002","sys_name":"非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3210","city":"扬州市","county":"邗江区","county_code":"321003","sys_name":"财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3210","city":"扬州市","county":"邗江区","county_code":"321003","sys_name":"非税系统","sys_code":"FSSR"},
+ {"city_code":"3210","city":"扬州市","county":"邗江区","county_code":"321003","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3210","city":"扬州市","county":"宝应县","county_code":"321023","sys_name":"非税收入征收","sys_code":"FSSR"},
+ {"city_code":"3210","city":"扬州市","county":"宝应县","county_code":"321023","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"部门预算编制","sys_code":"BMYS"},
+ {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"非税收入收缴","sys_code":"FSSR"},
+ {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"行政事业性单位国有资产管理","sys_code":"ZCGL"},
+ {"city_code":"3210","city":"扬州市","county":"仪征市","county_code":"321081","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3210","city":"扬州市","county":"高邮市","county_code":"321084","sys_name":"财政业务系统","sys_code":"YTH"},
+ {"city_code":"3210","city":"扬州市","county":"江都区","county_code":"321088","sys_name":"财政业务综合系统","sys_code":"ZHYW"},
+ {"city_code":"3210","city":"扬州市","county":"江都区","county_code":"321088","sys_name":"江都开发区预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3211","city":"镇江市","county":"市本级","county_code":"321100","sys_name":"财政一体化","sys_code":"YTH"},
+ {"city_code":"3211","city":"镇江市","county":"京口区","county_code":"321102","sys_name":"富深协通财政一体化业务管理系统","sys_code":"YTH"},
+ {"city_code":"3211","city":"镇江市","county":"京口区","county_code":"321102","sys_name":"富深协通非税收缴系统","sys_code":"FSSR"},
+ {"city_code":"3211","city":"镇江市","county":"京口区","county_code":"321102","sys_name":"富深协通工资统发系统","sys_code":"GZTF"},
+ {"city_code":"3211","city":"镇江市","county":"润州区","county_code":"321111","sys_name":"部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3211","city":"镇江市","county":"润州区","county_code":"321111","sys_name":"财政一体化","sys_code":"YTH"},
+ {"city_code":"3211","city":"镇江市","county":"润州区","county_code":"321111","sys_name":"非税收入","sys_code":"FSSR"},
+ {"city_code":"3211","city":"镇江市","county":"丹徒区","county_code":"321112","sys_name":"财政综合业务系统","sys_code":"YTH"},
+ {"city_code":"3211","city":"镇江市","county":"丹阳市","county_code":"321181","sys_name":"部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3211","city":"镇江市","county":"丹阳市","county_code":"321181","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3211","city":"镇江市","county":"扬中市","county_code":"321182","sys_name":"部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3211","city":"镇江市","county":"扬中市","county_code":"321182","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3211","city":"镇江市","county":"句容市","county_code":"321183","sys_name":"非税收入","sys_code":"FSSR"},
+ {"city_code":"3211","city":"镇江市","county":"句容市","county_code":"321183","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_非税收入系统","sys_code":"FSSR"},
+ {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_绩效管理系统","sys_code":"JXGL"},
+ {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_综合治税系统","sys_code":"ZHZS"},
+ {"city_code":"3212","city":"泰州市","county":"海陵区","county_code":"321202","sys_name":"泰州市_海陵区_部门预算编制系统","sys_code":"BMYS"},
+ {"city_code":"3212","city":"泰州市","county":"海陵区","county_code":"321202","sys_name":"泰州市_海陵区_县区财政一体化","sys_code":"YTH"},
+ {"city_code":"3212","city":"泰州市","county":"高港区","county_code":"321203","sys_name":"泰州市_高港区_预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_非税收缴系统","sys_code":"FSSR"},
+ {"city_code":"3212","city":"泰州市","county":"姜堰区","county_code":"321204","sys_name":"泰州市_姜堰区_预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3212","city":"泰州市","county":"医药高新区","county_code":"321205","sys_name":"泰州市_医药高新区_财政一体化系统","sys_code":"YTH"},
+ {"city_code":"3212","city":"泰州市","county":"兴化市","county_code":"321281","sys_name":"泰州市_兴化市_部门预算","sys_code":"BMYS"},
+ {"city_code":"3212","city":"泰州市","county":"兴化市","county_code":"321281","sys_name":"泰州市_兴化市_非税收缴","sys_code":"FSSR"},
+ {"city_code":"3212","city":"泰州市","county":"兴化市","county_code":"321281","sys_name":"泰州市_兴化市_国库集中支付","sys_code":"GKZF"},
+ {"city_code":"3212","city":"泰州市","county":"靖江市","county_code":"321282","sys_name":"泰州市_靖江市_预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3212","city":"泰州市","county":"靖江市","county_code":"321282","sys_name":"泰州市_靖江市_非税收入收缴","sys_code":"FSSR"},
+ {"city_code":"3212","city":"泰州市","county":"靖江市","county_code":"321282","sys_name":"泰州市_靖江市_部门预算编审系统","sys_code":"BMYS"},
+ {"city_code":"3212","city":"泰州市","county":"泰兴市","county_code":"321283","sys_name":"泰州市_泰兴市_部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3212","city":"泰州市","county":"泰兴市","county_code":"321283","sys_name":"泰州市_泰兴市_非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3212","city":"泰州市","county":"泰兴市","county_code":"321283","sys_name":"泰州市_泰兴市_预算执行系统","sys_code":"BMYS"},
+ {"city_code":"3213","city":"宿迁市","county":"市本级","county_code":"321300","sys_name":"部门预算管理系统","sys_code":"BMYS"},
+ {"city_code":"3213","city":"宿迁市","county":"市本级","county_code":"321300","sys_name":"非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3213","city":"宿迁市","county":"市本级","county_code":"321300","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3213","city":"宿迁市","county":"宿城区","county_code":"321302","sys_name":"财政一体化平台及国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3213","city":"宿迁市","county":"宿城区","county_code":"321302","sys_name":"新中大非税收入管理","sys_code":"FSSR"},
+ {"city_code":"3213","city":"宿迁市","county":"宿城区","county_code":"321302","sys_name":"总预算会计核算系统","sys_code":"KJHS"},
+ {"city_code":"3213","city":"宿迁市","county":"宿豫区","county_code":"321311","sys_name":"非税收缴管理系统","sys_code":"FSSR"},
+ {"city_code":"3213","city":"宿迁市","county":"宿豫区","county_code":"321311","sys_name":"联友财务管理系统","sys_code":"CWGL"},
+ {"city_code":"3213","city":"宿迁市","county":"宿豫区","county_code":"321311","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"国库集中支付、指标管理系统","sys_code":"YSZX"},
+ {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"开发区总预算系统","sys_code":"BMYS"},
+ {"city_code":"3213","city":"宿迁市","county":"沭阳县","county_code":"321322","sys_name":"总预算会计核算","sys_code":"KJHS"},
+ {"city_code":"3213","city":"宿迁市","county":"泗阳县","county_code":"321323","sys_name":"预算执行","sys_code":"YSZX"},
+ {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"部门预算系统","sys_code":"BMYS"},
+ {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3213","city":"宿迁市","county":"泗洪县","county_code":"321324","sys_name":"国库账务系统","sys_code":"KJHS"},
+ {"city_code":"3201","city":"南京市","county":"高新区","county_code":"320100GXQ","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3201","city":"南京市","county":"化工园区","county_code":"320100HGY","sys_name":"化学工业园区非税收入管理系统","sys_code":"FSSR"},
+ {"city_code":"3201","city":"南京市","county":"经济技术开发区","county_code":"320100JKQ","sys_name":"非税收入账套","sys_code":"FSZT"},
+ {"city_code":"3201","city":"南京市","county":"化工园区","county_code":"320101HGY","sys_name":"化学工业园区预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3201","city":"南京市","county":"经济技术开发区","county_code":"320101JKQ","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3201","city":"南京市","county":"化工园区","county_code":"320102HGY","sys_name":"会计核算","sys_code":"KYHS"},
+ {"city_code":"3201","city":"南京市","county":"经济技术开发区","county_code":"320102JKQ","sys_name":"总预算会计账","sys_code":"KJHS"},
+ {"city_code":"3202","city":"无锡市","county":"锡山开发区","county_code":"320205KFQ","sys_name":"预算内外收支核算系统","sys_code":"KJHS"},
+ {"city_code":"3202","city":"无锡市","county":"滨湖区马山开发区","county_code":"320211KFQ","sys_name":"账户核算系统","sys_code":"ZHHS"},
+ {"city_code":"3202","city":"无锡市","county":"江阴开发区","county_code":"320281kfq","sys_name":"财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3202","city":"无锡市","county":"江阴开发区","county_code":"320281kfq","sys_name":"账户核算系统","sys_code":"ZHHS"},
+ {"city_code":"3202","city":"无锡市","county":"宜兴环科园","county_code":"320282KFQ","sys_name":"财务核算系统","sys_code":"ZHHS"},
+ {"city_code":"3202","city":"无锡市","county":"宜兴开发区","county_code":"320282KFQ","sys_name":"总预算核算系统","sys_code":"ZHHS"},
+ {"city_code":"3203","city":"徐州市","county":"经济技术开发区","county_code":"320300JKQ","sys_name":"富深协通财政一体化业务管理系统软件","sys_code":"YTH"},
+ {"city_code":"3203","city":"徐州市","county":"经济技术开发区","county_code":"320300JKQ","sys_name":"账务处理系统(收支分类改革升级版)","sys_code":"KJHS"},
+ {"city_code":"3204","city":"常州市","county":"天宁经开区","county_code":"320402JKQ","sys_name":"账务处理系统","sys_code":"KJHS"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320404KFQ","sys_name":"国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320405KFQ","sys_name":"用款计划系统","sys_code":"JHGL"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320406KFQ","sys_name":"指标管理系统","sys_code":"ZBGL"},
+ {"city_code":"3204","city":"常州市","county":"钟楼区开发区","county_code":"320407KFQ","sys_name":"总预算系统","sys_code":"ZYS"},
+ {"city_code":"3204","city":"常州市","county":"经开区","county_code":"320412JKQ","sys_name":"财政预算外业务","sys_code":"YSW"},
+ {"city_code":"3204","city":"常州市","county":"经开区","county_code":"320412JKQ","sys_name":"非税收缴系统","sys_code":"FSSR"},
+ {"city_code":"3204","city":"常州市","county":"经开区","county_code":"320412JKQ","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3204","city":"常州市","county":"武进高新区","county_code":"320413GXQ","sys_name":"财政一体化管理信息系统","sys_code":"YTH"},
+ {"city_code":"3204","city":"常州市","county":"溧阳中关村","county_code":"320481ZGC","sys_name":"用友U8R10财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3204","city":"常州市","county":"溧阳中关村开发区","county_code":"320481ZGCKF","sys_name":"用友U8R10财政一体化平台","sys_code":"YTH"},
+ {"city_code":"3205","city":"苏州市","county":"相城区开发区","county_code":"320507KFQ","sys_name":"开发区财政系统","sys_code":"YTH"},
+ {"city_code":"3205","city":"苏州市","county":"常熟市高新区","county_code":"320581GXQ","sys_name":"高新区总预算系统","sys_code":"ZYS"},
+ {"city_code":"3205","city":"苏州市","county":"昆山市开发区","county_code":"320583KFQ","sys_name":"开发区公共财政服务平台","sys_code":"YTH"},
+ {"city_code":"3205","city":"苏州市","county":"太仓市新区","county_code":"320585XQ","sys_name":"非税收入系统","sys_code":"FSSR"},
+ {"city_code":"3205","city":"苏州市","county":"太仓市新区","county_code":"320586XQ","sys_name":"会计核算系统","sys_code":"KJHS"},
+ {"city_code":"3205","city":"苏州市","county":"太仓市新区","county_code":"320587XQ","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"开发区","county_code":"320600KFQ","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"苏通园区","county_code":"320600STY","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3206","city":"南通市","county":"通州湾示范区","county_code":"320600TZW","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3207","city":"连云港市","county":"开发区","county_code":"320701KFQ","sys_name":"非税收入","sys_code":"FSSR"},
+ {"city_code":"3208","city":"淮安市","county":"开发区","county_code":"320800KFQ","sys_name":"用友GRP-U8管理软件","sys_code":"YTH"},
+ {"city_code":"3209","city":"盐城市","county":"城南新区","county_code":"320900CZXQ","sys_name":"盐城市_城南新区_国库集中支付系统","sys_code":"GKZF"},
+ {"city_code":"3209","city":"盐城市","county":"城南新区","county_code":"320901CZXQ","sys_name":"盐城市_城南新区_总预算账务处理系统","sys_code":"KJHS"},
+ {"city_code":"3210","city":"扬州市","county":"化工园区","county_code":"321000HGY","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3210","city":"扬州市","county":"开发区","county_code":"321000KFQ","sys_name":"非税收入收缴","sys_code":"FSSR"},
+ {"city_code":"3210","city":"扬州市","county":"科技新城","county_code":"321000KJC","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3210","city":"扬州市","county":"蜀冈-瘦西湖风景名胜区","county_code":"321000SXH","sys_name":"财政预算指标管理","sys_code":"ZBGL"},
+ {"city_code":"3210","city":"扬州市","county":"蜀冈-瘦西湖风景名胜区","county_code":"321000SXH","sys_name":"总预算会计核算","sys_code":"KJHS"},
+ {"city_code":"3210","city":"扬州市","county":"开发区","county_code":"321001KFQ","sys_name":"一体化系统","sys_code":"YTH"},
+ {"city_code":"3210","city":"扬州市","county":"开发区","county_code":"321002KFQ","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3210","city":"扬州市","county":"高邮开发区","county_code":"321084KFQ","sys_name":"财政业务系统","sys_code":"YTH"},
+ {"city_code":"3211","city":"镇江市","county":"新区","county_code":"321100XQ","sys_name":"财政一体化","sys_code":"YTH"},
+ {"city_code":"3212","city":"泰州市","county":"市本级","county_code":"321200","sys_name":"泰州市_市本级_行政管理系统","sys_code":"XZGL"},
+ {"city_code":"3213","city":"宿迁市","county":"湖滨新城","county_code":"321300HBXC","sys_name":"新中大财务软件","sys_code":"KJHS"},
+ {"city_code":"3213","city":"宿迁市","county":"经开区","county_code":"321300JKQ","sys_name":"新中大公共财政管理软件","sys_code":"YTH"},
+ {"city_code":"3213","city":"宿迁市","county":"洋河新区","county_code":"321300YHXQ","sys_name":"预算执行系统","sys_code":"YSZX"},
+ {"city_code":"3213","city":"宿迁市","county":"宿豫区开发区","county_code":"321311KFQ","sys_name":"开发区新中大财务核算系统","sys_code":"KJHS"},
+ {"city_code":"3213","city":"宿迁市","county":"泗洪县开发区","county_code":"321324KFQ","sys_name":"开发区账务系统","sys_code":"KJHS"}];
+
+
+
+
+ export function getCountyByCode(code){
+ //var jsobj = JSON.parse(origin_place_arr);
+ var jsobj = origin_place_arr;
+
+ var jsonlength = jsobj.length;
+ for (var i = 0; i < jsonlength; i++) {
+ if(jsobj[i].county_code == code){
+ return jsobj[i].city+jsobj[i].county;
+ }
+ }
+ return code;
+ }
+
+ export function getCodeByCounty(place){
+ place = place.replace(/\s*\t*/gim,"");
+ //var jsobj = JSON.parse(origin_place_arr);
+ var jsobj = origin_place_arr;
+
+ var jsonlength = jsobj.length;
+ for (var i = 0; i < jsonlength; i++) {
+ if(jsobj[i].city === "" || jsobj[i].city == undefined)
+ continue;
+ if(jsobj[i].county === "" || jsobj[i].county == undefined)
+ continue;
+ if((place.indexOf(jsobj[i].city) != -1) && (place.indexOf(jsobj[i].county) != -1)){
+ return jsobj[i].county_code;
+ }
+ }
+ return place;
+ }
+
+ export function getSystemNameById(id){
+ var temJson = system_arr;
+ var sys_size = temJson.length;
+ for (var i = 0; i < sys_size; i++) {
+ if(temJson[i].sys_id == id){
+ return temJson[i].sys_name;
+ }
+ }
+ return id;
+ }
+
+
+
+ export function getIdBySystemName(name){
+ var temJson = system_arr;
+ var sys_size = temJson.length;
+ for (var i = 0; i < sys_size; i++) {
+ if(temJson[i].sys_name == name){
+ return temJson[i].sys_id;
+ }
+ }
+ return name;
+ }
+
+ export function getCodeBySystemName(name){
+ var jsobj = origin_place_arr;
+
+ var jsonlength = jsobj.length;
+ for (var i = 0; i < jsonlength; i++) {
+ if(jsobj[i].sys_name == name){
+ return jsobj[i].sys_code;
+ }
+ }
+ return name;
+ }
+}
+
+
diff --git a/plugins/kubernetes/ts/replicationController.ts b/plugins/kubernetes/ts/replicationController.ts
index c799b33..bd3f4d9 100644
--- a/plugins/kubernetes/ts/replicationController.ts
+++ b/plugins/kubernetes/ts/replicationController.ts
@@ -1,57 +1,57 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var ReplicationControllerController = controller("ReplicationControllerController",
- ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.rawModel = null
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.itemConfig = {
- properties: {
- '^\\/labels$': {
- template: $templateCache.get('labelTemplate.html')
- }
- }
- };
-
- $scope.$on('kubernetesModelUpdated', () => {
- updateData();
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- $scope.$watch('model.pods', (newValue, oldValue) => {
- updateData();
- }, true);
-
- $scope.flipRaw = () => {
- $scope.rawMode = !$scope.rawMode;
- Core.$apply($scope);
- };
-
- updateData();
-
- function updateData() {
- if ($scope.dirty) {
- return;
- }
- $scope.id = $routeParams["id"];
- $scope.item = $scope.model.getReplicationController(KubernetesState.selectedNamespace, $scope.id);
- if ($scope.item) {
- $scope.rawModel = toRawYaml($scope.item);
- }
- Core.$apply($scope);
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var ReplicationControllerController = controller("ReplicationControllerController",
+ ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.rawModel = null
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.itemConfig = {
+ properties: {
+ '^\\/labels$': {
+ template: $templateCache.get('labelTemplate.html')
+ }
+ }
+ };
+
+ $scope.$on('kubernetesModelUpdated', () => {
+ updateData();
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ $scope.$watch('model.pods', (newValue, oldValue) => {
+ updateData();
+ }, true);
+
+ $scope.flipRaw = () => {
+ $scope.rawMode = !$scope.rawMode;
+ Core.$apply($scope);
+ };
+
+ updateData();
+
+ function updateData() {
+ if ($scope.dirty) {
+ return;
+ }
+ $scope.id = $routeParams["id"];
+ $scope.item = $scope.model.getReplicationController(KubernetesState.selectedNamespace, $scope.id);
+ if ($scope.item) {
+ $scope.rawModel = toRawYaml($scope.item);
+ }
+ Core.$apply($scope);
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/replicationControllerEdit.ts b/plugins/kubernetes/ts/replicationControllerEdit.ts
index 048c349..1d2335b 100644
--- a/plugins/kubernetes/ts/replicationControllerEdit.ts
+++ b/plugins/kubernetes/ts/replicationControllerEdit.ts
@@ -1,38 +1,38 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var ReplicationControllerEditController = controller("ReplicationControllerEditController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, schemas:HawtioForms.SchemaRegistry) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
- $scope.schema = KubernetesSchema;
- log.debug("Schema: ", $scope.schema);
- $scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.ReplicationController");
- //$$scope.config = KubernetesSchema.definitions.kubernetes_v1beta3_ReplicationController;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- updateData();
-
- function updateData() {
- if ($scope.id) {
- $scope.entity = $scope.model.getReplicationController(KubernetesState.selectedNamespace, $scope.id);
- Core.$apply($scope);
- $scope.fetched = true;
- } else {
- $scope.fetched = true;
- }
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var ReplicationControllerEditController = controller("ReplicationControllerEditController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, schemas:HawtioForms.SchemaRegistry) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+ log.debug("Schema: ", $scope.schema);
+ $scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.ReplicationController");
+ //$$scope.config = KubernetesSchema.definitions.kubernetes_v1beta3_ReplicationController;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ updateData();
+
+ function updateData() {
+ if ($scope.id) {
+ $scope.entity = $scope.model.getReplicationController(KubernetesState.selectedNamespace, $scope.id);
+ Core.$apply($scope);
+ $scope.fetched = true;
+ } else {
+ $scope.fetched = true;
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/replicationControllers.ts b/plugins/kubernetes/ts/replicationControllers.ts
index 2ce9abe..757e494 100644
--- a/plugins/kubernetes/ts/replicationControllers.ts
+++ b/plugins/kubernetes/ts/replicationControllers.ts
@@ -1,203 +1,203 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var ReplicationControllers = controller("ReplicationControllers",
- ["$scope", "KubernetesModel", "DataInfoModel", "KubernetesReplicationControllers", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataInfoModel, KubernetesReplicationControllers:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState,
- $templateCache, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.filterReplicationControllers = $scope.model.filterReplicationcontrollers;
-
- $scope.tableConfig = {
- data: 'model.replicationControllers',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- { field: '$oracleName',
- displayName: '服务名称',
- cellTemplate: $templateCache.get("idTemplate.html")
- },
- //{ field: '$replicas',
- // displayName: 'Scale',
- // cellTemplate:$templateCache.get("desiredReplicas.html")
- //},
- { field: '$pods.age',
- displayName: '启动时间',
- cellTemplate:$templateCache.get("ageTemplate.html")
- },
- { field: '$labelsText',
- displayName: '数据标签',
- cellTemplate: $templateCache.get("labelTemplate.html")
- },
- { field: '$pods',
- displayName: '连接参数',
- cellTemplate: $templateCache.get("connectParamTemplate.html")
- },
- { field: '$pods[0].$eventCount',
- displayName: '服务启动日志',
- cellTemplate: $templateCache.get("eventSummaryTemplate.html")
- },
- { field: '$podCounters',
- displayName: '服务状态',
- cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
- customSortField: (field) => {
- if(field.$podCounters.ready ){
- return 3;
- }else if(field.$podCounters.valid || field.$podCounters.waiting){
- return 2;
- }else if(field.$podCounters.error){
- return 0;
- }else{
- return 1;
- }
- }
- },
- { field: '$extractStatus',
- displayName: '数据汇总状态',
- cellTemplate: $templateCache.get("dataSummaryTemplate.html")
- }
- ]
- }
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.deletePrompt = (selected) => {
- if (angular.isString(selected)) {
- selected = [{
- id: selected
- }];
- }
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: 'metadata.name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected:Array, next:KubePod) {
- if (next) {
- Kubernetes.resizeController($http, KubernetesApiURL, next, 0, () => {
- KubernetesReplicationControllers.delete({
- id: getName(next)
- }, undefined, () => {
- if(next.metadata.labels.style === "oracle"){
- Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "delete", getName(next), 0);
- }
- deleteSelected(selected, selected.shift());
- }, (error) => {
- log.debug("Error deleting: ", error);
- deleteSelected(selected, selected.shift());
- });
- });
- }
- }
- deleteSelected(selected, selected.shift());
- }
- },
- title: '是否需要删除oracle服务?',
- action: '以下的oracle服务将会被删除:',
- okText: '删除',
- okClass: 'btn-danger',
- custom: "该服务删除后将会清除oracle对应服务的端口等资源占用,但不删除数据文件,是否删除,请确认!",
- customClass: "alert alert-warning",
- cancelText: "取消"
- }).open();
- }
-
- $scope.createRCs= () => {
- $http({
- url: '/java/console/api/cancelOracleConection',
- dataType: 'json',
- method:'POST',
- params:{param: "data"}
- }).success(function(data,header,config,status){
- console.log("success");
- }).error(function(data,header,config,status){
- //log.warn("Failed to connect " + connectParam + " " + data + " " + status);
- });
- }
-
- $scope.stopPrompt = (selected) =>{
- if (angular.isString(selected)) {
- selected = [{
- id: selected
- }];
- }
-
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: 'metadata.name',
- onClose: (result:boolean) => {
- if (result) {
- function stopSelected(selected:Array, next:KubePod) {
- if (next) {
- Kubernetes.resizeController($http, KubernetesApiURL, next, 0, () => {
- if(next.metadata.labels.style === "oracle"){
- Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "stop", getName(next), 0);
- }
- stopSelected(selected, selected.shift());
- });
- }
- }
- stopSelected(selected, selected.shift());
- }
- },
- title: '是否需要停止oracle服务?',
- action: '以下的oracle服务将会被停止:',
- okText: '停止',
- okClass: 'btn-danger',
- custom: "该服务停止后将无法继续提供连接访问服务,但可通过启动按钮重新启动该服务以进行访问。是否停止,请确认",
- customClass: "alert alert-warning",
- cancelText: "取消"
- }).open();
- };
-
- $scope.reStartPrompt = (selected) => {
- function startSelected(selected:Array, next:KubePod){
- if(next){
- if(next.$replicas === 0)
- Kubernetes.resizeController($http, KubernetesApiURL, next, 1, () => {
- console.log("restart " + next.metadata.name);
- Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "reStart", getName(next), 0);
- startSelected(selected, selected.shift());
- });
- }
- }
- startSelected(selected, selected.shift());
- };
-
- $scope.extractData = {
- items: null,
- selectedItem: $scope.filterReplicationControllers[0] || "",
- dialog: new UI.Dialog(),
- onOk: () => {
- var extractData = $scope.extractData;
- extractData.dialog.close();
- var filterReplicationController = extractData.selectedItem;
- Kubernetes.extractDataToOracle($http, extractData.items, filterReplicationController);
- extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
- },
- open: (selected) => {
- var extractData = $scope.extractData;
- extractData.dialog.open();
- extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
- extractData.items = selected;
- $timeout(() => {
- $('#newDataName').focus();
- }, 50);
- },
- close: () => {
- $scope.extractData.dialog.close();
- }
- };
-
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var ReplicationControllers = controller("ReplicationControllers",
+ ["$scope", "KubernetesModel", "DataInfoModel", "KubernetesReplicationControllers", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataInfoModel, KubernetesReplicationControllers:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState,
+ $templateCache, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.filterReplicationControllers = $scope.model.filterReplicationcontrollers;
+
+ $scope.tableConfig = {
+ data: 'model.replicationControllers',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ { field: '$oracleName',
+ displayName: '服务名称',
+ cellTemplate: $templateCache.get("idTemplate.html")
+ },
+ //{ field: '$replicas',
+ // displayName: 'Scale',
+ // cellTemplate:$templateCache.get("desiredReplicas.html")
+ //},
+ { field: '$pods.age',
+ displayName: '启动时间',
+ cellTemplate:$templateCache.get("ageTemplate.html")
+ },
+ { field: '$labelsText',
+ displayName: '数据标签',
+ cellTemplate: $templateCache.get("labelTemplate.html")
+ },
+ { field: '$pods',
+ displayName: '连接参数',
+ cellTemplate: $templateCache.get("connectParamTemplate.html")
+ },
+ { field: '$pods[0].$eventCount',
+ displayName: '服务启动日志',
+ cellTemplate: $templateCache.get("eventSummaryTemplate.html")
+ },
+ { field: '$podCounters',
+ displayName: '服务状态',
+ cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
+ customSortField: (field) => {
+ if(field.$podCounters.ready ){
+ return 3;
+ }else if(field.$podCounters.valid || field.$podCounters.waiting){
+ return 2;
+ }else if(field.$podCounters.error){
+ return 0;
+ }else{
+ return 1;
+ }
+ }
+ },
+ { field: '$extractStatus',
+ displayName: '数据汇总状态',
+ cellTemplate: $templateCache.get("dataSummaryTemplate.html")
+ }
+ ]
+ }
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.deletePrompt = (selected) => {
+ if (angular.isString(selected)) {
+ selected = [{
+ id: selected
+ }];
+ }
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: 'metadata.name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected:Array, next:KubePod) {
+ if (next) {
+ Kubernetes.resizeController($http, KubernetesApiURL, next, 0, () => {
+ KubernetesReplicationControllers.delete({
+ id: getName(next)
+ }, undefined, () => {
+ if(next.metadata.labels.style === "oracle"){
+ Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "delete", getName(next), 0);
+ }
+ deleteSelected(selected, selected.shift());
+ }, (error) => {
+ log.debug("Error deleting: ", error);
+ deleteSelected(selected, selected.shift());
+ });
+ });
+ }
+ }
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: '是否需要删除oracle服务?',
+ action: '以下的oracle服务将会被删除:',
+ okText: '删除',
+ okClass: 'btn-danger',
+ custom: "该服务删除后将会清除oracle对应服务的端口等资源占用,但不删除数据文件,是否删除,请确认!",
+ customClass: "alert alert-warning",
+ cancelText: "取消"
+ }).open();
+ }
+
+ $scope.createRCs= () => {
+ $http({
+ url: '/java/console/api/cancelOracleConection',
+ dataType: 'json',
+ method:'POST',
+ params:{param: "data"}
+ }).success(function(data,header,config,status){
+ console.log("success");
+ }).error(function(data,header,config,status){
+ //log.warn("Failed to connect " + connectParam + " " + data + " " + status);
+ });
+ }
+
+ $scope.stopPrompt = (selected) =>{
+ if (angular.isString(selected)) {
+ selected = [{
+ id: selected
+ }];
+ }
+
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: 'metadata.name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function stopSelected(selected:Array, next:KubePod) {
+ if (next) {
+ Kubernetes.resizeController($http, KubernetesApiURL, next, 0, () => {
+ if(next.metadata.labels.style === "oracle"){
+ Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "stop", getName(next), 0);
+ }
+ stopSelected(selected, selected.shift());
+ });
+ }
+ }
+ stopSelected(selected, selected.shift());
+ }
+ },
+ title: '是否需要停止oracle服务?',
+ action: '以下的oracle服务将会被停止:',
+ okText: '停止',
+ okClass: 'btn-danger',
+ custom: "该服务停止后将无法继续提供连接访问服务,但可通过启动按钮重新启动该服务以进行访问。是否停止,请确认",
+ customClass: "alert alert-warning",
+ cancelText: "取消"
+ }).open();
+ };
+
+ $scope.reStartPrompt = (selected) => {
+ function startSelected(selected:Array, next:KubePod){
+ if(next){
+ if(next.$replicas === 0)
+ Kubernetes.resizeController($http, KubernetesApiURL, next, 1, () => {
+ console.log("restart " + next.metadata.name);
+ Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "reStart", getName(next), 0);
+ startSelected(selected, selected.shift());
+ });
+ }
+ }
+ startSelected(selected, selected.shift());
+ };
+
+ $scope.extractData = {
+ items: null,
+ selectedItem: $scope.filterReplicationControllers[0] || "",
+ dialog: new UI.Dialog(),
+ onOk: () => {
+ var extractData = $scope.extractData;
+ extractData.dialog.close();
+ var filterReplicationController = extractData.selectedItem;
+ Kubernetes.extractDataToOracle($http, extractData.items, filterReplicationController);
+ extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
+ },
+ open: (selected) => {
+ var extractData = $scope.extractData;
+ extractData.dialog.open();
+ extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
+ extractData.items = selected;
+ $timeout(() => {
+ $('#newDataName').focus();
+ }, 50);
+ },
+ close: () => {
+ $scope.extractData.dialog.close();
+ }
+ };
+
+ }]);
+}
diff --git a/plugins/kubernetes/ts/schema.ts b/plugins/kubernetes/ts/schema.ts
index 8fecd73..db156a1 100644
--- a/plugins/kubernetes/ts/schema.ts
+++ b/plugins/kubernetes/ts/schema.ts
@@ -1,7020 +1,7020 @@
-///
-
-module Kubernetes {
-
- export var schema =
- {
- "id": "http://fabric8.io/fabric8/v2/Schema#",
- "$schema": "http://json-schema.org/schema#",
- "definitions": {
- "api_RootPaths": {
- "type": "object",
- "description": "",
- "properties": {
- "paths": {
- "type": "array",
- "description": "",
- "items": {
- "type": "string",
- "description": ""
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.RootPaths"
- },
- "kubernetes_AWSElasticBlockStoreVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "fsType": {
- "type": "string",
- "description": "file system type to mount"
- },
- "partition": {
- "type": "integer",
- "description": "partition on the disk to mount (e.g."
- },
- "readOnly": {
- "type": "boolean",
- "description": "read-only if true"
- },
- "volumeID": {
- "type": "string",
- "description": "unique id of the PD resource in AWS; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
- },
- "kubernetes_Capabilities": {
- "type": "object",
- "description": "",
- "properties": {
- "add": {
- "type": "array",
- "description": "added capabilities",
- "items": {
- "type": "string",
- "description": "added capabilities"
- }
- },
- "drop": {
- "type": "array",
- "description": "droped capabilities",
- "items": {
- "type": "string",
- "description": "droped capabilities"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Capabilities"
- },
- "kubernetes_CephFSVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "monitors": {
- "type": "array",
- "description": "a collection of Ceph monitors",
- "items": {
- "type": "string",
- "description": "a collection of Ceph monitors"
- }
- },
- "readOnly": {
- "type": "boolean",
- "description": "Ceph fs to be mounted with read-only permissions"
- },
- "secretFile": {
- "type": "string",
- "description": "path to secret for rados user; default is /etc/ceph/user.secret; optional"
- },
- "secretRef": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- },
- "user": {
- "type": "string",
- "description": "rados user name; default is admin; optional"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
- },
- "kubernetes_Container": {
- "type": "object",
- "description": "",
- "properties": {
- "args": {
- "type": "array",
- "description": "command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved",
- "items": {
- "type": "string",
- "description": "command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved"
- }
- },
- "command": {
- "type": "array",
- "description": "entrypoint array; not executed within a shell; the docker image's entrypoint is used if this is not provided; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved",
- "items": {
- "type": "string",
- "description": "entrypoint array; not executed within a shell; the docker image's entrypoint is used if this is not provided; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved"
- }
- },
- "env": {
- "type": "array",
- "description": "list of environment variables to set in the container; cannot be updated",
- "items": {
- "$ref": "#/definitions/kubernetes_EnvVar",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- }
- },
- "image": {
- "type": "string",
- "description": "Docker image name; see http://releases.k8s.io/HEAD/docs/user-guide/images.md"
- },
- "imagePullPolicy": {
- "type": "string",
- "description": "image pull policy; one of Always"
- },
- "lifecycle": {
- "$ref": "#/definitions/kubernetes_Lifecycle",
- "javaType": "io.fabric8.kubernetes.api.model.Lifecycle"
- },
- "livenessProbe": {
- "$ref": "#/definitions/kubernetes_Probe",
- "javaType": "io.fabric8.kubernetes.api.model.Probe"
- },
- "name": {
- "type": "string",
- "description": "name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated",
- "maxLength": 63,
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
- },
- "ports": {
- "type": "array",
- "description": "list of ports to expose from the container; cannot be updated",
- "items": {
- "$ref": "#/definitions/kubernetes_ContainerPort",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerPort"
- }
- },
- "readinessProbe": {
- "$ref": "#/definitions/kubernetes_Probe",
- "javaType": "io.fabric8.kubernetes.api.model.Probe"
- },
- "resources": {
- "$ref": "#/definitions/kubernetes_ResourceRequirements",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
- },
- "securityContext": {
- "$ref": "#/definitions/kubernetes_SecurityContext",
- "javaType": "io.fabric8.kubernetes.api.model.SecurityContext"
- },
- "stdin": {
- "type": "boolean",
- "description": "Whether this container should allocate a buffer for stdin in the container runtime; default is false"
- },
- "terminationMessagePath": {
- "type": "string",
- "description": "path at which the file to which the container's termination message will be written is mounted into the container's filesystem; message written is intended to be brief final status"
- },
- "tty": {
- "type": "boolean",
- "description": "Whether this container should allocate a TTY for itself"
- },
- "volumeMounts": {
- "type": "array",
- "description": "pod volumes to mount into the container's filesyste; cannot be updated",
- "items": {
- "$ref": "#/definitions/kubernetes_VolumeMount",
- "javaType": "io.fabric8.kubernetes.api.model.VolumeMount"
- }
- },
- "workingDir": {
- "type": "string",
- "description": "container's working directory; defaults to image's default; cannot be updated"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Container"
- },
- "kubernetes_ContainerPort": {
- "type": "object",
- "description": "",
- "properties": {
- "containerPort": {
- "type": "integer",
- "description": "number of port to expose on the pod's IP address"
- },
- "hostIP": {
- "type": "string",
- "description": "host IP to bind the port to"
- },
- "hostPort": {
- "type": "integer",
- "description": "number of port to expose on the host; most containers do not need this"
- },
- "name": {
- "type": "string",
- "description": "name for the port that can be referred to by services; must be an IANA_SVC_NAME and unique within the pod"
- },
- "protocol": {
- "type": "string",
- "description": "protocol for port; must be UDP or TCP; TCP if unspecified"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ContainerPort"
- },
- "kubernetes_ContainerState": {
- "type": "object",
- "description": "",
- "properties": {
- "running": {
- "$ref": "#/definitions/kubernetes_ContainerStateRunning",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStateRunning"
- },
- "terminated": {
- "$ref": "#/definitions/kubernetes_ContainerStateTerminated",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStateTerminated"
- },
- "waiting": {
- "$ref": "#/definitions/kubernetes_ContainerStateWaiting",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStateWaiting"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ContainerState"
- },
- "kubernetes_ContainerStateRunning": {
- "type": "object",
- "description": "",
- "properties": {
- "startedAt": {
- "type": "string",
- "description": "time at which the container was last (re-)started"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStateRunning"
- },
- "kubernetes_ContainerStateTerminated": {
- "type": "object",
- "description": "",
- "properties": {
- "containerID": {
- "type": "string",
- "description": "container's ID in the format 'docker://\u003ccontainer_id\u003e'"
- },
- "exitCode": {
- "type": "integer",
- "description": "exit status from the last termination of the container"
- },
- "finishedAt": {
- "type": "string",
- "description": "time at which the container last terminated"
- },
- "message": {
- "type": "string",
- "description": "message regarding the last termination of the container"
- },
- "reason": {
- "type": "string",
- "description": "(brief) reason from the last termination of the container"
- },
- "signal": {
- "type": "integer",
- "description": "signal from the last termination of the container"
- },
- "startedAt": {
- "type": "string",
- "description": "time at which previous execution of the container started"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStateTerminated"
- },
- "kubernetes_ContainerStateWaiting": {
- "type": "object",
- "description": "",
- "properties": {
- "reason": {
- "type": "string",
- "description": "(brief) reason the container is not yet running"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStateWaiting"
- },
- "kubernetes_ContainerStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "containerID": {
- "type": "string",
- "description": "container's ID in the format 'docker://\u003ccontainer_id\u003e'; see http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information"
- },
- "image": {
- "type": "string",
- "description": "image of the container; see http://releases.k8s.io/HEAD/docs/user-guide/images.md"
- },
- "imageID": {
- "type": "string",
- "description": "ID of the container's image"
- },
- "lastState": {
- "$ref": "#/definitions/kubernetes_ContainerState",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerState"
- },
- "name": {
- "type": "string",
- "description": "name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated",
- "maxLength": 63,
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
- },
- "ready": {
- "type": "boolean",
- "description": "specifies whether the container has passed its readiness probe"
- },
- "restartCount": {
- "type": "integer",
- "description": "the number of times the container has been restarted"
- },
- "state": {
- "$ref": "#/definitions/kubernetes_ContainerState",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerState"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
- },
- "kubernetes_EmptyDirVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "medium": {
- "type": "string",
- "description": "type of storage used to back the volume; must be an empty string (default) or Memory; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
- },
- "kubernetes_EndpointAddress": {
- "type": "object",
- "description": "",
- "properties": {
- "ip": {
- "type": "string",
- "description": "IP address of the endpoint"
- },
- "targetRef": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EndpointAddress"
- },
- "kubernetes_EndpointPort": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "name of this port",
- "maxLength": 63,
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
- },
- "port": {
- "type": "integer",
- "description": "port number of the endpoint"
- },
- "protocol": {
- "type": "string",
- "description": "protocol for this port; must be UDP or TCP; TCP if unspecified"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EndpointPort"
- },
- "kubernetes_EndpointSubset": {
- "type": "object",
- "description": "",
- "properties": {
- "addresses": {
- "type": "array",
- "description": "IP addresses which offer the related ports",
- "items": {
- "$ref": "#/definitions/kubernetes_EndpointAddress",
- "javaType": "io.fabric8.kubernetes.api.model.EndpointAddress"
- }
- },
- "ports": {
- "type": "array",
- "description": "port numbers available on the related IP addresses",
- "items": {
- "$ref": "#/definitions/kubernetes_EndpointPort",
- "javaType": "io.fabric8.kubernetes.api.model.EndpointPort"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EndpointSubset"
- },
- "kubernetes_Endpoints": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Endpoints",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "subsets": {
- "type": "array",
- "description": "sets of addresses and ports that comprise a service",
- "items": {
- "$ref": "#/definitions/kubernetes_EndpointSubset",
- "javaType": "io.fabric8.kubernetes.api.model.EndpointSubset"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Endpoints",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_EndpointsList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of endpoints",
- "items": {
- "$ref": "#/definitions/kubernetes_Endpoints",
- "javaType": "io.fabric8.kubernetes.api.model.Endpoints"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "EndpointsList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EndpointsList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_EnvVar": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "name of the environment variable; must be a C_IDENTIFIER",
- "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
- },
- "value": {
- "type": "string",
- "description": "value of the environment variable; defaults to empty string; variable references $(VAR_NAME) are expanded using the previously defined environment varibles in the container and any service environment variables; if a variable cannot be resolved"
- },
- "valueFrom": {
- "$ref": "#/definitions/kubernetes_EnvVarSource",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVarSource"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- },
- "kubernetes_EnvVarSource": {
- "type": "object",
- "description": "",
- "properties": {
- "fieldRef": {
- "$ref": "#/definitions/kubernetes_ObjectFieldSelector",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EnvVarSource"
- },
- "kubernetes_Event": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "count": {
- "type": "integer",
- "description": "the number of times this event has occurred"
- },
- "firstTimestamp": {
- "type": "string",
- "description": "the time at which the event was first recorded"
- },
- "involvedObject": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Event",
- "required": true
- },
- "lastTimestamp": {
- "type": "string",
- "description": "the time at which the most recent occurrence of this event was recorded"
- },
- "message": {
- "type": "string",
- "description": "human-readable description of the status of this operation"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "reason": {
- "type": "string",
- "description": "short"
- },
- "source": {
- "$ref": "#/definitions/kubernetes_EventSource",
- "javaType": "io.fabric8.kubernetes.api.model.EventSource"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Event",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_EventList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of events",
- "items": {
- "$ref": "#/definitions/kubernetes_Event",
- "javaType": "io.fabric8.kubernetes.api.model.Event"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "EventList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EventList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_EventSource": {
- "type": "object",
- "description": "",
- "properties": {
- "component": {
- "type": "string",
- "description": "component that generated the event"
- },
- "host": {
- "type": "string",
- "description": "name of the host where the event is generated"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.EventSource"
- },
- "kubernetes_ExecAction": {
- "type": "object",
- "description": "",
- "properties": {
- "command": {
- "type": "array",
- "description": "command line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd",
- "items": {
- "type": "string",
- "description": "command line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ExecAction"
- },
- "kubernetes_GCEPersistentDiskVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "fsType": {
- "type": "string",
- "description": "file system type to mount"
- },
- "partition": {
- "type": "integer",
- "description": "partition on the disk to mount (e.g."
- },
- "pdName": {
- "type": "string",
- "description": "unique name of the PD resource in GCE; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk"
- },
- "readOnly": {
- "type": "boolean",
- "description": "read-only if true"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
- },
- "kubernetes_GitRepoVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "repository": {
- "type": "string",
- "description": "repository URL"
- },
- "revision": {
- "type": "string",
- "description": "commit hash for the specified revision"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
- },
- "kubernetes_GlusterfsVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "endpoints": {
- "type": "string",
- "description": "gluster hosts endpoints name; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
- },
- "path": {
- "type": "string",
- "description": "path to gluster volume; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
- },
- "readOnly": {
- "type": "boolean",
- "description": "glusterfs volume to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
- },
- "kubernetes_HTTPGetAction": {
- "type": "object",
- "description": "",
- "properties": {
- "host": {
- "type": "string",
- "description": "hostname to connect to; defaults to pod IP"
- },
- "path": {
- "type": "string",
- "description": "path to access on the HTTP server"
- },
- "port": {
- "$ref": "#/definitions/kubernetes_util_IntOrString",
- "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
- },
- "scheme": {
- "type": "string",
- "description": "scheme to connect with"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
- },
- "kubernetes_Handler": {
- "type": "object",
- "description": "",
- "properties": {
- "exec": {
- "$ref": "#/definitions/kubernetes_ExecAction",
- "javaType": "io.fabric8.kubernetes.api.model.ExecAction"
- },
- "httpGet": {
- "$ref": "#/definitions/kubernetes_HTTPGetAction",
- "javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
- },
- "tcpSocket": {
- "$ref": "#/definitions/kubernetes_TCPSocketAction",
- "javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Handler"
- },
- "kubernetes_HostPathVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "path": {
- "type": "string",
- "description": "path of the directory on the host; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
- },
- "kubernetes_ISCSIVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "fsType": {
- "type": "string",
- "description": "file system type to mount"
- },
- "iqn": {
- "type": "string",
- "description": "iSCSI Qualified Name"
- },
- "lun": {
- "type": "integer",
- "description": "iscsi target lun number"
- },
- "readOnly": {
- "type": "boolean",
- "description": "read-only if true"
- },
- "targetPortal": {
- "type": "string",
- "description": "iSCSI target portal"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
- },
- "kubernetes_Lifecycle": {
- "type": "object",
- "description": "",
- "properties": {
- "postStart": {
- "$ref": "#/definitions/kubernetes_Handler",
- "javaType": "io.fabric8.kubernetes.api.model.Handler"
- },
- "preStop": {
- "$ref": "#/definitions/kubernetes_Handler",
- "javaType": "io.fabric8.kubernetes.api.model.Handler"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Lifecycle"
- },
- "kubernetes_List": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of objects",
- "items": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "List",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.BaseKubernetesList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_ListMeta": {
- "type": "object",
- "description": "",
- "properties": {
- "resourceVersion": {
- "type": "string",
- "description": "string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system"
- },
- "selfLink": {
- "type": "string",
- "description": "URL for the object; populated by the system"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- },
- "kubernetes_LoadBalancerIngress": {
- "type": "object",
- "description": "",
- "properties": {
- "hostname": {
- "type": "string",
- "description": "hostname of ingress point"
- },
- "ip": {
- "type": "string",
- "description": "IP address of ingress point"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerIngress"
- },
- "kubernetes_LoadBalancerStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "ingress": {
- "type": "array",
- "description": "load-balancer ingress points",
- "items": {
- "$ref": "#/definitions/kubernetes_LoadBalancerIngress",
- "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerIngress"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerStatus"
- },
- "kubernetes_LocalObjectReference": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "name of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- },
- "kubernetes_MetadataFile": {
- "type": "object",
- "description": "",
- "properties": {
- "fieldRef": {
- "$ref": "#/definitions/kubernetes_ObjectFieldSelector",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
- },
- "name": {
- "type": "string",
- "description": "the name of the file to be created"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.MetadataFile"
- },
- "kubernetes_MetadataVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "items": {
- "type": "array",
- "description": "list of metadata files",
- "items": {
- "$ref": "#/definitions/kubernetes_MetadataFile",
- "javaType": "io.fabric8.kubernetes.api.model.MetadataFile"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
- },
- "kubernetes_NFSVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "path": {
- "type": "string",
- "description": "the path that is exported by the NFS server; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
- },
- "readOnly": {
- "type": "boolean",
- "description": "forces the NFS export to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
- },
- "server": {
- "type": "string",
- "description": "the hostname or IP address of the NFS server; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
- },
- "kubernetes_Namespace": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Namespace",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_NamespaceSpec",
- "javaType": "io.fabric8.kubernetes.api.model.NamespaceSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_NamespaceStatus",
- "javaType": "io.fabric8.kubernetes.api.model.NamespaceStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Namespace",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_NamespaceList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "items is the list of Namespace objects in the list; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
- "items": {
- "$ref": "#/definitions/kubernetes_Namespace",
- "javaType": "io.fabric8.kubernetes.api.model.Namespace"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "NamespaceList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NamespaceList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_NamespaceSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "finalizers": {
- "type": "array",
- "description": "an opaque list of values that must be empty to permanently remove object from storage; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers",
- "items": {
- "type": "string",
- "description": "an opaque list of values that must be empty to permanently remove object from storage; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NamespaceSpec"
- },
- "kubernetes_NamespaceStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "phase": {
- "type": "string",
- "description": "phase is the current lifecycle phase of the namespace; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NamespaceStatus"
- },
- "kubernetes_Node": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Node",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_NodeSpec",
- "javaType": "io.fabric8.kubernetes.api.model.NodeSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_NodeStatus",
- "javaType": "io.fabric8.kubernetes.api.model.NodeStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Node",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_NodeAddress": {
- "type": "object",
- "description": "",
- "properties": {
- "address": {
- "type": "string",
- "description": "the node address"
- },
- "type": {
- "type": "string",
- "description": "node address type"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NodeAddress"
- },
- "kubernetes_NodeCondition": {
- "type": "object",
- "description": "",
- "properties": {
- "lastHeartbeatTime": {
- "type": "string",
- "description": "last time we got an update on a given condition"
- },
- "lastTransitionTime": {
- "type": "string",
- "description": "last time the condition transit from one status to another"
- },
- "message": {
- "type": "string",
- "description": "human readable message indicating details about last transition"
- },
- "reason": {
- "type": "string",
- "description": "(brief) reason for the condition's last transition"
- },
- "status": {
- "type": "string",
- "description": "status of the condition"
- },
- "type": {
- "type": "string",
- "description": "type of node condition"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NodeCondition"
- },
- "kubernetes_NodeList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of nodes",
- "items": {
- "$ref": "#/definitions/kubernetes_Node",
- "javaType": "io.fabric8.kubernetes.api.model.Node"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "NodeList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NodeList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_NodeSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "externalID": {
- "type": "string",
- "description": "deprecated. External ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty."
- },
- "podCIDR": {
- "type": "string",
- "description": "pod IP range assigned to the node"
- },
- "providerID": {
- "type": "string",
- "description": "ID of the node assigned by the cloud provider in the format: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e"
- },
- "unschedulable": {
- "type": "boolean",
- "description": "disable pod scheduling on the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NodeSpec"
- },
- "kubernetes_NodeStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "addresses": {
- "type": "array",
- "description": "list of addresses reachable to the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses",
- "items": {
- "$ref": "#/definitions/kubernetes_NodeAddress",
- "javaType": "io.fabric8.kubernetes.api.model.NodeAddress"
- }
- },
- "capacity": {
- "type": "object",
- "description": "compute resource capacity of the node; see http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- },
- "conditions": {
- "type": "array",
- "description": "list of node conditions observed; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition",
- "items": {
- "$ref": "#/definitions/kubernetes_NodeCondition",
- "javaType": "io.fabric8.kubernetes.api.model.NodeCondition"
- }
- },
- "nodeInfo": {
- "$ref": "#/definitions/kubernetes_NodeSystemInfo",
- "javaType": "io.fabric8.kubernetes.api.model.NodeSystemInfo"
- },
- "phase": {
- "type": "string",
- "description": "most recently observed lifecycle phase of the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NodeStatus"
- },
- "kubernetes_NodeSystemInfo": {
- "type": "object",
- "description": "",
- "properties": {
- "bootID": {
- "type": "string",
- "description": "boot id is the boot-id reported by the node"
- },
- "containerRuntimeVersion": {
- "type": "string",
- "description": "Container runtime version reported by the node through runtime remote API (e.g. docker://1.5.0)"
- },
- "kernelVersion": {
- "type": "string",
- "description": "Kernel version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64)"
- },
- "kubeProxyVersion": {
- "type": "string",
- "description": "Kube-proxy version reported by the node"
- },
- "kubeletVersion": {
- "type": "string",
- "description": "Kubelet version reported by the node"
- },
- "machineID": {
- "type": "string",
- "description": "machine-id reported by the node"
- },
- "osImage": {
- "type": "string",
- "description": "OS image used reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy))"
- },
- "systemUUID": {
- "type": "string",
- "description": "system-uuid reported by the node"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NodeSystemInfo"
- },
- "kubernetes_ObjectFieldSelector": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "version of the schema that fieldPath is written in terms of; defaults to v1"
- },
- "fieldPath": {
- "type": "string",
- "description": "path of the field to select in the specified API version"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
- },
- "kubernetes_ObjectMeta": {
- "type": "object",
- "description": "",
- "properties": {
- "annotations": {
- "type": "object",
- "description": "map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects; see http://releases.k8s.io/HEAD/docs/user-guide/annotations.md",
- "additionalProperties": {
- "type": "string",
- "description": "map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects; see http://releases.k8s.io/HEAD/docs/user-guide/annotations.md"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "creationTimestamp": {
- "type": "string",
- "description": "RFC 3339 date and time at which the object was created; populated by the system"
- },
- "deletionTimestamp": {
- "type": "string",
- "description": "RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested"
- },
- "generateName": {
- "type": "string",
- "description": "an optional prefix to use to generate a unique name; has the same validation rules as name; optional"
- },
- "generation": {
- "type": "integer",
- "description": "a sequence number representing a specific generation of the desired state; populated by the system; read-only",
- "javaType": "Long"
- },
- "labels": {
- "type": "object",
- "description": "map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md",
- "additionalProperties": {
- "type": "string",
- "description": "map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "name": {
- "type": "string",
- "description": "string that identifies an object. Must be unique within a namespace; cannot be updated; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
- "maxLength": 63,
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
- },
- "namespace": {
- "type": "string",
- "description": "namespace of the object; must be a DNS_LABEL; cannot be updated; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
- "maxLength": 253,
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
- },
- "resourceVersion": {
- "type": "string",
- "description": "string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system"
- },
- "selfLink": {
- "type": "string",
- "description": "URL for the object; populated by the system"
- },
- "uid": {
- "type": "string",
- "description": "unique UUID across space and time; populated by the system; read-only; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "kubernetes_ObjectReference": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "API version of the referent"
- },
- "fieldPath": {
- "type": "string",
- "description": "if referring to a piece of an object instead of an entire object"
- },
- "kind": {
- "type": "string",
- "description": "kind of the referent; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
- },
- "name": {
- "type": "string",
- "description": "name of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
- },
- "namespace": {
- "type": "string",
- "description": "namespace of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md"
- },
- "resourceVersion": {
- "type": "string",
- "description": "specific resourceVersion to which this reference is made"
- },
- "uid": {
- "type": "string",
- "description": "uid of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "kubernetes_PersistentVolume": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PersistentVolume",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeSpec",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeStatus",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolume",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_PersistentVolumeClaim": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PersistentVolumeClaim",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeClaimSpec",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeClaimStatus",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_PersistentVolumeClaimList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "a list of persistent volume claims; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims",
- "items": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeClaim",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PersistentVolumeClaimList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_PersistentVolumeClaimSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "accessModes": {
- "type": "array",
- "description": "the desired access modes the volume should have; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1",
- "items": {
- "type": "string",
- "description": "the desired access modes the volume should have; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1"
- }
- },
- "resources": {
- "$ref": "#/definitions/kubernetes_ResourceRequirements",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
- },
- "volumeName": {
- "type": "string",
- "description": "the binding reference to the persistent volume backing this claim"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec"
- },
- "kubernetes_PersistentVolumeClaimStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "accessModes": {
- "type": "array",
- "description": "the actual access modes the volume has; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1",
- "items": {
- "type": "string",
- "description": "the actual access modes the volume has; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1"
- }
- },
- "capacity": {
- "type": "object",
- "description": "the actual resources the volume has",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- },
- "phase": {
- "type": "string",
- "description": "the current phase of the claim"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus"
- },
- "kubernetes_PersistentVolumeClaimVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "claimName": {
- "type": "string",
- "description": "the name of the claim in the same namespace to be mounted as a volume; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims"
- },
- "readOnly": {
- "type": "boolean",
- "description": "mount volume as read-only when true; default false"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
- },
- "kubernetes_PersistentVolumeList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of persistent volumes; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md",
- "items": {
- "$ref": "#/definitions/kubernetes_PersistentVolume",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolume"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PersistentVolumeList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_PersistentVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "awsElasticBlockStore": {
- "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
- },
- "cephfs": {
- "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
- },
- "gcePersistentDisk": {
- "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
- },
- "glusterfs": {
- "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
- },
- "hostPath": {
- "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
- },
- "iscsi": {
- "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
- },
- "nfs": {
- "$ref": "#/definitions/kubernetes_NFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
- },
- "rbd": {
- "$ref": "#/definitions/kubernetes_RBDVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSource"
- },
- "kubernetes_PersistentVolumeSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "accessModes": {
- "type": "array",
- "description": "all ways the volume can be mounted; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes",
- "items": {
- "type": "string",
- "description": "all ways the volume can be mounted; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes"
- }
- },
- "awsElasticBlockStore": {
- "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
- },
- "capacity": {
- "type": "object",
- "description": "a description of the persistent volume's resources and capacityr; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- },
- "cephfs": {
- "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
- },
- "claimRef": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "gcePersistentDisk": {
- "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
- },
- "glusterfs": {
- "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
- },
- "hostPath": {
- "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
- },
- "iscsi": {
- "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
- },
- "nfs": {
- "$ref": "#/definitions/kubernetes_NFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
- },
- "persistentVolumeReclaimPolicy": {
- "type": "string",
- "description": "what happens to a volume when released from its claim; Valid options are Retain (default) and Recycle. Recyling must be supported by the volume plugin underlying this persistent volume. See http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy"
- },
- "rbd": {
- "$ref": "#/definitions/kubernetes_RBDVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSpec"
- },
- "kubernetes_PersistentVolumeStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "message": {
- "type": "string",
- "description": "human-readable message indicating details about why the volume is in this state"
- },
- "phase": {
- "type": "string",
- "description": "the current phase of a persistent volume; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#phase"
- },
- "reason": {
- "type": "string",
- "description": "(brief) reason the volume is not is not available"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeStatus"
- },
- "kubernetes_Pod": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Pod",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_PodSpec",
- "javaType": "io.fabric8.kubernetes.api.model.PodSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_PodStatus",
- "javaType": "io.fabric8.kubernetes.api.model.PodStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Pod",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_PodCondition": {
- "type": "object",
- "description": "",
- "properties": {
- "status": {
- "type": "string",
- "description": "status of the condition"
- },
- "type": {
- "type": "string",
- "description": "kind of the condition"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PodCondition"
- },
- "kubernetes_PodList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of pods; see http://releases.k8s.io/HEAD/docs/user-guide/pods.md",
- "items": {
- "$ref": "#/definitions/kubernetes_Pod",
- "javaType": "io.fabric8.kubernetes.api.model.Pod"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PodList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PodList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_PodSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "activeDeadlineSeconds": {
- "type": "integer",
- "description": "",
- "javaType": "Long"
- },
- "containers": {
- "type": "array",
- "description": "list of containers belonging to the pod; cannot be updated; containers cannot currently be added or removed; there must be at least one container in a Pod; see http://releases.k8s.io/HEAD/docs/user-guide/containers.md",
- "items": {
- "$ref": "#/definitions/kubernetes_Container",
- "javaType": "io.fabric8.kubernetes.api.model.Container"
- }
- },
- "dnsPolicy": {
- "type": "string",
- "description": "DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"
- },
- "host": {
- "type": "string",
- "description": "deprecated"
- },
- "hostNetwork": {
- "type": "boolean",
- "description": "host networking requested for this pod"
- },
- "imagePullSecrets": {
- "type": "array",
- "description": "list of references to secrets in the same namespace available for pulling the container images; see http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod",
- "items": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- }
- },
- "nodeName": {
- "type": "string",
- "description": "node requested for this pod"
- },
- "nodeSelector": {
- "type": "object",
- "description": "selector which must match a node's labels for the pod to be scheduled on that node; see http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md",
- "additionalProperties": {
- "type": "string",
- "description": "selector which must match a node's labels for the pod to be scheduled on that node; see http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "restartPolicy": {
- "type": "string",
- "description": "restart policy for all containers within the pod; one of Always"
- },
- "serviceAccount": {
- "type": "string",
- "description": "deprecated; use serviceAccountName instead"
- },
- "serviceAccountName": {
- "type": "string",
- "description": "name of the ServiceAccount to use to run this pod; see http://releases.k8s.io/HEAD/docs/design/service_accounts.md"
- },
- "terminationGracePeriodSeconds": {
- "type": "integer",
- "description": "optional duration in seconds the pod needs to terminate gracefully; may be decreased in delete request; value must be non-negative integer; the value zero indicates delete immediately; if this value is not set",
- "javaType": "Long"
- },
- "volumes": {
- "type": "array",
- "description": "list of volumes that can be mounted by containers belonging to the pod; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md",
- "items": {
- "$ref": "#/definitions/kubernetes_Volume",
- "javaType": "io.fabric8.kubernetes.api.model.Volume"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PodSpec"
- },
- "kubernetes_PodStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "conditions": {
- "type": "array",
- "description": "current service state of pod; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions",
- "items": {
- "$ref": "#/definitions/kubernetes_PodCondition",
- "javaType": "io.fabric8.kubernetes.api.model.PodCondition"
- }
- },
- "containerStatuses": {
- "type": "array",
- "description": "list of container statuses; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses",
- "items": {
- "$ref": "#/definitions/kubernetes_ContainerStatus",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
- }
- },
- "hostIP": {
- "type": "string",
- "description": "IP address of the host to which the pod is assigned; empty if not yet scheduled"
- },
- "message": {
- "type": "string",
- "description": "human readable message indicating details about why the pod is in this condition"
- },
- "phase": {
- "type": "string",
- "description": "current condition of the pod; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-phase"
- },
- "podIP": {
- "type": "string",
- "description": "IP address allocated to the pod; routable at least within the cluster; empty if not yet allocated"
- },
- "reason": {
- "type": "string",
- "description": "(brief-CamelCase) reason indicating details about why the pod is in this condition"
- },
- "startTime": {
- "type": "string",
- "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod."
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PodStatus"
- },
- "kubernetes_PodTemplateSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_PodSpec",
- "javaType": "io.fabric8.kubernetes.api.model.PodSpec"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
- },
- "kubernetes_Probe": {
- "type": "object",
- "description": "",
- "properties": {
- "exec": {
- "$ref": "#/definitions/kubernetes_ExecAction",
- "javaType": "io.fabric8.kubernetes.api.model.ExecAction"
- },
- "httpGet": {
- "$ref": "#/definitions/kubernetes_HTTPGetAction",
- "javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
- },
- "initialDelaySeconds": {
- "type": "integer",
- "description": "number of seconds after the container has started before liveness probes are initiated; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes",
- "javaType": "Long"
- },
- "tcpSocket": {
- "$ref": "#/definitions/kubernetes_TCPSocketAction",
- "javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
- },
- "timeoutSeconds": {
- "type": "integer",
- "description": "number of seconds after which liveness probes timeout; defaults to 1 second; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes",
- "javaType": "Long"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Probe"
- },
- "kubernetes_RBDVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "fsType": {
- "type": "string",
- "description": "file system type to mount"
- },
- "image": {
- "type": "string",
- "description": "rados image name; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
- },
- "keyring": {
- "type": "string",
- "description": "keyring is the path to key ring for rados user; default is /etc/ceph/keyring; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
- },
- "monitors": {
- "type": "array",
- "description": "a collection of Ceph monitors; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it",
- "items": {
- "type": "string",
- "description": "a collection of Ceph monitors; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
- }
- },
- "pool": {
- "type": "string",
- "description": "rados pool name; default is rbd; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
- },
- "readOnly": {
- "type": "boolean",
- "description": "rbd volume to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
- },
- "secretRef": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- },
- "user": {
- "type": "string",
- "description": "rados user name; default is admin; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
- },
- "kubernetes_ReplicationController": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ReplicationController",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_ReplicationControllerSpec",
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_ReplicationControllerStatus",
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationController",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_ReplicationControllerList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of replication controllers; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md",
- "items": {
- "$ref": "#/definitions/kubernetes_ReplicationController",
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationController"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ReplicationControllerList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_ReplicationControllerSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "replicas": {
- "type": "integer",
- "description": "number of replicas desired; defaults to 1; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller"
- },
- "selector": {
- "type": "object",
- "description": "label keys and values that must match in order to be controlled by this replication controller",
- "additionalProperties": {
- "type": "string",
- "description": "label keys and values that must match in order to be controlled by this replication controller"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "template": {
- "$ref": "#/definitions/kubernetes_PodTemplateSpec",
- "javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerSpec"
- },
- "kubernetes_ReplicationControllerStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "observedGeneration": {
- "type": "integer",
- "description": "reflects the generation of the most recently observed replication controller",
- "javaType": "Long"
- },
- "replicas": {
- "type": "integer",
- "description": "most recently oberved number of replicas; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerStatus"
- },
- "kubernetes_ResourceQuota": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ResourceQuota",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_ResourceQuotaSpec",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_ResourceQuotaStatus",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuota",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_ResourceQuotaList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "items is a list of ResourceQuota objects; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
- "items": {
- "$ref": "#/definitions/kubernetes_ResourceQuota",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuota"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ResourceQuotaList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_ResourceQuotaSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "hard": {
- "type": "object",
- "description": "hard is the set of desired hard limits for each named resource; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaSpec"
- },
- "kubernetes_ResourceQuotaStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "hard": {
- "type": "object",
- "description": "hard is the set of enforced hard limits for each named resource; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- },
- "used": {
- "type": "object",
- "description": "used is the current observed total usage of the resource in the namespace",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaStatus"
- },
- "kubernetes_ResourceRequirements": {
- "type": "object",
- "description": "",
- "properties": {
- "limits": {
- "type": "object",
- "description": "Maximum amount of compute resources allowed; see http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- },
- "requests": {
- "type": "object",
- "description": "Minimum amount of resources requested; if Requests is omitted for a container",
- "additionalProperties": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
- },
- "kubernetes_RunAsUserStrategyOptions": {
- "type": "object",
- "description": "",
- "properties": {
- "type": {
- "type": "string",
- "description": "strategy used to generate RunAsUser"
- },
- "uid": {
- "type": "integer",
- "description": "the uid to always run as; required for MustRunAs",
- "javaType": "Long"
- },
- "uidRangeMax": {
- "type": "integer",
- "description": "max value for range based allocators",
- "javaType": "Long"
- },
- "uidRangeMin": {
- "type": "integer",
- "description": "min value for range based allocators",
- "javaType": "Long"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.RunAsUserStrategyOptions"
- },
- "kubernetes_SELinuxContextStrategyOptions": {
- "type": "object",
- "description": "",
- "properties": {
- "seLinuxOptions": {
- "$ref": "#/definitions/kubernetes_SELinuxOptions",
- "javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
- },
- "type": {
- "type": "string",
- "description": "strategy used to generate the SELinux context"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.SELinuxContextStrategyOptions"
- },
- "kubernetes_SELinuxOptions": {
- "type": "object",
- "description": "",
- "properties": {
- "level": {
- "type": "string",
- "description": "the level label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
- },
- "role": {
- "type": "string",
- "description": "the role label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
- },
- "type": {
- "type": "string",
- "description": "the type label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
- },
- "user": {
- "type": "string",
- "description": "the user label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
- },
- "kubernetes_Secret": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "data": {
- "type": "object",
- "description": "data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. Each value must be a base64 encoded string as described in https://tools.ietf.org/html/rfc4648#section-4",
- "additionalProperties": {
- "type": "string",
- "description": "data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. Each value must be a base64 encoded string as described in https://tools.ietf.org/html/rfc4648#section-4"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Secret",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "type": {
- "type": "string",
- "description": "type facilitates programmatic handling of secret data"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Secret",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_SecretList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "items is a list of secret objects; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
- "items": {
- "$ref": "#/definitions/kubernetes_Secret",
- "javaType": "io.fabric8.kubernetes.api.model.Secret"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "SecretList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.SecretList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_SecretVolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "secretName": {
- "type": "string",
- "description": "secretName is the name of a secret in the pod's namespace; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
- },
- "kubernetes_SecurityContext": {
- "type": "object",
- "description": "",
- "properties": {
- "capabilities": {
- "$ref": "#/definitions/kubernetes_Capabilities",
- "javaType": "io.fabric8.kubernetes.api.model.Capabilities"
- },
- "privileged": {
- "type": "boolean",
- "description": "run the container in privileged mode; see http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context"
- },
- "runAsNonRoot": {
- "type": "boolean",
- "description": "indicates the container must be run as a non-root user either by specifying the runAsUser or in the image specification"
- },
- "runAsUser": {
- "type": "integer",
- "description": "the user id that runs the first process in the container; see http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context",
- "javaType": "Long"
- },
- "seLinuxOptions": {
- "$ref": "#/definitions/kubernetes_SELinuxOptions",
- "javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.SecurityContext"
- },
- "kubernetes_SecurityContextConstraints": {
- "type": "object",
- "description": "",
- "properties": {
- "allowHostDirVolumePlugin": {
- "type": "boolean",
- "description": "allow the use of the host dir volume plugin"
- },
- "allowHostNetwork": {
- "type": "boolean",
- "description": "allow the use of the hostNetwork in the pod spec"
- },
- "allowHostPorts": {
- "type": "boolean",
- "description": "allow the use of the host ports in the containers"
- },
- "allowPrivilegedContainer": {
- "type": "boolean",
- "description": "allow containers to run as privileged"
- },
- "allowedCapabilities": {
- "type": "array",
- "description": "capabilities that are allowed to be added",
- "items": {
- "type": "string",
- "description": "capabilities that are allowed to be added"
- }
- },
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "groups": {
- "type": "array",
- "description": "groups allowed to use this SecurityContextConstraints",
- "items": {
- "type": "string",
- "description": "groups allowed to use this SecurityContextConstraints"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "SecurityContextConstraints",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "runAsUser": {
- "$ref": "#/definitions/kubernetes_RunAsUserStrategyOptions",
- "javaType": "io.fabric8.kubernetes.api.model.RunAsUserStrategyOptions"
- },
- "seLinuxContext": {
- "$ref": "#/definitions/kubernetes_SELinuxContextStrategyOptions",
- "javaType": "io.fabric8.kubernetes.api.model.SELinuxContextStrategyOptions"
- },
- "users": {
- "type": "array",
- "description": "users allowed to use this SecurityContextConstraints",
- "items": {
- "type": "string",
- "description": "users allowed to use this SecurityContextConstraints"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_SecurityContextConstraintsList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_SecurityContextConstraints",
- "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "SecurityContextConstraintsList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraintsList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_Service": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Service",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/kubernetes_ServiceSpec",
- "javaType": "io.fabric8.kubernetes.api.model.ServiceSpec"
- },
- "status": {
- "$ref": "#/definitions/kubernetes_ServiceStatus",
- "javaType": "io.fabric8.kubernetes.api.model.ServiceStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Service",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_ServiceAccount": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "imagePullSecrets": {
- "type": "array",
- "description": "list of references to secrets in the same namespace available for pulling container images; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md#manually-specifying-an-imagepullsecret",
- "items": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ServiceAccount",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "secrets": {
- "type": "array",
- "description": "list of secrets that can be used by pods running as this service account; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
- "items": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ServiceAccount",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "kubernetes_ServiceAccountList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of ServiceAccounts; see http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts",
- "items": {
- "$ref": "#/definitions/kubernetes_ServiceAccount",
- "javaType": "io.fabric8.kubernetes.api.model.ServiceAccount"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ServiceAccountList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ServiceAccountList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_ServiceList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of services",
- "items": {
- "$ref": "#/definitions/kubernetes_Service",
- "javaType": "io.fabric8.kubernetes.api.model.Service"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ServiceList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ServiceList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "kubernetes_ServicePort": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "the name of this port; optional if only one port is defined",
- "maxLength": 63,
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
- },
- "nodePort": {
- "type": "integer",
- "description": "the port on each node on which this service is exposed when type=NodePort or LoadBalancer; usually assigned by the system; if specified"
- },
- "port": {
- "type": "integer",
- "description": "the port number that is exposed"
- },
- "protocol": {
- "type": "string",
- "description": "the protocol used by this port; must be UDP or TCP; TCP if unspecified"
- },
- "targetPort": {
- "$ref": "#/definitions/kubernetes_util_IntOrString",
- "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ServicePort"
- },
- "kubernetes_ServiceSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "clusterIP": {
- "type": "string",
- "description": "IP address of the service; usually assigned by the system; if specified"
- },
- "deprecatedPublicIPs": {
- "type": "array",
- "description": "deprecated. externally visible IPs (e.g. load balancers) that should be proxied to this service",
- "items": {
- "type": "string",
- "description": "deprecated. externally visible IPs (e.g. load balancers) that should be proxied to this service"
- }
- },
- "portalIP": {
- "type": "string",
- "description": "deprecated"
- },
- "ports": {
- "type": "array",
- "description": "ports exposed by the service; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
- "items": {
- "$ref": "#/definitions/kubernetes_ServicePort",
- "javaType": "io.fabric8.kubernetes.api.model.ServicePort"
- }
- },
- "selector": {
- "type": "object",
- "description": "label keys and values that must match in order to receive traffic for this service; if empty",
- "additionalProperties": {
- "type": "string",
- "description": "label keys and values that must match in order to receive traffic for this service; if empty"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "sessionAffinity": {
- "type": "string",
- "description": "enable client IP based session affinity; must be ClientIP or None; defaults to None; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies"
- },
- "type": {
- "type": "string",
- "description": "type of this service; must be ClusterIP"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ServiceSpec"
- },
- "kubernetes_ServiceStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "loadBalancer": {
- "$ref": "#/definitions/kubernetes_LoadBalancerStatus",
- "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.ServiceStatus"
- },
- "kubernetes_Status": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "code": {
- "type": "integer",
- "description": "suggested HTTP return code for this status; 0 if not set"
- },
- "details": {
- "$ref": "#/definitions/kubernetes_StatusDetails",
- "javaType": "io.fabric8.kubernetes.api.model.StatusDetails"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Status",
- "required": true
- },
- "message": {
- "type": "string",
- "description": "human-readable description of the status of this operation"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- },
- "reason": {
- "type": "string",
- "description": "machine-readable description of why this operation is in the 'Failure' status; if this value is empty there is no information available; a reason clarifies an HTTP status code but does not override it"
- },
- "status": {
- "type": "string",
- "description": "status of the operation; either Success"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Status"
- },
- "kubernetes_StatusCause": {
- "type": "object",
- "description": "",
- "properties": {
- "field": {
- "type": "string",
- "description": "field of the resource that has caused this error"
- },
- "message": {
- "type": "string",
- "description": "human-readable description of the cause of the error; this field may be presented as-is to a reader"
- },
- "reason": {
- "type": "string",
- "description": "machine-readable description of the cause of the error; if this value is empty there is no information available"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.StatusCause"
- },
- "kubernetes_StatusDetails": {
- "type": "object",
- "description": "",
- "properties": {
- "causes": {
- "type": "array",
- "description": "the Causes array includes more details associated with the StatusReason failure; not all StatusReasons may provide detailed causes",
- "items": {
- "$ref": "#/definitions/kubernetes_StatusCause",
- "javaType": "io.fabric8.kubernetes.api.model.StatusCause"
- }
- },
- "kind": {
- "type": "string",
- "description": "the kind attribute of the resource associated with the status StatusReason; on some operations may differ from the requested resource Kind; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
- },
- "name": {
- "type": "string",
- "description": "the name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)"
- },
- "retryAfterSeconds": {
- "type": "integer",
- "description": "the number of seconds before the client should attempt to retry this operation"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.StatusDetails"
- },
- "kubernetes_TCPSocketAction": {
- "type": "object",
- "description": "",
- "properties": {
- "port": {
- "$ref": "#/definitions/kubernetes_util_IntOrString",
- "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
- },
- "kubernetes_TypeMeta": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "version of the schema the object should have; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
- },
- "kind": {
- "type": "string",
- "description": "kind of object"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.TypeMeta"
- },
- "kubernetes_Volume": {
- "type": "object",
- "description": "",
- "properties": {
- "awsElasticBlockStore": {
- "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
- },
- "cephfs": {
- "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
- },
- "emptyDir": {
- "$ref": "#/definitions/kubernetes_EmptyDirVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
- },
- "gcePersistentDisk": {
- "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
- },
- "gitRepo": {
- "$ref": "#/definitions/kubernetes_GitRepoVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
- },
- "glusterfs": {
- "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
- },
- "hostPath": {
- "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
- },
- "iscsi": {
- "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_MetadataVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
- },
- "name": {
- "type": "string",
- "description": "volume name; must be a DNS_LABEL and unique within the pod; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
- "maxLength": 63,
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
- },
- "nfs": {
- "$ref": "#/definitions/kubernetes_NFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
- },
- "persistentVolumeClaim": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeClaimVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
- },
- "rbd": {
- "$ref": "#/definitions/kubernetes_RBDVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
- },
- "secret": {
- "$ref": "#/definitions/kubernetes_SecretVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Volume"
- },
- "kubernetes_VolumeMount": {
- "type": "object",
- "description": "",
- "properties": {
- "mountPath": {
- "type": "string",
- "description": "path within the container at which the volume should be mounted"
- },
- "name": {
- "type": "string",
- "description": "name of the volume to mount"
- },
- "readOnly": {
- "type": "boolean",
- "description": "mounted read-only if true"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.VolumeMount"
- },
- "kubernetes_VolumeSource": {
- "type": "object",
- "description": "",
- "properties": {
- "awsElasticBlockStore": {
- "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
- },
- "cephfs": {
- "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
- },
- "emptyDir": {
- "$ref": "#/definitions/kubernetes_EmptyDirVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
- },
- "gcePersistentDisk": {
- "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
- },
- "gitRepo": {
- "$ref": "#/definitions/kubernetes_GitRepoVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
- },
- "glusterfs": {
- "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
- },
- "hostPath": {
- "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
- },
- "iscsi": {
- "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_MetadataVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
- },
- "nfs": {
- "$ref": "#/definitions/kubernetes_NFSVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
- },
- "persistentVolumeClaim": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeClaimVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
- },
- "rbd": {
- "$ref": "#/definitions/kubernetes_RBDVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
- },
- "secret": {
- "$ref": "#/definitions/kubernetes_SecretVolumeSource",
- "javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.VolumeSource"
- },
- "kubernetes_config_AuthInfo": {
- "type": "object",
- "description": "",
- "properties": {
- "client-certificate": {
- "type": "string",
- "description": ""
- },
- "client-certificate-data": {
- "type": "string",
- "description": ""
- },
- "client-key": {
- "type": "string",
- "description": ""
- },
- "client-key-data": {
- "type": "string",
- "description": ""
- },
- "extensions": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedExtension",
- "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
- }
- },
- "password": {
- "type": "string",
- "description": ""
- },
- "token": {
- "type": "string",
- "description": ""
- },
- "username": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.AuthInfo"
- },
- "kubernetes_config_Cluster": {
- "type": "object",
- "description": "",
- "properties": {
- "api-version": {
- "type": "string",
- "description": ""
- },
- "certificate-authority": {
- "type": "string",
- "description": ""
- },
- "certificate-authority-data": {
- "type": "string",
- "description": ""
- },
- "extensions": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedExtension",
- "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
- }
- },
- "insecure-skip-tls-verify": {
- "type": "boolean",
- "description": ""
- },
- "server": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Cluster"
- },
- "kubernetes_config_Config": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": ""
- },
- "clusters": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedCluster",
- "javaType": "io.fabric8.kubernetes.api.model.NamedCluster"
- }
- },
- "contexts": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedContext",
- "javaType": "io.fabric8.kubernetes.api.model.NamedContext"
- }
- },
- "current-context": {
- "type": "string",
- "description": ""
- },
- "extensions": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedExtension",
- "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
- }
- },
- "kind": {
- "type": "string",
- "description": ""
- },
- "preferences": {
- "$ref": "#/definitions/kubernetes_config_Preferences",
- "javaType": "io.fabric8.kubernetes.api.model.Preferences"
- },
- "users": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedAuthInfo",
- "javaType": "io.fabric8.kubernetes.api.model.NamedAuthInfo"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Config"
- },
- "kubernetes_config_Context": {
- "type": "object",
- "description": "",
- "properties": {
- "cluster": {
- "type": "string",
- "description": ""
- },
- "extensions": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedExtension",
- "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
- }
- },
- "namespace": {
- "type": "string",
- "description": ""
- },
- "user": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Context"
- },
- "kubernetes_config_NamedAuthInfo": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": ""
- },
- "user": {
- "$ref": "#/definitions/kubernetes_config_AuthInfo",
- "javaType": "io.fabric8.kubernetes.api.model.AuthInfo"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NamedAuthInfo"
- },
- "kubernetes_config_NamedCluster": {
- "type": "object",
- "description": "",
- "properties": {
- "cluster": {
- "$ref": "#/definitions/kubernetes_config_Cluster",
- "javaType": "io.fabric8.kubernetes.api.model.Cluster"
- },
- "name": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NamedCluster"
- },
- "kubernetes_config_NamedContext": {
- "type": "object",
- "description": "",
- "properties": {
- "context": {
- "$ref": "#/definitions/kubernetes_config_Context",
- "javaType": "io.fabric8.kubernetes.api.model.Context"
- },
- "name": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NamedContext"
- },
- "kubernetes_config_NamedExtension": {
- "type": "object",
- "description": "",
- "properties": {
- "extension": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "name": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
- },
- "kubernetes_config_Preferences": {
- "type": "object",
- "description": "",
- "properties": {
- "colors": {
- "type": "boolean",
- "description": ""
- },
- "extensions": {
- "type": "array",
- "description": "",
- "items": {
- "$ref": "#/definitions/kubernetes_config_NamedExtension",
- "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Preferences"
- },
- "kubernetes_resource_Quantity": {
- "type": "object",
- "description": "",
- "properties": {
- "Amount": {
- "$ref": "#/definitions/speter_inf_Dec",
- "javaType": "io.fabric8.openshift.api.model.Dec"
- },
- "Format": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "kubernetes_runtime_RawExtension": {
- "type": "object",
- "description": "",
- "properties": {
- "RawJSON": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "kubernetes_util_IntOrString": {
- "type": "object",
- "description": "",
- "properties": {
- "IntVal": {
- "type": "integer",
- "description": ""
- },
- "Kind": {
- "type": "integer",
- "description": ""
- },
- "StrVal": {
- "type": "string",
- "description": ""
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
- },
- "kubernetes_watch_WatchEvent": {
- "type": "object",
- "description": "",
- "properties": {
- "object": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "type": {
- "type": "string",
- "description": "the type of watch event; may be ADDED"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.kubernetes.api.model.WatchEvent"
- },
- "os_authorization_AuthorizationAttributes": {
- "type": "object",
- "description": "",
- "properties": {
- "content": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "namespace": {
- "type": "string",
- "description": "namespace of the action being requested"
- },
- "resource": {
- "type": "string",
- "description": "one of the existing resource types"
- },
- "resourceName": {
- "type": "string",
- "description": "name of the resource being requested for a get or delete"
- },
- "verb": {
- "type": "string",
- "description": "one of get"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.AuthorizationAttributes"
- },
- "os_authorization_ClusterPolicy": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ClusterPolicy",
- "required": true
- },
- "lastModified": {
- "type": "string",
- "description": "last time any part of the object was created"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "roles": {
- "type": "array",
- "description": "all the roles held by this policy",
- "items": {
- "$ref": "#/definitions/os_authorization_NamedClusterRole",
- "javaType": "io.fabric8.openshift.api.model.NamedClusterRole"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicy",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_ClusterPolicyBinding": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ClusterPolicyBinding",
- "required": true
- },
- "lastModified": {
- "type": "string",
- "description": "last time any part of the object was created"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "policyRef": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "roleBindings": {
- "type": "array",
- "description": "all the role bindings held by this policy",
- "items": {
- "$ref": "#/definitions/os_authorization_NamedClusterRoleBinding",
- "javaType": "io.fabric8.openshift.api.model.NamedClusterRoleBinding"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_ClusterPolicyBindingList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of cluster policy bindings",
- "items": {
- "$ref": "#/definitions/os_authorization_ClusterPolicyBinding",
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ClusterPolicyBindingList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBindingList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_authorization_ClusterPolicyList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of cluster policies",
- "items": {
- "$ref": "#/definitions/os_authorization_ClusterPolicy",
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicy"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ClusterPolicyList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicyList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_authorization_ClusterRole": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ClusterRole",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "rules": {
- "type": "array",
- "description": "list of policy rules",
- "items": {
- "$ref": "#/definitions/os_authorization_PolicyRule",
- "javaType": "io.fabric8.openshift.api.model.PolicyRule"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ClusterRole",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_ClusterRoleBinding": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "groupNames": {
- "type": "array",
- "description": "all the groups directly bound to the role",
- "items": {
- "type": "string",
- "description": "all the groups directly bound to the role"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ClusterRoleBinding",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "roleRef": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "subjects": {
- "type": "array",
- "description": "references to subjects bound to the role. Only User",
- "items": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "userNames": {
- "type": "array",
- "description": "all user names directly bound to the role",
- "items": {
- "type": "string",
- "description": "all user names directly bound to the role"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_ClusterRoleBindingList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of cluster role bindings",
- "items": {
- "$ref": "#/definitions/os_authorization_ClusterRoleBinding",
- "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ClusterRoleBindingList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_authorization_LocalSubjectAccessReview": {
- "type": "object",
- "description": "",
- "properties": {
- "TypeMeta": {
- "$ref": "#/definitions/kubernetes_TypeMeta",
- "javaType": "io.fabric8.kubernetes.api.model.TypeMeta"
- },
- "content": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "groups": {
- "type": "array",
- "description": "optional",
- "items": {
- "type": "string",
- "description": "optional"
- }
- },
- "namespace": {
- "type": "string",
- "description": "namespace of the action being requested"
- },
- "resource": {
- "type": "string",
- "description": "one of the existing resource types"
- },
- "resourceName": {
- "type": "string",
- "description": "name of the resource being requested for a get or delete"
- },
- "user": {
- "type": "string",
- "description": "optional"
- },
- "verb": {
- "type": "string",
- "description": "one of get"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.LocalSubjectAccessReview"
- },
- "os_authorization_NamedClusterRole": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "name of the cluster role"
- },
- "role": {
- "$ref": "#/definitions/os_authorization_ClusterRole",
- "javaType": "io.fabric8.openshift.api.model.ClusterRole"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.NamedClusterRole"
- },
- "os_authorization_NamedClusterRoleBinding": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "name of the cluster role binding"
- },
- "roleBinding": {
- "$ref": "#/definitions/os_authorization_ClusterRoleBinding",
- "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.NamedClusterRoleBinding"
- },
- "os_authorization_NamedRole": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "name of the role"
- },
- "role": {
- "$ref": "#/definitions/os_authorization_Role",
- "javaType": "io.fabric8.openshift.api.model.Role"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.NamedRole"
- },
- "os_authorization_NamedRoleBinding": {
- "type": "object",
- "description": "",
- "properties": {
- "name": {
- "type": "string",
- "description": "name of the roleBinding"
- },
- "roleBinding": {
- "$ref": "#/definitions/os_authorization_RoleBinding",
- "javaType": "io.fabric8.openshift.api.model.RoleBinding"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.NamedRoleBinding"
- },
- "os_authorization_Policy": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Policy",
- "required": true
- },
- "lastModified": {
- "type": "string",
- "description": "last time that any part of the policy was created"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "roles": {
- "type": "array",
- "description": "roles held by this policy",
- "items": {
- "$ref": "#/definitions/os_authorization_NamedRole",
- "javaType": "io.fabric8.openshift.api.model.NamedRole"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Policy",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_PolicyBinding": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PolicyBinding",
- "required": true
- },
- "lastModified": {
- "type": "string",
- "description": "last time that any part of the object was created"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "policyRef": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "roleBindings": {
- "type": "array",
- "description": "all roleBindings held by this policyBinding",
- "items": {
- "$ref": "#/definitions/os_authorization_NamedRoleBinding",
- "javaType": "io.fabric8.openshift.api.model.NamedRoleBinding"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.PolicyBinding",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_PolicyBindingList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of policy bindings",
- "items": {
- "$ref": "#/definitions/os_authorization_PolicyBinding",
- "javaType": "io.fabric8.openshift.api.model.PolicyBinding"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PolicyBindingList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.PolicyBindingList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_authorization_PolicyList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of policies",
- "items": {
- "$ref": "#/definitions/os_authorization_Policy",
- "javaType": "io.fabric8.openshift.api.model.Policy"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "PolicyList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.PolicyList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_authorization_PolicyRule": {
- "type": "object",
- "description": "",
- "properties": {
- "attributeRestrictions": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "nonResourceURLs": {
- "type": "array",
- "description": "set of partial urls that a user should have access to. *s are allowed",
- "items": {
- "type": "string",
- "description": "set of partial urls that a user should have access to. *s are allowed"
- }
- },
- "resourceNames": {
- "type": "array",
- "description": "optional white list of names that the rule applies to. An empty set means that everything is allowed.",
- "items": {
- "type": "string",
- "description": "optional white list of names that the rule applies to. An empty set means that everything is allowed."
- }
- },
- "resources": {
- "type": "array",
- "description": "list of resources this rule applies to. * represents all resources.",
- "items": {
- "type": "string",
- "description": "list of resources this rule applies to. * represents all resources."
- }
- },
- "verbs": {
- "type": "array",
- "description": "list of verbs that apply to ALL the resourceKinds and attributeRestrictions contained in this rule. The verb * represents all kinds.",
- "items": {
- "type": "string",
- "description": "list of verbs that apply to ALL the resourceKinds and attributeRestrictions contained in this rule. The verb * represents all kinds."
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.PolicyRule"
- },
- "os_authorization_Role": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Role",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "rules": {
- "type": "array",
- "description": "all the rules for this role",
- "items": {
- "$ref": "#/definitions/os_authorization_PolicyRule",
- "javaType": "io.fabric8.openshift.api.model.PolicyRule"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Role",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_RoleBinding": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "groupNames": {
- "type": "array",
- "description": "all the groups directly bound to the role",
- "items": {
- "type": "string",
- "description": "all the groups directly bound to the role"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "RoleBinding",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "roleRef": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "subjects": {
- "type": "array",
- "description": "references to subjects bound to the role. Only User",
- "items": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "userNames": {
- "type": "array",
- "description": "all the usernames directly bound to the role",
- "items": {
- "type": "string",
- "description": "all the usernames directly bound to the role"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RoleBinding",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_authorization_RoleBindingList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of role bindings",
- "items": {
- "$ref": "#/definitions/os_authorization_RoleBinding",
- "javaType": "io.fabric8.openshift.api.model.RoleBinding"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "RoleBindingList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RoleBindingList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_authorization_RoleList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of roles",
- "items": {
- "$ref": "#/definitions/os_authorization_Role",
- "javaType": "io.fabric8.openshift.api.model.Role"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "RoleList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RoleList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_authorization_SubjectAccessReview": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "content": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "groups": {
- "type": "array",
- "description": "optional",
- "items": {
- "type": "string",
- "description": "optional"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "SubjectAccessReview",
- "required": true
- },
- "namespace": {
- "type": "string",
- "description": "namespace of the action being requested"
- },
- "resource": {
- "type": "string",
- "description": "one of the existing resource types"
- },
- "resourceName": {
- "type": "string",
- "description": "name of the resource being requested for a get or delete"
- },
- "user": {
- "type": "string",
- "description": "optional"
- },
- "verb": {
- "type": "string",
- "description": "one of get"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.SubjectAccessReview"
- },
- "os_authorization_SubjectAccessReviewResponse": {
- "type": "object",
- "description": "",
- "properties": {
- "allowed": {
- "type": "boolean",
- "description": "true if the action would be allowed"
- },
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "SubjectAccessReviewResponse",
- "required": true
- },
- "namespace": {
- "type": "string",
- "description": "the namespace used for the access review"
- },
- "reason": {
- "type": "string",
- "description": "reason is optional"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.SubjectAccessReviewResponse"
- },
- "os_build_Build": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Build",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/os_build_BuildSpec",
- "javaType": "io.fabric8.openshift.api.model.BuildSpec"
- },
- "status": {
- "$ref": "#/definitions/os_build_BuildStatus",
- "javaType": "io.fabric8.openshift.api.model.BuildStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Build",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_build_BuildConfig": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "BuildConfig",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/os_build_BuildConfigSpec",
- "javaType": "io.fabric8.openshift.api.model.BuildConfigSpec"
- },
- "status": {
- "$ref": "#/definitions/os_build_BuildConfigStatus",
- "javaType": "io.fabric8.openshift.api.model.BuildConfigStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildConfig",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_build_BuildConfigList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of build configs",
- "items": {
- "$ref": "#/definitions/os_build_BuildConfig",
- "javaType": "io.fabric8.openshift.api.model.BuildConfig"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "BuildConfigList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildConfigList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_build_BuildConfigSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "output": {
- "$ref": "#/definitions/os_build_BuildOutput",
- "javaType": "io.fabric8.openshift.api.model.BuildOutput"
- },
- "resources": {
- "$ref": "#/definitions/kubernetes_ResourceRequirements",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
- },
- "revision": {
- "$ref": "#/definitions/os_build_SourceRevision",
- "javaType": "io.fabric8.openshift.api.model.SourceRevision"
- },
- "serviceAccount": {
- "type": "string",
- "description": "the name of the service account to use to run pods created by the build"
- },
- "source": {
- "$ref": "#/definitions/os_build_BuildSource",
- "javaType": "io.fabric8.openshift.api.model.BuildSource"
- },
- "strategy": {
- "$ref": "#/definitions/os_build_BuildStrategy",
- "javaType": "io.fabric8.openshift.api.model.BuildStrategy"
- },
- "triggers": {
- "type": "array",
- "description": "determines how new builds can be launched from a build config. if no triggers are defined",
- "items": {
- "$ref": "#/definitions/os_build_BuildTriggerPolicy",
- "javaType": "io.fabric8.openshift.api.model.BuildTriggerPolicy"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildConfigSpec"
- },
- "os_build_BuildConfigStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "lastVersion": {
- "type": "integer",
- "description": "used to inform about number of last triggered build"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildConfigStatus"
- },
- "os_build_BuildList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of builds",
- "items": {
- "$ref": "#/definitions/os_build_Build",
- "javaType": "io.fabric8.openshift.api.model.Build"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "BuildList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_build_BuildOutput": {
- "type": "object",
- "description": "",
- "properties": {
- "pushSecret": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- },
- "to": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildOutput"
- },
- "os_build_BuildRequest": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "BuildRequest",
- "required": true
- },
- "lastVersion": {
- "type": "integer",
- "description": "LastVersion of the BuildConfig that triggered this build"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "revision": {
- "$ref": "#/definitions/os_build_SourceRevision",
- "javaType": "io.fabric8.openshift.api.model.SourceRevision"
- },
- "triggeredByImage": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildRequest",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_build_BuildSource": {
- "type": "object",
- "description": "",
- "properties": {
- "contextDir": {
- "type": "string",
- "description": "specifies sub-directory where the source code for the application exists"
- },
- "git": {
- "$ref": "#/definitions/os_build_GitBuildSource",
- "javaType": "io.fabric8.openshift.api.model.GitBuildSource"
- },
- "sourceSecret": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- },
- "type": {
- "type": "string",
- "description": "type of source control management system"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildSource"
- },
- "os_build_BuildSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "output": {
- "$ref": "#/definitions/os_build_BuildOutput",
- "javaType": "io.fabric8.openshift.api.model.BuildOutput"
- },
- "resources": {
- "$ref": "#/definitions/kubernetes_ResourceRequirements",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
- },
- "revision": {
- "$ref": "#/definitions/os_build_SourceRevision",
- "javaType": "io.fabric8.openshift.api.model.SourceRevision"
- },
- "serviceAccount": {
- "type": "string",
- "description": "the name of the service account to use to run pods created by the build"
- },
- "source": {
- "$ref": "#/definitions/os_build_BuildSource",
- "javaType": "io.fabric8.openshift.api.model.BuildSource"
- },
- "strategy": {
- "$ref": "#/definitions/os_build_BuildStrategy",
- "javaType": "io.fabric8.openshift.api.model.BuildStrategy"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildSpec"
- },
- "os_build_BuildStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "cancelled": {
- "type": "boolean",
- "description": "describes if a canceling event was triggered for the build"
- },
- "completionTimestamp": {
- "type": "string",
- "description": "server time when the pod running this build stopped running"
- },
- "config": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "duration": {
- "type": "integer",
- "description": "amount of time the build has been running",
- "javaType": "Long"
- },
- "message": {
- "type": "string",
- "description": "human-readable message indicating details about why the build has this status"
- },
- "phase": {
- "type": "string",
- "description": "observed point in the build lifecycle"
- },
- "startTimestamp": {
- "type": "string",
- "description": "server time when this build started running in a pod"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildStatus"
- },
- "os_build_BuildStrategy": {
- "type": "object",
- "description": "",
- "properties": {
- "customStrategy": {
- "$ref": "#/definitions/os_build_CustomBuildStrategy",
- "javaType": "io.fabric8.openshift.api.model.CustomBuildStrategy"
- },
- "dockerStrategy": {
- "$ref": "#/definitions/os_build_DockerBuildStrategy",
- "javaType": "io.fabric8.openshift.api.model.DockerBuildStrategy"
- },
- "sourceStrategy": {
- "$ref": "#/definitions/os_build_SourceBuildStrategy",
- "javaType": "io.fabric8.openshift.api.model.SourceBuildStrategy"
- },
- "type": {
- "type": "string",
- "description": "identifies the type of build strategy"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildStrategy"
- },
- "os_build_BuildTriggerPolicy": {
- "type": "object",
- "description": "",
- "properties": {
- "generic": {
- "$ref": "#/definitions/os_build_WebHookTrigger",
- "javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
- },
- "github": {
- "$ref": "#/definitions/os_build_WebHookTrigger",
- "javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
- },
- "imageChange": {
- "$ref": "#/definitions/os_build_ImageChangeTrigger",
- "javaType": "io.fabric8.openshift.api.model.ImageChangeTrigger"
- },
- "type": {
- "type": "string",
- "description": "type of build trigger"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.BuildTriggerPolicy"
- },
- "os_build_CustomBuildStrategy": {
- "type": "object",
- "description": "",
- "properties": {
- "env": {
- "type": "array",
- "description": "additional environment variables you want to pass into a builder container",
- "items": {
- "$ref": "#/definitions/kubernetes_EnvVar",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- }
- },
- "exposeDockerSocket": {
- "type": "boolean",
- "description": "allow running Docker commands (and build Docker images) from inside the container"
- },
- "forcePull": {
- "type": "boolean",
- "description": "forces pulling of builder image from remote registry if true"
- },
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "pullSecret": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.CustomBuildStrategy"
- },
- "os_build_DockerBuildStrategy": {
- "type": "object",
- "description": "",
- "properties": {
- "env": {
- "type": "array",
- "description": "additional environment variables you want to pass into a builder container",
- "items": {
- "$ref": "#/definitions/kubernetes_EnvVar",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- }
- },
- "forcePull": {
- "type": "boolean",
- "description": "forces the source build to pull the image if true"
- },
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "noCache": {
- "type": "boolean",
- "description": "if true"
- },
- "pullSecret": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DockerBuildStrategy"
- },
- "os_build_GitBuildSource": {
- "type": "object",
- "description": "",
- "properties": {
- "httpProxy": {
- "type": "string",
- "description": "specifies a http proxy to be used during git clone operations"
- },
- "httpsProxy": {
- "type": "string",
- "description": "specifies a https proxy to be used during git clone operations"
- },
- "ref": {
- "type": "string",
- "description": "identifies the branch/tag/ref to build"
- },
- "uri": {
- "type": "string",
- "description": "points to the source that will be built"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.GitBuildSource"
- },
- "os_build_GitSourceRevision": {
- "type": "object",
- "description": "",
- "properties": {
- "author": {
- "$ref": "#/definitions/os_build_SourceControlUser",
- "javaType": "io.fabric8.openshift.api.model.SourceControlUser"
- },
- "commit": {
- "type": "string",
- "description": "hash identifying a specific commit"
- },
- "committer": {
- "$ref": "#/definitions/os_build_SourceControlUser",
- "javaType": "io.fabric8.openshift.api.model.SourceControlUser"
- },
- "message": {
- "type": "string",
- "description": "description of a specific commit"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.GitSourceRevision"
- },
- "os_build_ImageChangeTrigger": {
- "type": "object",
- "description": "",
- "properties": {
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "lastTriggeredImageID": {
- "type": "string",
- "description": "used internally to save last used image ID for build"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ImageChangeTrigger"
- },
- "os_build_SourceBuildStrategy": {
- "type": "object",
- "description": "",
- "properties": {
- "env": {
- "type": "array",
- "description": "additional environment variables you want to pass into a builder container",
- "items": {
- "$ref": "#/definitions/kubernetes_EnvVar",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- }
- },
- "forcePull": {
- "type": "boolean",
- "description": "forces the source build to pull the image if true"
- },
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "incremental": {
- "type": "boolean",
- "description": "forces the source build to do incremental builds if true"
- },
- "pullSecret": {
- "$ref": "#/definitions/kubernetes_LocalObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
- },
- "scripts": {
- "type": "string",
- "description": "location of the source scripts"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.SourceBuildStrategy"
- },
- "os_build_SourceControlUser": {
- "type": "object",
- "description": "",
- "properties": {
- "email": {
- "type": "string",
- "description": "e-mail of the source control user"
- },
- "name": {
- "type": "string",
- "description": "name of the source control user"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.SourceControlUser"
- },
- "os_build_SourceRevision": {
- "type": "object",
- "description": "",
- "properties": {
- "git": {
- "$ref": "#/definitions/os_build_GitSourceRevision",
- "javaType": "io.fabric8.openshift.api.model.GitSourceRevision"
- },
- "type": {
- "type": "string",
- "description": "type of the build source"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.SourceRevision"
- },
- "os_build_WebHookTrigger": {
- "type": "object",
- "description": "",
- "properties": {
- "secret": {
- "type": "string",
- "description": "secret used to validate requests"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
- },
- "os_deploy_CustomDeploymentStrategyParams": {
- "type": "object",
- "description": "",
- "properties": {
- "command": {
- "type": "array",
- "description": "optionally overrides the container command (default is specified by the image)",
- "items": {
- "type": "string",
- "description": "optionally overrides the container command (default is specified by the image)"
- }
- },
- "environment": {
- "type": "array",
- "description": "environment variables provided to the deployment process container",
- "items": {
- "$ref": "#/definitions/kubernetes_EnvVar",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- }
- },
- "image": {
- "type": "string",
- "description": "a Docker image which can carry out a deployment"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.CustomDeploymentStrategyParams"
- },
- "os_deploy_DeploymentCause": {
- "type": "object",
- "description": "",
- "properties": {
- "imageTrigger": {
- "$ref": "#/definitions/os_deploy_DeploymentCauseImageTrigger",
- "javaType": "io.fabric8.openshift.api.model.DeploymentCauseImageTrigger"
- },
- "type": {
- "type": "string",
- "description": "the type of trigger that resulted in a new deployment"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentCause"
- },
- "os_deploy_DeploymentCauseImageTrigger": {
- "type": "object",
- "description": "",
- "properties": {
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentCauseImageTrigger"
- },
- "os_deploy_DeploymentConfig": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "DeploymentConfig",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/os_deploy_DeploymentConfigSpec",
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfigSpec"
- },
- "status": {
- "$ref": "#/definitions/os_deploy_DeploymentConfigStatus",
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfigStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfig",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_deploy_DeploymentConfigList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "a list of deployment configs",
- "items": {
- "$ref": "#/definitions/os_deploy_DeploymentConfig",
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfig"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "DeploymentConfigList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfigList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_deploy_DeploymentConfigSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "replicas": {
- "type": "integer",
- "description": "the desired number of replicas"
- },
- "selector": {
- "type": "object",
- "description": "a label query over pods that should match the replicas count",
- "additionalProperties": {
- "type": "string",
- "description": "a label query over pods that should match the replicas count"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "strategy": {
- "$ref": "#/definitions/os_deploy_DeploymentStrategy",
- "javaType": "io.fabric8.openshift.api.model.DeploymentStrategy"
- },
- "template": {
- "$ref": "#/definitions/kubernetes_PodTemplateSpec",
- "javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
- },
- "triggers": {
- "type": "array",
- "description": "how new deployments are triggered",
- "items": {
- "$ref": "#/definitions/os_deploy_DeploymentTriggerPolicy",
- "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerPolicy"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfigSpec"
- },
- "os_deploy_DeploymentConfigStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "details": {
- "$ref": "#/definitions/os_deploy_DeploymentDetails",
- "javaType": "io.fabric8.openshift.api.model.DeploymentDetails"
- },
- "latestVersion": {
- "type": "integer",
- "description": "used to determine whether the current deployment is out of sync"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfigStatus"
- },
- "os_deploy_DeploymentDetails": {
- "type": "object",
- "description": "",
- "properties": {
- "causes": {
- "type": "array",
- "description": "extended data associated with all the causes for creating a new deployment",
- "items": {
- "$ref": "#/definitions/os_deploy_DeploymentCause",
- "javaType": "io.fabric8.openshift.api.model.DeploymentCause"
- }
- },
- "message": {
- "type": "string",
- "description": "a user specified change message"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentDetails"
- },
- "os_deploy_DeploymentStrategy": {
- "type": "object",
- "description": "",
- "properties": {
- "customParams": {
- "$ref": "#/definitions/os_deploy_CustomDeploymentStrategyParams",
- "javaType": "io.fabric8.openshift.api.model.CustomDeploymentStrategyParams"
- },
- "recreateParams": {
- "$ref": "#/definitions/os_deploy_RecreateDeploymentStrategyParams",
- "javaType": "io.fabric8.openshift.api.model.RecreateDeploymentStrategyParams"
- },
- "resources": {
- "$ref": "#/definitions/kubernetes_ResourceRequirements",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
- },
- "rollingParams": {
- "$ref": "#/definitions/os_deploy_RollingDeploymentStrategyParams",
- "javaType": "io.fabric8.openshift.api.model.RollingDeploymentStrategyParams"
- },
- "type": {
- "type": "string",
- "description": "the name of a deployment strategy"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentStrategy"
- },
- "os_deploy_DeploymentTriggerImageChangeParams": {
- "type": "object",
- "description": "",
- "properties": {
- "automatic": {
- "type": "boolean",
- "description": "whether detection of a new tag value should trigger a deployment"
- },
- "containerNames": {
- "type": "array",
- "description": "restricts tag updates to a set of container names in the pod",
- "items": {
- "type": "string",
- "description": "restricts tag updates to a set of container names in the pod"
- }
- },
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "lastTriggeredImage": {
- "type": "string",
- "description": "the last image to be triggered"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerImageChangeParams"
- },
- "os_deploy_DeploymentTriggerPolicy": {
- "type": "object",
- "description": "",
- "properties": {
- "imageChangeParams": {
- "$ref": "#/definitions/os_deploy_DeploymentTriggerImageChangeParams",
- "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerImageChangeParams"
- },
- "type": {
- "type": "string",
- "description": "the type of the trigger"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerPolicy"
- },
- "os_deploy_ExecNewPodHook": {
- "type": "object",
- "description": "",
- "properties": {
- "command": {
- "type": "array",
- "description": "the hook command and its arguments",
- "items": {
- "type": "string",
- "description": "the hook command and its arguments"
- }
- },
- "containerName": {
- "type": "string",
- "description": "the name of a container from the pod template whose image will be used for the hook container"
- },
- "env": {
- "type": "array",
- "description": "environment variables provided to the hook container",
- "items": {
- "$ref": "#/definitions/kubernetes_EnvVar",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ExecNewPodHook"
- },
- "os_deploy_LifecycleHook": {
- "type": "object",
- "description": "",
- "properties": {
- "execNewPod": {
- "$ref": "#/definitions/os_deploy_ExecNewPodHook",
- "javaType": "io.fabric8.openshift.api.model.ExecNewPodHook"
- },
- "failurePolicy": {
- "type": "string",
- "description": "what action to take if the hook fails"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
- },
- "os_deploy_RecreateDeploymentStrategyParams": {
- "type": "object",
- "description": "",
- "properties": {
- "post": {
- "$ref": "#/definitions/os_deploy_LifecycleHook",
- "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
- },
- "pre": {
- "$ref": "#/definitions/os_deploy_LifecycleHook",
- "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RecreateDeploymentStrategyParams"
- },
- "os_deploy_RollingDeploymentStrategyParams": {
- "type": "object",
- "description": "",
- "properties": {
- "intervalSeconds": {
- "type": "integer",
- "description": "the time to wait between polling deployment status after update",
- "javaType": "Long"
- },
- "post": {
- "$ref": "#/definitions/os_deploy_LifecycleHook",
- "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
- },
- "pre": {
- "$ref": "#/definitions/os_deploy_LifecycleHook",
- "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
- },
- "timeoutSeconds": {
- "type": "integer",
- "description": "the time to wait for updates before giving up",
- "javaType": "Long"
- },
- "updatePercent": {
- "type": "integer",
- "description": "the percentage of replicas to scale up or down each interval (negative value switches scale order to down/up instead of up/down)"
- },
- "updatePeriodSeconds": {
- "type": "integer",
- "description": "the time to wait between individual pod updates",
- "javaType": "Long"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RollingDeploymentStrategyParams"
- },
- "os_image_Image": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "dockerImageManifest": {
- "type": "string",
- "description": "raw JSON of the manifest"
- },
- "dockerImageMetadata": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- },
- "dockerImageMetadataVersion": {
- "type": "string",
- "description": "conveys version of the object"
- },
- "dockerImageReference": {
- "type": "string",
- "description": "string that can be used to pull this image"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Image",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Image",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_image_ImageList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of image objects",
- "items": {
- "$ref": "#/definitions/os_image_Image",
- "javaType": "io.fabric8.openshift.api.model.Image"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ImageList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ImageList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_image_ImageStream": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ImageStream",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/os_image_ImageStreamSpec",
- "javaType": "io.fabric8.openshift.api.model.ImageStreamSpec"
- },
- "status": {
- "$ref": "#/definitions/os_image_ImageStreamStatus",
- "javaType": "io.fabric8.openshift.api.model.ImageStreamStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ImageStream",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_image_ImageStreamList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of image stream objects",
- "items": {
- "$ref": "#/definitions/os_image_ImageStream",
- "javaType": "io.fabric8.openshift.api.model.ImageStream"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ImageStreamList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ImageStreamList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_image_ImageStreamSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "dockerImageRepository": {
- "type": "string",
- "description": "optional field if specified this stream is backed by a Docker repository on this server"
- },
- "tags": {
- "type": "array",
- "description": "map arbitrary string values to specific image locators",
- "items": {
- "$ref": "#/definitions/os_image_NamedTagReference",
- "javaType": "io.fabric8.openshift.api.model.NamedTagReference"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ImageStreamSpec"
- },
- "os_image_ImageStreamStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "dockerImageRepository": {
- "type": "string",
- "description": "represents the effective location this stream may be accessed at"
- },
- "tags": {
- "type": "array",
- "description": "historical record of images associated with each tag",
- "items": {
- "$ref": "#/definitions/os_image_NamedTagEventList",
- "javaType": "io.fabric8.openshift.api.model.NamedTagEventList"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ImageStreamStatus"
- },
- "os_image_NamedTagEventList": {
- "type": "object",
- "description": "",
- "properties": {
- "items": {
- "type": "array",
- "description": "list of tag events related to the tag",
- "items": {
- "$ref": "#/definitions/os_image_TagEvent",
- "javaType": "io.fabric8.openshift.api.model.TagEvent"
- }
- },
- "tag": {
- "type": "string",
- "description": "the tag"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.NamedTagEventList"
- },
- "os_image_NamedTagReference": {
- "type": "object",
- "description": "",
- "properties": {
- "annotations": {
- "type": "object",
- "description": "annotations associated with images using this tag",
- "additionalProperties": {
- "type": "string",
- "description": "annotations associated with images using this tag"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "from": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- },
- "name": {
- "type": "string",
- "description": "name of tag"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.NamedTagReference"
- },
- "os_image_TagEvent": {
- "type": "object",
- "description": "",
- "properties": {
- "created": {
- "type": "string",
- "description": "when the event was created"
- },
- "dockerImageReference": {
- "type": "string",
- "description": "the string that can be used to pull this image"
- },
- "image": {
- "type": "string",
- "description": "the image"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.TagEvent"
- },
- "os_oauth_OAuthAccessToken": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "authorizeToken": {
- "type": "string",
- "description": "contains the token that authorized this token"
- },
- "clientName": {
- "type": "string",
- "description": "references the client that created this token"
- },
- "expiresIn": {
- "type": "integer",
- "description": "is the seconds from creation time before this token expires",
- "javaType": "Long"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthAccessToken",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "redirectURI": {
- "type": "string",
- "description": "redirection URI associated with the token"
- },
- "refreshToken": {
- "type": "string",
- "description": "optional value by which this token can be renewed"
- },
- "scopes": {
- "type": "array",
- "description": "list of requested scopes",
- "items": {
- "type": "string",
- "description": "list of requested scopes"
- }
- },
- "userName": {
- "type": "string",
- "description": "user name associated with this token"
- },
- "userUID": {
- "type": "string",
- "description": "unique UID associated with this token"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthAccessToken",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_oauth_OAuthAccessTokenList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of oauth access tokens",
- "items": {
- "$ref": "#/definitions/os_oauth_OAuthAccessToken",
- "javaType": "io.fabric8.openshift.api.model.OAuthAccessToken"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthAccessTokenList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthAccessTokenList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_oauth_OAuthAuthorizeToken": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "clientName": {
- "type": "string",
- "description": "references the client that created this token"
- },
- "expiresIn": {
- "type": "integer",
- "description": "seconds from creation time before this token expires",
- "javaType": "Long"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthAuthorizeToken",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "redirectURI": {
- "type": "string",
- "description": "redirection URI associated with the token"
- },
- "scopes": {
- "type": "array",
- "description": "list of requested scopes",
- "items": {
- "type": "string",
- "description": "list of requested scopes"
- }
- },
- "state": {
- "type": "string",
- "description": "state data from request"
- },
- "userName": {
- "type": "string",
- "description": "user name associated with this token"
- },
- "userUID": {
- "type": "string",
- "description": "unique UID associated with this token. userUID and userName must both match for this token to be valid"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_oauth_OAuthAuthorizeTokenList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of oauth authorization tokens",
- "items": {
- "$ref": "#/definitions/os_oauth_OAuthAuthorizeToken",
- "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthAuthorizeTokenList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeTokenList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_oauth_OAuthClient": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthClient",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "redirectURIs": {
- "type": "array",
- "description": "valid redirection URIs associated with a client",
- "items": {
- "type": "string",
- "description": "valid redirection URIs associated with a client"
- }
- },
- "respondWithChallenges": {
- "type": "boolean",
- "description": "indicates whether the client wants authentication needed responses made in the form of challenges instead of redirects"
- },
- "secret": {
- "type": "string",
- "description": "unique secret associated with a client"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthClient",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_oauth_OAuthClientAuthorization": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "clientName": {
- "type": "string",
- "description": "references the client that created this authorization"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthClientAuthorization",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "scopes": {
- "type": "array",
- "description": "list of granted scopes",
- "items": {
- "type": "string",
- "description": "list of granted scopes"
- }
- },
- "userName": {
- "type": "string",
- "description": "user name that authorized this client"
- },
- "userUID": {
- "type": "string",
- "description": "unique UID associated with this authorization. userUID and userName must both match for this authorization to be valid"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_oauth_OAuthClientAuthorizationList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of oauth client authorizations",
- "items": {
- "$ref": "#/definitions/os_oauth_OAuthClientAuthorization",
- "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthClientAuthorizationList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorizationList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_oauth_OAuthClientList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of oauth clients",
- "items": {
- "$ref": "#/definitions/os_oauth_OAuthClient",
- "javaType": "io.fabric8.openshift.api.model.OAuthClient"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "OAuthClientList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.OAuthClientList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_project_Project": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Project",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/os_project_ProjectSpec",
- "javaType": "io.fabric8.openshift.api.model.ProjectSpec"
- },
- "status": {
- "$ref": "#/definitions/os_project_ProjectStatus",
- "javaType": "io.fabric8.openshift.api.model.ProjectStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Project",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_project_ProjectList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of projects",
- "items": {
- "$ref": "#/definitions/os_project_Project",
- "javaType": "io.fabric8.openshift.api.model.Project"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ProjectList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ProjectList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_project_ProjectRequest": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "description": {
- "type": "string",
- "description": "description to apply to a project"
- },
- "displayName": {
- "type": "string",
- "description": "display name to apply to a project"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "ProjectRequest",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ProjectRequest",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_project_ProjectSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "finalizers": {
- "type": "array",
- "description": "an opaque list of values that must be empty to permanently remove object from storage",
- "items": {
- "type": "string",
- "description": "an opaque list of values that must be empty to permanently remove object from storage"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ProjectSpec"
- },
- "os_project_ProjectStatus": {
- "type": "object",
- "description": "",
- "properties": {
- "phase": {
- "type": "string",
- "description": "phase is the current lifecycle phase of the project"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.ProjectStatus"
- },
- "os_route_Route": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Route",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "spec": {
- "$ref": "#/definitions/os_route_RouteSpec",
- "javaType": "io.fabric8.openshift.api.model.RouteSpec"
- },
- "status": {
- "$ref": "#/definitions/os_route_RouteStatus",
- "javaType": "io.fabric8.openshift.api.model.RouteStatus"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Route",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_route_RouteList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of routes",
- "items": {
- "$ref": "#/definitions/os_route_Route",
- "javaType": "io.fabric8.openshift.api.model.Route"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "RouteList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RouteList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_route_RouteSpec": {
- "type": "object",
- "description": "",
- "properties": {
- "host": {
- "type": "string",
- "description": "optional: alias/dns that points to the service"
- },
- "path": {
- "type": "string",
- "description": "optional: path that the router watches to route traffic to the service"
- },
- "tls": {
- "$ref": "#/definitions/os_route_TLSConfig",
- "javaType": "io.fabric8.openshift.api.model.TLSConfig"
- },
- "to": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RouteSpec"
- },
- "os_route_RouteStatus": {
- "type": "object",
- "description": "",
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.RouteStatus"
- },
- "os_route_TLSConfig": {
- "type": "object",
- "description": "",
- "properties": {
- "caCertificate": {
- "type": "string",
- "description": "provides the cert authority certificate contents"
- },
- "certificate": {
- "type": "string",
- "description": "provides certificate contents"
- },
- "destinationCACertificate": {
- "type": "string",
- "description": "provides the contents of the ca certificate of the final destination. When using re-encrypt termination this file should be provided in order to have routers use it for health checks on the secure connection"
- },
- "key": {
- "type": "string",
- "description": "provides key file contents"
- },
- "termination": {
- "type": "string",
- "description": "indicates termination type. if not set"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.TLSConfig"
- },
- "os_template_Parameter": {
- "type": "object",
- "description": "",
- "properties": {
- "description": {
- "type": "string",
- "description": "optional: describes the parameter"
- },
- "from": {
- "type": "string",
- "description": "input value for the generator"
- },
- "generate": {
- "type": "string",
- "description": "optional: generate specifies the generator to be used to generate random string from an input value specified by the from field. the result string is stored in the value field. if not specified"
- },
- "name": {
- "type": "string",
- "description": "name of the parameter"
- },
- "required": {
- "type": "boolean",
- "description": "indicates the parameter must have a non-empty value or be generated"
- },
- "value": {
- "type": "string",
- "description": "optional: holds the parameter data. if specified"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Parameter"
- },
- "os_template_Template": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Template",
- "required": true
- },
- "labels": {
- "type": "object",
- "description": "optional: list of lables that are applied to every object during the template to config transformation",
- "additionalProperties": {
- "type": "string",
- "description": "optional: list of lables that are applied to every object during the template to config transformation"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "objects": {
- "type": "array",
- "description": "list of objects to include in the template",
- "items": {
- "$ref": "#/definitions/kubernetes_runtime_RawExtension",
- "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
- }
- },
- "parameters": {
- "type": "array",
- "description": "optional: list of parameters used during template to config transformation",
- "items": {
- "$ref": "#/definitions/os_template_Parameter",
- "javaType": "io.fabric8.openshift.api.model.Parameter"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Template",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_template_TemplateList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of templates",
- "items": {
- "$ref": "#/definitions/os_template_Template",
- "javaType": "io.fabric8.openshift.api.model.Template"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "TemplateList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.TemplateList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_user_Group": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Group",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "users": {
- "type": "array",
- "description": "list of users in this group",
- "items": {
- "type": "string",
- "description": "list of users in this group"
- }
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Group",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_user_GroupList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of groups",
- "items": {
- "$ref": "#/definitions/os_user_Group",
- "javaType": "io.fabric8.openshift.api.model.Group"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "GroupList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.GroupList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_user_Identity": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "extra": {
- "type": "object",
- "description": "extra information for this identity",
- "additionalProperties": {
- "type": "string",
- "description": "extra information for this identity"
- },
- "javaType": "java.util.Map\u003cString,String\u003e"
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "Identity",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "providerName": {
- "type": "string",
- "description": "source of identity information"
- },
- "providerUserName": {
- "type": "string",
- "description": "uniquely represents this identity in the scope of the provider"
- },
- "user": {
- "$ref": "#/definitions/kubernetes_ObjectReference",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Identity",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_user_IdentityList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of identities",
- "items": {
- "$ref": "#/definitions/os_user_Identity",
- "javaType": "io.fabric8.openshift.api.model.Identity"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "IdentityList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.IdentityList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "os_user_User": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "fullName": {
- "type": "string",
- "description": "full name of user"
- },
- "groups": {
- "type": "array",
- "description": "list of groups",
- "items": {
- "type": "string",
- "description": "list of groups"
- }
- },
- "identities": {
- "type": "array",
- "description": "list of identities",
- "items": {
- "type": "string",
- "description": "list of identities"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "User",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.User",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.HasMetadata"
- ]
- },
- "os_user_UserList": {
- "type": "object",
- "description": "",
- "properties": {
- "apiVersion": {
- "type": "string",
- "description": "",
- "default": "v1",
- "required": true,
- "enum": [
- "v1"
- ]
- },
- "items": {
- "type": "array",
- "description": "list of users",
- "items": {
- "$ref": "#/definitions/os_user_User",
- "javaType": "io.fabric8.openshift.api.model.User"
- }
- },
- "kind": {
- "type": "string",
- "description": "",
- "default": "UserList",
- "required": true
- },
- "metadata": {
- "$ref": "#/definitions/kubernetes_ListMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
- }
- },
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.UserList",
- "javaInterfaces": [
- "io.fabric8.kubernetes.api.model.KubernetesResource",
- "io.fabric8.kubernetes.api.model.KubernetesResourceList"
- ]
- },
- "speter_inf_Dec": {
- "type": "object",
- "description": "",
- "additionalProperties": true,
- "javaType": "io.fabric8.openshift.api.model.Dec"
- }
- },
- "type": "object",
- "properties": {
- "BaseKubernetesList": {
- "$ref": "#/definitions/kubernetes_List",
- "javaType": "io.fabric8.kubernetes.api.model.BaseKubernetesList"
- },
- "BuildConfigList": {
- "$ref": "#/definitions/os_build_BuildConfigList",
- "javaType": "io.fabric8.openshift.api.model.BuildConfigList"
- },
- "BuildList": {
- "$ref": "#/definitions/os_build_BuildList",
- "javaType": "io.fabric8.openshift.api.model.BuildList"
- },
- "BuildRequest": {
- "$ref": "#/definitions/os_build_BuildRequest",
- "javaType": "io.fabric8.openshift.api.model.BuildRequest"
- },
- "ClusterPolicy": {
- "$ref": "#/definitions/os_authorization_ClusterPolicy",
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicy"
- },
- "ClusterPolicyBinding": {
- "$ref": "#/definitions/os_authorization_ClusterPolicyBinding",
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding"
- },
- "ClusterPolicyBindingList": {
- "$ref": "#/definitions/os_authorization_ClusterPolicyBindingList",
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBindingList"
- },
- "ClusterPolicyList": {
- "$ref": "#/definitions/os_authorization_ClusterPolicyList",
- "javaType": "io.fabric8.openshift.api.model.ClusterPolicyList"
- },
- "ClusterRoleBinding": {
- "$ref": "#/definitions/os_authorization_ClusterRoleBinding",
- "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
- },
- "ClusterRoleBindingList": {
- "$ref": "#/definitions/os_authorization_ClusterRoleBindingList",
- "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList"
- },
- "Config": {
- "$ref": "#/definitions/kubernetes_config_Config",
- "javaType": "io.fabric8.kubernetes.api.model.Config"
- },
- "ContainerStatus": {
- "$ref": "#/definitions/kubernetes_ContainerStatus",
- "javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
- },
- "DeploymentConfigList": {
- "$ref": "#/definitions/os_deploy_DeploymentConfigList",
- "javaType": "io.fabric8.openshift.api.model.DeploymentConfigList"
- },
- "Endpoints": {
- "$ref": "#/definitions/kubernetes_Endpoints",
- "javaType": "io.fabric8.kubernetes.api.model.Endpoints"
- },
- "EndpointsList": {
- "$ref": "#/definitions/kubernetes_EndpointsList",
- "javaType": "io.fabric8.kubernetes.api.model.EndpointsList"
- },
- "EnvVar": {
- "$ref": "#/definitions/kubernetes_EnvVar",
- "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
- },
- "EventList": {
- "$ref": "#/definitions/kubernetes_EventList",
- "javaType": "io.fabric8.kubernetes.api.model.EventList"
- },
- "Group": {
- "$ref": "#/definitions/os_user_Group",
- "javaType": "io.fabric8.openshift.api.model.Group"
- },
- "GroupList": {
- "$ref": "#/definitions/os_user_GroupList",
- "javaType": "io.fabric8.openshift.api.model.GroupList"
- },
- "Identity": {
- "$ref": "#/definitions/os_user_Identity",
- "javaType": "io.fabric8.openshift.api.model.Identity"
- },
- "IdentityList": {
- "$ref": "#/definitions/os_user_IdentityList",
- "javaType": "io.fabric8.openshift.api.model.IdentityList"
- },
- "ImageList": {
- "$ref": "#/definitions/os_image_ImageList",
- "javaType": "io.fabric8.openshift.api.model.ImageList"
- },
- "ImageStreamList": {
- "$ref": "#/definitions/os_image_ImageStreamList",
- "javaType": "io.fabric8.openshift.api.model.ImageStreamList"
- },
- "LocalSubjectAccessReview": {
- "$ref": "#/definitions/os_authorization_LocalSubjectAccessReview",
- "javaType": "io.fabric8.openshift.api.model.LocalSubjectAccessReview"
- },
- "Namespace": {
- "$ref": "#/definitions/kubernetes_Namespace",
- "javaType": "io.fabric8.kubernetes.api.model.Namespace"
- },
- "NamespaceList": {
- "$ref": "#/definitions/kubernetes_NamespaceList",
- "javaType": "io.fabric8.kubernetes.api.model.NamespaceList"
- },
- "Node": {
- "$ref": "#/definitions/kubernetes_Node",
- "javaType": "io.fabric8.kubernetes.api.model.Node"
- },
- "NodeList": {
- "$ref": "#/definitions/kubernetes_NodeList",
- "javaType": "io.fabric8.kubernetes.api.model.NodeList"
- },
- "OAuthAccessToken": {
- "$ref": "#/definitions/os_oauth_OAuthAccessToken",
- "javaType": "io.fabric8.openshift.api.model.OAuthAccessToken"
- },
- "OAuthAccessTokenList": {
- "$ref": "#/definitions/os_oauth_OAuthAccessTokenList",
- "javaType": "io.fabric8.openshift.api.model.OAuthAccessTokenList"
- },
- "OAuthAuthorizeToken": {
- "$ref": "#/definitions/os_oauth_OAuthAuthorizeToken",
- "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken"
- },
- "OAuthAuthorizeTokenList": {
- "$ref": "#/definitions/os_oauth_OAuthAuthorizeTokenList",
- "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeTokenList"
- },
- "OAuthClient": {
- "$ref": "#/definitions/os_oauth_OAuthClient",
- "javaType": "io.fabric8.openshift.api.model.OAuthClient"
- },
- "OAuthClientAuthorization": {
- "$ref": "#/definitions/os_oauth_OAuthClientAuthorization",
- "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization"
- },
- "OAuthClientAuthorizationList": {
- "$ref": "#/definitions/os_oauth_OAuthClientAuthorizationList",
- "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorizationList"
- },
- "OAuthClientList": {
- "$ref": "#/definitions/os_oauth_OAuthClientList",
- "javaType": "io.fabric8.openshift.api.model.OAuthClientList"
- },
- "ObjectMeta": {
- "$ref": "#/definitions/kubernetes_ObjectMeta",
- "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
- },
- "PersistentVolume": {
- "$ref": "#/definitions/kubernetes_PersistentVolume",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolume"
- },
- "PersistentVolumeClaim": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeClaim",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim"
- },
- "PersistentVolumeClaimList": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeClaimList",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimList"
- },
- "PersistentVolumeList": {
- "$ref": "#/definitions/kubernetes_PersistentVolumeList",
- "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeList"
- },
- "PodList": {
- "$ref": "#/definitions/kubernetes_PodList",
- "javaType": "io.fabric8.kubernetes.api.model.PodList"
- },
- "Policy": {
- "$ref": "#/definitions/os_authorization_Policy",
- "javaType": "io.fabric8.openshift.api.model.Policy"
- },
- "PolicyBinding": {
- "$ref": "#/definitions/os_authorization_PolicyBinding",
- "javaType": "io.fabric8.openshift.api.model.PolicyBinding"
- },
- "PolicyBindingList": {
- "$ref": "#/definitions/os_authorization_PolicyBindingList",
- "javaType": "io.fabric8.openshift.api.model.PolicyBindingList"
- },
- "PolicyList": {
- "$ref": "#/definitions/os_authorization_PolicyList",
- "javaType": "io.fabric8.openshift.api.model.PolicyList"
- },
- "Project": {
- "$ref": "#/definitions/os_project_Project",
- "javaType": "io.fabric8.openshift.api.model.Project"
- },
- "ProjectList": {
- "$ref": "#/definitions/os_project_ProjectList",
- "javaType": "io.fabric8.openshift.api.model.ProjectList"
- },
- "ProjectRequest": {
- "$ref": "#/definitions/os_project_ProjectRequest",
- "javaType": "io.fabric8.openshift.api.model.ProjectRequest"
- },
- "Quantity": {
- "$ref": "#/definitions/kubernetes_resource_Quantity",
- "javaType": "io.fabric8.kubernetes.api.model.Quantity"
- },
- "ReplicationControllerList": {
- "$ref": "#/definitions/kubernetes_ReplicationControllerList",
- "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerList"
- },
- "ResourceQuota": {
- "$ref": "#/definitions/kubernetes_ResourceQuota",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuota"
- },
- "ResourceQuotaList": {
- "$ref": "#/definitions/kubernetes_ResourceQuotaList",
- "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaList"
- },
- "Role": {
- "$ref": "#/definitions/os_authorization_Role",
- "javaType": "io.fabric8.openshift.api.model.Role"
- },
- "RoleBinding": {
- "$ref": "#/definitions/os_authorization_RoleBinding",
- "javaType": "io.fabric8.openshift.api.model.RoleBinding"
- },
- "RoleBindingList": {
- "$ref": "#/definitions/os_authorization_RoleBindingList",
- "javaType": "io.fabric8.openshift.api.model.RoleBindingList"
- },
- "RoleList": {
- "$ref": "#/definitions/os_authorization_RoleList",
- "javaType": "io.fabric8.openshift.api.model.RoleList"
- },
- "RootPaths": {
- "$ref": "#/definitions/api_RootPaths",
- "javaType": "io.fabric8.kubernetes.api.model.RootPaths"
- },
- "RouteList": {
- "$ref": "#/definitions/os_route_RouteList",
- "javaType": "io.fabric8.openshift.api.model.RouteList"
- },
- "Secret": {
- "$ref": "#/definitions/kubernetes_Secret",
- "javaType": "io.fabric8.kubernetes.api.model.Secret"
- },
- "SecretList": {
- "$ref": "#/definitions/kubernetes_SecretList",
- "javaType": "io.fabric8.kubernetes.api.model.SecretList"
- },
- "SecurityContextConstraints": {
- "$ref": "#/definitions/kubernetes_SecurityContextConstraints",
- "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints"
- },
- "SecurityContextConstraintsList": {
- "$ref": "#/definitions/kubernetes_SecurityContextConstraintsList",
- "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraintsList"
- },
- "ServiceAccount": {
- "$ref": "#/definitions/kubernetes_ServiceAccount",
- "javaType": "io.fabric8.kubernetes.api.model.ServiceAccount"
- },
- "ServiceAccountList": {
- "$ref": "#/definitions/kubernetes_ServiceAccountList",
- "javaType": "io.fabric8.kubernetes.api.model.ServiceAccountList"
- },
- "ServiceList": {
- "$ref": "#/definitions/kubernetes_ServiceList",
- "javaType": "io.fabric8.kubernetes.api.model.ServiceList"
- },
- "Status": {
- "$ref": "#/definitions/kubernetes_Status",
- "javaType": "io.fabric8.kubernetes.api.model.Status"
- },
- "SubjectAccessReview": {
- "$ref": "#/definitions/os_authorization_SubjectAccessReview",
- "javaType": "io.fabric8.openshift.api.model.SubjectAccessReview"
- },
- "SubjectAccessReviewResponse": {
- "$ref": "#/definitions/os_authorization_SubjectAccessReviewResponse",
- "javaType": "io.fabric8.openshift.api.model.SubjectAccessReviewResponse"
- },
- "TagEvent": {
- "$ref": "#/definitions/os_image_TagEvent",
- "javaType": "io.fabric8.openshift.api.model.TagEvent"
- },
- "Template": {
- "$ref": "#/definitions/os_template_Template",
- "javaType": "io.fabric8.openshift.api.model.Template"
- },
- "TemplateList": {
- "$ref": "#/definitions/os_template_TemplateList",
- "javaType": "io.fabric8.openshift.api.model.TemplateList"
- },
- "User": {
- "$ref": "#/definitions/os_user_User",
- "javaType": "io.fabric8.openshift.api.model.User"
- },
- "UserList": {
- "$ref": "#/definitions/os_user_UserList",
- "javaType": "io.fabric8.openshift.api.model.UserList"
- },
- "WatchEvent": {
- "$ref": "#/definitions/kubernetes_watch_WatchEvent",
- "javaType": "io.fabric8.kubernetes.api.model.WatchEvent"
- }
- },
- "additionalProperties": true
- }
-
-
+///
+
+module Kubernetes {
+
+ export var schema =
+ {
+ "id": "http://fabric8.io/fabric8/v2/Schema#",
+ "$schema": "http://json-schema.org/schema#",
+ "definitions": {
+ "api_RootPaths": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "paths": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "type": "string",
+ "description": ""
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.RootPaths"
+ },
+ "kubernetes_AWSElasticBlockStoreVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "fsType": {
+ "type": "string",
+ "description": "file system type to mount"
+ },
+ "partition": {
+ "type": "integer",
+ "description": "partition on the disk to mount (e.g."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "read-only if true"
+ },
+ "volumeID": {
+ "type": "string",
+ "description": "unique id of the PD resource in AWS; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
+ },
+ "kubernetes_Capabilities": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "add": {
+ "type": "array",
+ "description": "added capabilities",
+ "items": {
+ "type": "string",
+ "description": "added capabilities"
+ }
+ },
+ "drop": {
+ "type": "array",
+ "description": "droped capabilities",
+ "items": {
+ "type": "string",
+ "description": "droped capabilities"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Capabilities"
+ },
+ "kubernetes_CephFSVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "monitors": {
+ "type": "array",
+ "description": "a collection of Ceph monitors",
+ "items": {
+ "type": "string",
+ "description": "a collection of Ceph monitors"
+ }
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Ceph fs to be mounted with read-only permissions"
+ },
+ "secretFile": {
+ "type": "string",
+ "description": "path to secret for rados user; default is /etc/ceph/user.secret; optional"
+ },
+ "secretRef": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ },
+ "user": {
+ "type": "string",
+ "description": "rados user name; default is admin; optional"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
+ },
+ "kubernetes_Container": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "args": {
+ "type": "array",
+ "description": "command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved",
+ "items": {
+ "type": "string",
+ "description": "command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved"
+ }
+ },
+ "command": {
+ "type": "array",
+ "description": "entrypoint array; not executed within a shell; the docker image's entrypoint is used if this is not provided; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved",
+ "items": {
+ "type": "string",
+ "description": "entrypoint array; not executed within a shell; the docker image's entrypoint is used if this is not provided; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved"
+ }
+ },
+ "env": {
+ "type": "array",
+ "description": "list of environment variables to set in the container; cannot be updated",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EnvVar",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ }
+ },
+ "image": {
+ "type": "string",
+ "description": "Docker image name; see http://releases.k8s.io/HEAD/docs/user-guide/images.md"
+ },
+ "imagePullPolicy": {
+ "type": "string",
+ "description": "image pull policy; one of Always"
+ },
+ "lifecycle": {
+ "$ref": "#/definitions/kubernetes_Lifecycle",
+ "javaType": "io.fabric8.kubernetes.api.model.Lifecycle"
+ },
+ "livenessProbe": {
+ "$ref": "#/definitions/kubernetes_Probe",
+ "javaType": "io.fabric8.kubernetes.api.model.Probe"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated",
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
+ },
+ "ports": {
+ "type": "array",
+ "description": "list of ports to expose from the container; cannot be updated",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ContainerPort",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerPort"
+ }
+ },
+ "readinessProbe": {
+ "$ref": "#/definitions/kubernetes_Probe",
+ "javaType": "io.fabric8.kubernetes.api.model.Probe"
+ },
+ "resources": {
+ "$ref": "#/definitions/kubernetes_ResourceRequirements",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
+ },
+ "securityContext": {
+ "$ref": "#/definitions/kubernetes_SecurityContext",
+ "javaType": "io.fabric8.kubernetes.api.model.SecurityContext"
+ },
+ "stdin": {
+ "type": "boolean",
+ "description": "Whether this container should allocate a buffer for stdin in the container runtime; default is false"
+ },
+ "terminationMessagePath": {
+ "type": "string",
+ "description": "path at which the file to which the container's termination message will be written is mounted into the container's filesystem; message written is intended to be brief final status"
+ },
+ "tty": {
+ "type": "boolean",
+ "description": "Whether this container should allocate a TTY for itself"
+ },
+ "volumeMounts": {
+ "type": "array",
+ "description": "pod volumes to mount into the container's filesyste; cannot be updated",
+ "items": {
+ "$ref": "#/definitions/kubernetes_VolumeMount",
+ "javaType": "io.fabric8.kubernetes.api.model.VolumeMount"
+ }
+ },
+ "workingDir": {
+ "type": "string",
+ "description": "container's working directory; defaults to image's default; cannot be updated"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Container"
+ },
+ "kubernetes_ContainerPort": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "containerPort": {
+ "type": "integer",
+ "description": "number of port to expose on the pod's IP address"
+ },
+ "hostIP": {
+ "type": "string",
+ "description": "host IP to bind the port to"
+ },
+ "hostPort": {
+ "type": "integer",
+ "description": "number of port to expose on the host; most containers do not need this"
+ },
+ "name": {
+ "type": "string",
+ "description": "name for the port that can be referred to by services; must be an IANA_SVC_NAME and unique within the pod"
+ },
+ "protocol": {
+ "type": "string",
+ "description": "protocol for port; must be UDP or TCP; TCP if unspecified"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerPort"
+ },
+ "kubernetes_ContainerState": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "running": {
+ "$ref": "#/definitions/kubernetes_ContainerStateRunning",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStateRunning"
+ },
+ "terminated": {
+ "$ref": "#/definitions/kubernetes_ContainerStateTerminated",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStateTerminated"
+ },
+ "waiting": {
+ "$ref": "#/definitions/kubernetes_ContainerStateWaiting",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStateWaiting"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerState"
+ },
+ "kubernetes_ContainerStateRunning": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "startedAt": {
+ "type": "string",
+ "description": "time at which the container was last (re-)started"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStateRunning"
+ },
+ "kubernetes_ContainerStateTerminated": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "containerID": {
+ "type": "string",
+ "description": "container's ID in the format 'docker://\u003ccontainer_id\u003e'"
+ },
+ "exitCode": {
+ "type": "integer",
+ "description": "exit status from the last termination of the container"
+ },
+ "finishedAt": {
+ "type": "string",
+ "description": "time at which the container last terminated"
+ },
+ "message": {
+ "type": "string",
+ "description": "message regarding the last termination of the container"
+ },
+ "reason": {
+ "type": "string",
+ "description": "(brief) reason from the last termination of the container"
+ },
+ "signal": {
+ "type": "integer",
+ "description": "signal from the last termination of the container"
+ },
+ "startedAt": {
+ "type": "string",
+ "description": "time at which previous execution of the container started"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStateTerminated"
+ },
+ "kubernetes_ContainerStateWaiting": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "reason": {
+ "type": "string",
+ "description": "(brief) reason the container is not yet running"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStateWaiting"
+ },
+ "kubernetes_ContainerStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "containerID": {
+ "type": "string",
+ "description": "container's ID in the format 'docker://\u003ccontainer_id\u003e'; see http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information"
+ },
+ "image": {
+ "type": "string",
+ "description": "image of the container; see http://releases.k8s.io/HEAD/docs/user-guide/images.md"
+ },
+ "imageID": {
+ "type": "string",
+ "description": "ID of the container's image"
+ },
+ "lastState": {
+ "$ref": "#/definitions/kubernetes_ContainerState",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerState"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated",
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
+ },
+ "ready": {
+ "type": "boolean",
+ "description": "specifies whether the container has passed its readiness probe"
+ },
+ "restartCount": {
+ "type": "integer",
+ "description": "the number of times the container has been restarted"
+ },
+ "state": {
+ "$ref": "#/definitions/kubernetes_ContainerState",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerState"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
+ },
+ "kubernetes_EmptyDirVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "medium": {
+ "type": "string",
+ "description": "type of storage used to back the volume; must be an empty string (default) or Memory; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
+ },
+ "kubernetes_EndpointAddress": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "ip": {
+ "type": "string",
+ "description": "IP address of the endpoint"
+ },
+ "targetRef": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointAddress"
+ },
+ "kubernetes_EndpointPort": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of this port",
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
+ },
+ "port": {
+ "type": "integer",
+ "description": "port number of the endpoint"
+ },
+ "protocol": {
+ "type": "string",
+ "description": "protocol for this port; must be UDP or TCP; TCP if unspecified"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointPort"
+ },
+ "kubernetes_EndpointSubset": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "addresses": {
+ "type": "array",
+ "description": "IP addresses which offer the related ports",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EndpointAddress",
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointAddress"
+ }
+ },
+ "ports": {
+ "type": "array",
+ "description": "port numbers available on the related IP addresses",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EndpointPort",
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointPort"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointSubset"
+ },
+ "kubernetes_Endpoints": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Endpoints",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "subsets": {
+ "type": "array",
+ "description": "sets of addresses and ports that comprise a service",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EndpointSubset",
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointSubset"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Endpoints",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_EndpointsList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of endpoints",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Endpoints",
+ "javaType": "io.fabric8.kubernetes.api.model.Endpoints"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "EndpointsList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointsList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_EnvVar": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of the environment variable; must be a C_IDENTIFIER",
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
+ },
+ "value": {
+ "type": "string",
+ "description": "value of the environment variable; defaults to empty string; variable references $(VAR_NAME) are expanded using the previously defined environment varibles in the container and any service environment variables; if a variable cannot be resolved"
+ },
+ "valueFrom": {
+ "$ref": "#/definitions/kubernetes_EnvVarSource",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVarSource"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ },
+ "kubernetes_EnvVarSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "fieldRef": {
+ "$ref": "#/definitions/kubernetes_ObjectFieldSelector",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVarSource"
+ },
+ "kubernetes_Event": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "count": {
+ "type": "integer",
+ "description": "the number of times this event has occurred"
+ },
+ "firstTimestamp": {
+ "type": "string",
+ "description": "the time at which the event was first recorded"
+ },
+ "involvedObject": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Event",
+ "required": true
+ },
+ "lastTimestamp": {
+ "type": "string",
+ "description": "the time at which the most recent occurrence of this event was recorded"
+ },
+ "message": {
+ "type": "string",
+ "description": "human-readable description of the status of this operation"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "reason": {
+ "type": "string",
+ "description": "short"
+ },
+ "source": {
+ "$ref": "#/definitions/kubernetes_EventSource",
+ "javaType": "io.fabric8.kubernetes.api.model.EventSource"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Event",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_EventList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of events",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Event",
+ "javaType": "io.fabric8.kubernetes.api.model.Event"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "EventList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EventList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_EventSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "component": {
+ "type": "string",
+ "description": "component that generated the event"
+ },
+ "host": {
+ "type": "string",
+ "description": "name of the host where the event is generated"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.EventSource"
+ },
+ "kubernetes_ExecAction": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "command": {
+ "type": "array",
+ "description": "command line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd",
+ "items": {
+ "type": "string",
+ "description": "command line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ExecAction"
+ },
+ "kubernetes_GCEPersistentDiskVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "fsType": {
+ "type": "string",
+ "description": "file system type to mount"
+ },
+ "partition": {
+ "type": "integer",
+ "description": "partition on the disk to mount (e.g."
+ },
+ "pdName": {
+ "type": "string",
+ "description": "unique name of the PD resource in GCE; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "read-only if true"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
+ },
+ "kubernetes_GitRepoVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "repository": {
+ "type": "string",
+ "description": "repository URL"
+ },
+ "revision": {
+ "type": "string",
+ "description": "commit hash for the specified revision"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
+ },
+ "kubernetes_GlusterfsVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "endpoints": {
+ "type": "string",
+ "description": "gluster hosts endpoints name; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
+ },
+ "path": {
+ "type": "string",
+ "description": "path to gluster volume; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "glusterfs volume to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
+ },
+ "kubernetes_HTTPGetAction": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "host": {
+ "type": "string",
+ "description": "hostname to connect to; defaults to pod IP"
+ },
+ "path": {
+ "type": "string",
+ "description": "path to access on the HTTP server"
+ },
+ "port": {
+ "$ref": "#/definitions/kubernetes_util_IntOrString",
+ "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
+ },
+ "scheme": {
+ "type": "string",
+ "description": "scheme to connect with"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
+ },
+ "kubernetes_Handler": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "exec": {
+ "$ref": "#/definitions/kubernetes_ExecAction",
+ "javaType": "io.fabric8.kubernetes.api.model.ExecAction"
+ },
+ "httpGet": {
+ "$ref": "#/definitions/kubernetes_HTTPGetAction",
+ "javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
+ },
+ "tcpSocket": {
+ "$ref": "#/definitions/kubernetes_TCPSocketAction",
+ "javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Handler"
+ },
+ "kubernetes_HostPathVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "path": {
+ "type": "string",
+ "description": "path of the directory on the host; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
+ },
+ "kubernetes_ISCSIVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "fsType": {
+ "type": "string",
+ "description": "file system type to mount"
+ },
+ "iqn": {
+ "type": "string",
+ "description": "iSCSI Qualified Name"
+ },
+ "lun": {
+ "type": "integer",
+ "description": "iscsi target lun number"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "read-only if true"
+ },
+ "targetPortal": {
+ "type": "string",
+ "description": "iSCSI target portal"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
+ },
+ "kubernetes_Lifecycle": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "postStart": {
+ "$ref": "#/definitions/kubernetes_Handler",
+ "javaType": "io.fabric8.kubernetes.api.model.Handler"
+ },
+ "preStop": {
+ "$ref": "#/definitions/kubernetes_Handler",
+ "javaType": "io.fabric8.kubernetes.api.model.Handler"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Lifecycle"
+ },
+ "kubernetes_List": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of objects",
+ "items": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "List",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.BaseKubernetesList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_ListMeta": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "resourceVersion": {
+ "type": "string",
+ "description": "string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system"
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "URL for the object; populated by the system"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ },
+ "kubernetes_LoadBalancerIngress": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "hostname": {
+ "type": "string",
+ "description": "hostname of ingress point"
+ },
+ "ip": {
+ "type": "string",
+ "description": "IP address of ingress point"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerIngress"
+ },
+ "kubernetes_LoadBalancerStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "ingress": {
+ "type": "array",
+ "description": "load-balancer ingress points",
+ "items": {
+ "$ref": "#/definitions/kubernetes_LoadBalancerIngress",
+ "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerIngress"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerStatus"
+ },
+ "kubernetes_LocalObjectReference": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ },
+ "kubernetes_MetadataFile": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "fieldRef": {
+ "$ref": "#/definitions/kubernetes_ObjectFieldSelector",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
+ },
+ "name": {
+ "type": "string",
+ "description": "the name of the file to be created"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.MetadataFile"
+ },
+ "kubernetes_MetadataVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "list of metadata files",
+ "items": {
+ "$ref": "#/definitions/kubernetes_MetadataFile",
+ "javaType": "io.fabric8.kubernetes.api.model.MetadataFile"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
+ },
+ "kubernetes_NFSVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "path": {
+ "type": "string",
+ "description": "the path that is exported by the NFS server; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "forces the NFS export to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
+ },
+ "server": {
+ "type": "string",
+ "description": "the hostname or IP address of the NFS server; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
+ },
+ "kubernetes_Namespace": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Namespace",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_NamespaceSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.NamespaceSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_NamespaceStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.NamespaceStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Namespace",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_NamespaceList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "items is the list of Namespace objects in the list; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Namespace",
+ "javaType": "io.fabric8.kubernetes.api.model.Namespace"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "NamespaceList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NamespaceList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_NamespaceSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "finalizers": {
+ "type": "array",
+ "description": "an opaque list of values that must be empty to permanently remove object from storage; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers",
+ "items": {
+ "type": "string",
+ "description": "an opaque list of values that must be empty to permanently remove object from storage; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NamespaceSpec"
+ },
+ "kubernetes_NamespaceStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "phase": {
+ "type": "string",
+ "description": "phase is the current lifecycle phase of the namespace; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NamespaceStatus"
+ },
+ "kubernetes_Node": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Node",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_NodeSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.NodeSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_NodeStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.NodeStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Node",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_NodeAddress": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "address": {
+ "type": "string",
+ "description": "the node address"
+ },
+ "type": {
+ "type": "string",
+ "description": "node address type"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NodeAddress"
+ },
+ "kubernetes_NodeCondition": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "lastHeartbeatTime": {
+ "type": "string",
+ "description": "last time we got an update on a given condition"
+ },
+ "lastTransitionTime": {
+ "type": "string",
+ "description": "last time the condition transit from one status to another"
+ },
+ "message": {
+ "type": "string",
+ "description": "human readable message indicating details about last transition"
+ },
+ "reason": {
+ "type": "string",
+ "description": "(brief) reason for the condition's last transition"
+ },
+ "status": {
+ "type": "string",
+ "description": "status of the condition"
+ },
+ "type": {
+ "type": "string",
+ "description": "type of node condition"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NodeCondition"
+ },
+ "kubernetes_NodeList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of nodes",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Node",
+ "javaType": "io.fabric8.kubernetes.api.model.Node"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "NodeList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NodeList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_NodeSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "externalID": {
+ "type": "string",
+ "description": "deprecated. External ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty."
+ },
+ "podCIDR": {
+ "type": "string",
+ "description": "pod IP range assigned to the node"
+ },
+ "providerID": {
+ "type": "string",
+ "description": "ID of the node assigned by the cloud provider in the format: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e"
+ },
+ "unschedulable": {
+ "type": "boolean",
+ "description": "disable pod scheduling on the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NodeSpec"
+ },
+ "kubernetes_NodeStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "addresses": {
+ "type": "array",
+ "description": "list of addresses reachable to the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses",
+ "items": {
+ "$ref": "#/definitions/kubernetes_NodeAddress",
+ "javaType": "io.fabric8.kubernetes.api.model.NodeAddress"
+ }
+ },
+ "capacity": {
+ "type": "object",
+ "description": "compute resource capacity of the node; see http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ },
+ "conditions": {
+ "type": "array",
+ "description": "list of node conditions observed; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition",
+ "items": {
+ "$ref": "#/definitions/kubernetes_NodeCondition",
+ "javaType": "io.fabric8.kubernetes.api.model.NodeCondition"
+ }
+ },
+ "nodeInfo": {
+ "$ref": "#/definitions/kubernetes_NodeSystemInfo",
+ "javaType": "io.fabric8.kubernetes.api.model.NodeSystemInfo"
+ },
+ "phase": {
+ "type": "string",
+ "description": "most recently observed lifecycle phase of the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NodeStatus"
+ },
+ "kubernetes_NodeSystemInfo": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "bootID": {
+ "type": "string",
+ "description": "boot id is the boot-id reported by the node"
+ },
+ "containerRuntimeVersion": {
+ "type": "string",
+ "description": "Container runtime version reported by the node through runtime remote API (e.g. docker://1.5.0)"
+ },
+ "kernelVersion": {
+ "type": "string",
+ "description": "Kernel version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64)"
+ },
+ "kubeProxyVersion": {
+ "type": "string",
+ "description": "Kube-proxy version reported by the node"
+ },
+ "kubeletVersion": {
+ "type": "string",
+ "description": "Kubelet version reported by the node"
+ },
+ "machineID": {
+ "type": "string",
+ "description": "machine-id reported by the node"
+ },
+ "osImage": {
+ "type": "string",
+ "description": "OS image used reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy))"
+ },
+ "systemUUID": {
+ "type": "string",
+ "description": "system-uuid reported by the node"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NodeSystemInfo"
+ },
+ "kubernetes_ObjectFieldSelector": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "version of the schema that fieldPath is written in terms of; defaults to v1"
+ },
+ "fieldPath": {
+ "type": "string",
+ "description": "path of the field to select in the specified API version"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
+ },
+ "kubernetes_ObjectMeta": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "annotations": {
+ "type": "object",
+ "description": "map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects; see http://releases.k8s.io/HEAD/docs/user-guide/annotations.md",
+ "additionalProperties": {
+ "type": "string",
+ "description": "map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects; see http://releases.k8s.io/HEAD/docs/user-guide/annotations.md"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "description": "RFC 3339 date and time at which the object was created; populated by the system"
+ },
+ "deletionTimestamp": {
+ "type": "string",
+ "description": "RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested"
+ },
+ "generateName": {
+ "type": "string",
+ "description": "an optional prefix to use to generate a unique name; has the same validation rules as name; optional"
+ },
+ "generation": {
+ "type": "integer",
+ "description": "a sequence number representing a specific generation of the desired state; populated by the system; read-only",
+ "javaType": "Long"
+ },
+ "labels": {
+ "type": "object",
+ "description": "map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md",
+ "additionalProperties": {
+ "type": "string",
+ "description": "map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "name": {
+ "type": "string",
+ "description": "string that identifies an object. Must be unique within a namespace; cannot be updated; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
+ },
+ "namespace": {
+ "type": "string",
+ "description": "namespace of the object; must be a DNS_LABEL; cannot be updated; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
+ "maxLength": 253,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
+ },
+ "resourceVersion": {
+ "type": "string",
+ "description": "string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system"
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "URL for the object; populated by the system"
+ },
+ "uid": {
+ "type": "string",
+ "description": "unique UUID across space and time; populated by the system; read-only; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "kubernetes_ObjectReference": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "API version of the referent"
+ },
+ "fieldPath": {
+ "type": "string",
+ "description": "if referring to a piece of an object instead of an entire object"
+ },
+ "kind": {
+ "type": "string",
+ "description": "kind of the referent; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
+ },
+ "namespace": {
+ "type": "string",
+ "description": "namespace of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md"
+ },
+ "resourceVersion": {
+ "type": "string",
+ "description": "specific resourceVersion to which this reference is made"
+ },
+ "uid": {
+ "type": "string",
+ "description": "uid of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "kubernetes_PersistentVolume": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PersistentVolume",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolume",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_PersistentVolumeClaim": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PersistentVolumeClaim",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeClaimSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeClaimStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_PersistentVolumeClaimList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "a list of persistent volume claims; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims",
+ "items": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeClaim",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PersistentVolumeClaimList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_PersistentVolumeClaimSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "accessModes": {
+ "type": "array",
+ "description": "the desired access modes the volume should have; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1",
+ "items": {
+ "type": "string",
+ "description": "the desired access modes the volume should have; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1"
+ }
+ },
+ "resources": {
+ "$ref": "#/definitions/kubernetes_ResourceRequirements",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
+ },
+ "volumeName": {
+ "type": "string",
+ "description": "the binding reference to the persistent volume backing this claim"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec"
+ },
+ "kubernetes_PersistentVolumeClaimStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "accessModes": {
+ "type": "array",
+ "description": "the actual access modes the volume has; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1",
+ "items": {
+ "type": "string",
+ "description": "the actual access modes the volume has; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1"
+ }
+ },
+ "capacity": {
+ "type": "object",
+ "description": "the actual resources the volume has",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ },
+ "phase": {
+ "type": "string",
+ "description": "the current phase of the claim"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus"
+ },
+ "kubernetes_PersistentVolumeClaimVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "claimName": {
+ "type": "string",
+ "description": "the name of the claim in the same namespace to be mounted as a volume; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "mount volume as read-only when true; default false"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
+ },
+ "kubernetes_PersistentVolumeList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of persistent volumes; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_PersistentVolume",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolume"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PersistentVolumeList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_PersistentVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "awsElasticBlockStore": {
+ "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
+ },
+ "cephfs": {
+ "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
+ },
+ "gcePersistentDisk": {
+ "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
+ },
+ "glusterfs": {
+ "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
+ },
+ "hostPath": {
+ "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
+ },
+ "iscsi": {
+ "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
+ },
+ "nfs": {
+ "$ref": "#/definitions/kubernetes_NFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
+ },
+ "rbd": {
+ "$ref": "#/definitions/kubernetes_RBDVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSource"
+ },
+ "kubernetes_PersistentVolumeSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "accessModes": {
+ "type": "array",
+ "description": "all ways the volume can be mounted; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes",
+ "items": {
+ "type": "string",
+ "description": "all ways the volume can be mounted; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes"
+ }
+ },
+ "awsElasticBlockStore": {
+ "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
+ },
+ "capacity": {
+ "type": "object",
+ "description": "a description of the persistent volume's resources and capacityr; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ },
+ "cephfs": {
+ "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
+ },
+ "claimRef": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "gcePersistentDisk": {
+ "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
+ },
+ "glusterfs": {
+ "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
+ },
+ "hostPath": {
+ "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
+ },
+ "iscsi": {
+ "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
+ },
+ "nfs": {
+ "$ref": "#/definitions/kubernetes_NFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
+ },
+ "persistentVolumeReclaimPolicy": {
+ "type": "string",
+ "description": "what happens to a volume when released from its claim; Valid options are Retain (default) and Recycle. Recyling must be supported by the volume plugin underlying this persistent volume. See http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy"
+ },
+ "rbd": {
+ "$ref": "#/definitions/kubernetes_RBDVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSpec"
+ },
+ "kubernetes_PersistentVolumeStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "human-readable message indicating details about why the volume is in this state"
+ },
+ "phase": {
+ "type": "string",
+ "description": "the current phase of a persistent volume; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#phase"
+ },
+ "reason": {
+ "type": "string",
+ "description": "(brief) reason the volume is not is not available"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeStatus"
+ },
+ "kubernetes_Pod": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Pod",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_PodSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.PodSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_PodStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.PodStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Pod",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_PodCondition": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "status": {
+ "type": "string",
+ "description": "status of the condition"
+ },
+ "type": {
+ "type": "string",
+ "description": "kind of the condition"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PodCondition"
+ },
+ "kubernetes_PodList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of pods; see http://releases.k8s.io/HEAD/docs/user-guide/pods.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Pod",
+ "javaType": "io.fabric8.kubernetes.api.model.Pod"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PodList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PodList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_PodSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "activeDeadlineSeconds": {
+ "type": "integer",
+ "description": "",
+ "javaType": "Long"
+ },
+ "containers": {
+ "type": "array",
+ "description": "list of containers belonging to the pod; cannot be updated; containers cannot currently be added or removed; there must be at least one container in a Pod; see http://releases.k8s.io/HEAD/docs/user-guide/containers.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Container",
+ "javaType": "io.fabric8.kubernetes.api.model.Container"
+ }
+ },
+ "dnsPolicy": {
+ "type": "string",
+ "description": "DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"
+ },
+ "host": {
+ "type": "string",
+ "description": "deprecated"
+ },
+ "hostNetwork": {
+ "type": "boolean",
+ "description": "host networking requested for this pod"
+ },
+ "imagePullSecrets": {
+ "type": "array",
+ "description": "list of references to secrets in the same namespace available for pulling the container images; see http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod",
+ "items": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ }
+ },
+ "nodeName": {
+ "type": "string",
+ "description": "node requested for this pod"
+ },
+ "nodeSelector": {
+ "type": "object",
+ "description": "selector which must match a node's labels for the pod to be scheduled on that node; see http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md",
+ "additionalProperties": {
+ "type": "string",
+ "description": "selector which must match a node's labels for the pod to be scheduled on that node; see http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "restartPolicy": {
+ "type": "string",
+ "description": "restart policy for all containers within the pod; one of Always"
+ },
+ "serviceAccount": {
+ "type": "string",
+ "description": "deprecated; use serviceAccountName instead"
+ },
+ "serviceAccountName": {
+ "type": "string",
+ "description": "name of the ServiceAccount to use to run this pod; see http://releases.k8s.io/HEAD/docs/design/service_accounts.md"
+ },
+ "terminationGracePeriodSeconds": {
+ "type": "integer",
+ "description": "optional duration in seconds the pod needs to terminate gracefully; may be decreased in delete request; value must be non-negative integer; the value zero indicates delete immediately; if this value is not set",
+ "javaType": "Long"
+ },
+ "volumes": {
+ "type": "array",
+ "description": "list of volumes that can be mounted by containers belonging to the pod; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Volume",
+ "javaType": "io.fabric8.kubernetes.api.model.Volume"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PodSpec"
+ },
+ "kubernetes_PodStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "conditions": {
+ "type": "array",
+ "description": "current service state of pod; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions",
+ "items": {
+ "$ref": "#/definitions/kubernetes_PodCondition",
+ "javaType": "io.fabric8.kubernetes.api.model.PodCondition"
+ }
+ },
+ "containerStatuses": {
+ "type": "array",
+ "description": "list of container statuses; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ContainerStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
+ }
+ },
+ "hostIP": {
+ "type": "string",
+ "description": "IP address of the host to which the pod is assigned; empty if not yet scheduled"
+ },
+ "message": {
+ "type": "string",
+ "description": "human readable message indicating details about why the pod is in this condition"
+ },
+ "phase": {
+ "type": "string",
+ "description": "current condition of the pod; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-phase"
+ },
+ "podIP": {
+ "type": "string",
+ "description": "IP address allocated to the pod; routable at least within the cluster; empty if not yet allocated"
+ },
+ "reason": {
+ "type": "string",
+ "description": "(brief-CamelCase) reason indicating details about why the pod is in this condition"
+ },
+ "startTime": {
+ "type": "string",
+ "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod."
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PodStatus"
+ },
+ "kubernetes_PodTemplateSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_PodSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.PodSpec"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
+ },
+ "kubernetes_Probe": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "exec": {
+ "$ref": "#/definitions/kubernetes_ExecAction",
+ "javaType": "io.fabric8.kubernetes.api.model.ExecAction"
+ },
+ "httpGet": {
+ "$ref": "#/definitions/kubernetes_HTTPGetAction",
+ "javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
+ },
+ "initialDelaySeconds": {
+ "type": "integer",
+ "description": "number of seconds after the container has started before liveness probes are initiated; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes",
+ "javaType": "Long"
+ },
+ "tcpSocket": {
+ "$ref": "#/definitions/kubernetes_TCPSocketAction",
+ "javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
+ },
+ "timeoutSeconds": {
+ "type": "integer",
+ "description": "number of seconds after which liveness probes timeout; defaults to 1 second; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes",
+ "javaType": "Long"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Probe"
+ },
+ "kubernetes_RBDVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "fsType": {
+ "type": "string",
+ "description": "file system type to mount"
+ },
+ "image": {
+ "type": "string",
+ "description": "rados image name; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
+ },
+ "keyring": {
+ "type": "string",
+ "description": "keyring is the path to key ring for rados user; default is /etc/ceph/keyring; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
+ },
+ "monitors": {
+ "type": "array",
+ "description": "a collection of Ceph monitors; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it",
+ "items": {
+ "type": "string",
+ "description": "a collection of Ceph monitors; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
+ }
+ },
+ "pool": {
+ "type": "string",
+ "description": "rados pool name; default is rbd; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "rbd volume to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
+ },
+ "secretRef": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ },
+ "user": {
+ "type": "string",
+ "description": "rados user name; default is admin; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
+ },
+ "kubernetes_ReplicationController": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ReplicationController",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_ReplicationControllerSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_ReplicationControllerStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationController",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_ReplicationControllerList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of replication controllers; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ReplicationController",
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationController"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ReplicationControllerList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_ReplicationControllerSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "replicas": {
+ "type": "integer",
+ "description": "number of replicas desired; defaults to 1; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller"
+ },
+ "selector": {
+ "type": "object",
+ "description": "label keys and values that must match in order to be controlled by this replication controller",
+ "additionalProperties": {
+ "type": "string",
+ "description": "label keys and values that must match in order to be controlled by this replication controller"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "template": {
+ "$ref": "#/definitions/kubernetes_PodTemplateSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerSpec"
+ },
+ "kubernetes_ReplicationControllerStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "observedGeneration": {
+ "type": "integer",
+ "description": "reflects the generation of the most recently observed replication controller",
+ "javaType": "Long"
+ },
+ "replicas": {
+ "type": "integer",
+ "description": "most recently oberved number of replicas; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerStatus"
+ },
+ "kubernetes_ResourceQuota": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ResourceQuota",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_ResourceQuotaSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_ResourceQuotaStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuota",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_ResourceQuotaList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "items is a list of ResourceQuota objects; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ResourceQuota",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuota"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ResourceQuotaList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_ResourceQuotaSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "hard": {
+ "type": "object",
+ "description": "hard is the set of desired hard limits for each named resource; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaSpec"
+ },
+ "kubernetes_ResourceQuotaStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "hard": {
+ "type": "object",
+ "description": "hard is the set of enforced hard limits for each named resource; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ },
+ "used": {
+ "type": "object",
+ "description": "used is the current observed total usage of the resource in the namespace",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaStatus"
+ },
+ "kubernetes_ResourceRequirements": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "limits": {
+ "type": "object",
+ "description": "Maximum amount of compute resources allowed; see http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ },
+ "requests": {
+ "type": "object",
+ "description": "Minimum amount of resources requested; if Requests is omitted for a container",
+ "additionalProperties": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
+ },
+ "kubernetes_RunAsUserStrategyOptions": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "strategy used to generate RunAsUser"
+ },
+ "uid": {
+ "type": "integer",
+ "description": "the uid to always run as; required for MustRunAs",
+ "javaType": "Long"
+ },
+ "uidRangeMax": {
+ "type": "integer",
+ "description": "max value for range based allocators",
+ "javaType": "Long"
+ },
+ "uidRangeMin": {
+ "type": "integer",
+ "description": "min value for range based allocators",
+ "javaType": "Long"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.RunAsUserStrategyOptions"
+ },
+ "kubernetes_SELinuxContextStrategyOptions": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "seLinuxOptions": {
+ "$ref": "#/definitions/kubernetes_SELinuxOptions",
+ "javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
+ },
+ "type": {
+ "type": "string",
+ "description": "strategy used to generate the SELinux context"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.SELinuxContextStrategyOptions"
+ },
+ "kubernetes_SELinuxOptions": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "level": {
+ "type": "string",
+ "description": "the level label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
+ },
+ "role": {
+ "type": "string",
+ "description": "the role label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
+ },
+ "type": {
+ "type": "string",
+ "description": "the type label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
+ },
+ "user": {
+ "type": "string",
+ "description": "the user label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
+ },
+ "kubernetes_Secret": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "data": {
+ "type": "object",
+ "description": "data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. Each value must be a base64 encoded string as described in https://tools.ietf.org/html/rfc4648#section-4",
+ "additionalProperties": {
+ "type": "string",
+ "description": "data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. Each value must be a base64 encoded string as described in https://tools.ietf.org/html/rfc4648#section-4"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Secret",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "type": {
+ "type": "string",
+ "description": "type facilitates programmatic handling of secret data"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Secret",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_SecretList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "items is a list of secret objects; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Secret",
+ "javaType": "io.fabric8.kubernetes.api.model.Secret"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "SecretList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.SecretList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_SecretVolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "secretName": {
+ "type": "string",
+ "description": "secretName is the name of a secret in the pod's namespace; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
+ },
+ "kubernetes_SecurityContext": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "capabilities": {
+ "$ref": "#/definitions/kubernetes_Capabilities",
+ "javaType": "io.fabric8.kubernetes.api.model.Capabilities"
+ },
+ "privileged": {
+ "type": "boolean",
+ "description": "run the container in privileged mode; see http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context"
+ },
+ "runAsNonRoot": {
+ "type": "boolean",
+ "description": "indicates the container must be run as a non-root user either by specifying the runAsUser or in the image specification"
+ },
+ "runAsUser": {
+ "type": "integer",
+ "description": "the user id that runs the first process in the container; see http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context",
+ "javaType": "Long"
+ },
+ "seLinuxOptions": {
+ "$ref": "#/definitions/kubernetes_SELinuxOptions",
+ "javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.SecurityContext"
+ },
+ "kubernetes_SecurityContextConstraints": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "allowHostDirVolumePlugin": {
+ "type": "boolean",
+ "description": "allow the use of the host dir volume plugin"
+ },
+ "allowHostNetwork": {
+ "type": "boolean",
+ "description": "allow the use of the hostNetwork in the pod spec"
+ },
+ "allowHostPorts": {
+ "type": "boolean",
+ "description": "allow the use of the host ports in the containers"
+ },
+ "allowPrivilegedContainer": {
+ "type": "boolean",
+ "description": "allow containers to run as privileged"
+ },
+ "allowedCapabilities": {
+ "type": "array",
+ "description": "capabilities that are allowed to be added",
+ "items": {
+ "type": "string",
+ "description": "capabilities that are allowed to be added"
+ }
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "groups": {
+ "type": "array",
+ "description": "groups allowed to use this SecurityContextConstraints",
+ "items": {
+ "type": "string",
+ "description": "groups allowed to use this SecurityContextConstraints"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "SecurityContextConstraints",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "runAsUser": {
+ "$ref": "#/definitions/kubernetes_RunAsUserStrategyOptions",
+ "javaType": "io.fabric8.kubernetes.api.model.RunAsUserStrategyOptions"
+ },
+ "seLinuxContext": {
+ "$ref": "#/definitions/kubernetes_SELinuxContextStrategyOptions",
+ "javaType": "io.fabric8.kubernetes.api.model.SELinuxContextStrategyOptions"
+ },
+ "users": {
+ "type": "array",
+ "description": "users allowed to use this SecurityContextConstraints",
+ "items": {
+ "type": "string",
+ "description": "users allowed to use this SecurityContextConstraints"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_SecurityContextConstraintsList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_SecurityContextConstraints",
+ "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "SecurityContextConstraintsList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraintsList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_Service": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Service",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/kubernetes_ServiceSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/kubernetes_ServiceStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Service",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_ServiceAccount": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "imagePullSecrets": {
+ "type": "array",
+ "description": "list of references to secrets in the same namespace available for pulling container images; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md#manually-specifying-an-imagepullsecret",
+ "items": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ServiceAccount",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "secrets": {
+ "type": "array",
+ "description": "list of secrets that can be used by pods running as this service account; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceAccount",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "kubernetes_ServiceAccountList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of ServiceAccounts; see http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ServiceAccount",
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceAccount"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ServiceAccountList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceAccountList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_ServiceList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of services",
+ "items": {
+ "$ref": "#/definitions/kubernetes_Service",
+ "javaType": "io.fabric8.kubernetes.api.model.Service"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ServiceList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "kubernetes_ServicePort": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "the name of this port; optional if only one port is defined",
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
+ },
+ "nodePort": {
+ "type": "integer",
+ "description": "the port on each node on which this service is exposed when type=NodePort or LoadBalancer; usually assigned by the system; if specified"
+ },
+ "port": {
+ "type": "integer",
+ "description": "the port number that is exposed"
+ },
+ "protocol": {
+ "type": "string",
+ "description": "the protocol used by this port; must be UDP or TCP; TCP if unspecified"
+ },
+ "targetPort": {
+ "$ref": "#/definitions/kubernetes_util_IntOrString",
+ "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ServicePort"
+ },
+ "kubernetes_ServiceSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "clusterIP": {
+ "type": "string",
+ "description": "IP address of the service; usually assigned by the system; if specified"
+ },
+ "deprecatedPublicIPs": {
+ "type": "array",
+ "description": "deprecated. externally visible IPs (e.g. load balancers) that should be proxied to this service",
+ "items": {
+ "type": "string",
+ "description": "deprecated. externally visible IPs (e.g. load balancers) that should be proxied to this service"
+ }
+ },
+ "portalIP": {
+ "type": "string",
+ "description": "deprecated"
+ },
+ "ports": {
+ "type": "array",
+ "description": "ports exposed by the service; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ServicePort",
+ "javaType": "io.fabric8.kubernetes.api.model.ServicePort"
+ }
+ },
+ "selector": {
+ "type": "object",
+ "description": "label keys and values that must match in order to receive traffic for this service; if empty",
+ "additionalProperties": {
+ "type": "string",
+ "description": "label keys and values that must match in order to receive traffic for this service; if empty"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "sessionAffinity": {
+ "type": "string",
+ "description": "enable client IP based session affinity; must be ClientIP or None; defaults to None; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies"
+ },
+ "type": {
+ "type": "string",
+ "description": "type of this service; must be ClusterIP"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceSpec"
+ },
+ "kubernetes_ServiceStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "loadBalancer": {
+ "$ref": "#/definitions/kubernetes_LoadBalancerStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.LoadBalancerStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceStatus"
+ },
+ "kubernetes_Status": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "code": {
+ "type": "integer",
+ "description": "suggested HTTP return code for this status; 0 if not set"
+ },
+ "details": {
+ "$ref": "#/definitions/kubernetes_StatusDetails",
+ "javaType": "io.fabric8.kubernetes.api.model.StatusDetails"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Status",
+ "required": true
+ },
+ "message": {
+ "type": "string",
+ "description": "human-readable description of the status of this operation"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ },
+ "reason": {
+ "type": "string",
+ "description": "machine-readable description of why this operation is in the 'Failure' status; if this value is empty there is no information available; a reason clarifies an HTTP status code but does not override it"
+ },
+ "status": {
+ "type": "string",
+ "description": "status of the operation; either Success"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Status"
+ },
+ "kubernetes_StatusCause": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "field": {
+ "type": "string",
+ "description": "field of the resource that has caused this error"
+ },
+ "message": {
+ "type": "string",
+ "description": "human-readable description of the cause of the error; this field may be presented as-is to a reader"
+ },
+ "reason": {
+ "type": "string",
+ "description": "machine-readable description of the cause of the error; if this value is empty there is no information available"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.StatusCause"
+ },
+ "kubernetes_StatusDetails": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "causes": {
+ "type": "array",
+ "description": "the Causes array includes more details associated with the StatusReason failure; not all StatusReasons may provide detailed causes",
+ "items": {
+ "$ref": "#/definitions/kubernetes_StatusCause",
+ "javaType": "io.fabric8.kubernetes.api.model.StatusCause"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "the kind attribute of the resource associated with the status StatusReason; on some operations may differ from the requested resource Kind; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "name": {
+ "type": "string",
+ "description": "the name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)"
+ },
+ "retryAfterSeconds": {
+ "type": "integer",
+ "description": "the number of seconds before the client should attempt to retry this operation"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.StatusDetails"
+ },
+ "kubernetes_TCPSocketAction": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "port": {
+ "$ref": "#/definitions/kubernetes_util_IntOrString",
+ "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
+ },
+ "kubernetes_TypeMeta": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "version of the schema the object should have; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
+ },
+ "kind": {
+ "type": "string",
+ "description": "kind of object"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.TypeMeta"
+ },
+ "kubernetes_Volume": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "awsElasticBlockStore": {
+ "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
+ },
+ "cephfs": {
+ "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
+ },
+ "emptyDir": {
+ "$ref": "#/definitions/kubernetes_EmptyDirVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
+ },
+ "gcePersistentDisk": {
+ "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
+ },
+ "gitRepo": {
+ "$ref": "#/definitions/kubernetes_GitRepoVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
+ },
+ "glusterfs": {
+ "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
+ },
+ "hostPath": {
+ "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
+ },
+ "iscsi": {
+ "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_MetadataVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
+ },
+ "name": {
+ "type": "string",
+ "description": "volume name; must be a DNS_LABEL and unique within the pod; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
+ },
+ "nfs": {
+ "$ref": "#/definitions/kubernetes_NFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
+ },
+ "persistentVolumeClaim": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeClaimVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
+ },
+ "rbd": {
+ "$ref": "#/definitions/kubernetes_RBDVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
+ },
+ "secret": {
+ "$ref": "#/definitions/kubernetes_SecretVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Volume"
+ },
+ "kubernetes_VolumeMount": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "mountPath": {
+ "type": "string",
+ "description": "path within the container at which the volume should be mounted"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of the volume to mount"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "mounted read-only if true"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.VolumeMount"
+ },
+ "kubernetes_VolumeSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "awsElasticBlockStore": {
+ "$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
+ },
+ "cephfs": {
+ "$ref": "#/definitions/kubernetes_CephFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
+ },
+ "emptyDir": {
+ "$ref": "#/definitions/kubernetes_EmptyDirVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
+ },
+ "gcePersistentDisk": {
+ "$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
+ },
+ "gitRepo": {
+ "$ref": "#/definitions/kubernetes_GitRepoVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
+ },
+ "glusterfs": {
+ "$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
+ },
+ "hostPath": {
+ "$ref": "#/definitions/kubernetes_HostPathVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
+ },
+ "iscsi": {
+ "$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_MetadataVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
+ },
+ "nfs": {
+ "$ref": "#/definitions/kubernetes_NFSVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
+ },
+ "persistentVolumeClaim": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeClaimVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
+ },
+ "rbd": {
+ "$ref": "#/definitions/kubernetes_RBDVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
+ },
+ "secret": {
+ "$ref": "#/definitions/kubernetes_SecretVolumeSource",
+ "javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.VolumeSource"
+ },
+ "kubernetes_config_AuthInfo": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "client-certificate": {
+ "type": "string",
+ "description": ""
+ },
+ "client-certificate-data": {
+ "type": "string",
+ "description": ""
+ },
+ "client-key": {
+ "type": "string",
+ "description": ""
+ },
+ "client-key-data": {
+ "type": "string",
+ "description": ""
+ },
+ "extensions": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
+ }
+ },
+ "password": {
+ "type": "string",
+ "description": ""
+ },
+ "token": {
+ "type": "string",
+ "description": ""
+ },
+ "username": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.AuthInfo"
+ },
+ "kubernetes_config_Cluster": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "api-version": {
+ "type": "string",
+ "description": ""
+ },
+ "certificate-authority": {
+ "type": "string",
+ "description": ""
+ },
+ "certificate-authority-data": {
+ "type": "string",
+ "description": ""
+ },
+ "extensions": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
+ }
+ },
+ "insecure-skip-tls-verify": {
+ "type": "boolean",
+ "description": ""
+ },
+ "server": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Cluster"
+ },
+ "kubernetes_config_Config": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": ""
+ },
+ "clusters": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedCluster",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedCluster"
+ }
+ },
+ "contexts": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedContext",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedContext"
+ }
+ },
+ "current-context": {
+ "type": "string",
+ "description": ""
+ },
+ "extensions": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": ""
+ },
+ "preferences": {
+ "$ref": "#/definitions/kubernetes_config_Preferences",
+ "javaType": "io.fabric8.kubernetes.api.model.Preferences"
+ },
+ "users": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedAuthInfo",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedAuthInfo"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Config"
+ },
+ "kubernetes_config_Context": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "cluster": {
+ "type": "string",
+ "description": ""
+ },
+ "extensions": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
+ }
+ },
+ "namespace": {
+ "type": "string",
+ "description": ""
+ },
+ "user": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Context"
+ },
+ "kubernetes_config_NamedAuthInfo": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": ""
+ },
+ "user": {
+ "$ref": "#/definitions/kubernetes_config_AuthInfo",
+ "javaType": "io.fabric8.kubernetes.api.model.AuthInfo"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NamedAuthInfo"
+ },
+ "kubernetes_config_NamedCluster": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "cluster": {
+ "$ref": "#/definitions/kubernetes_config_Cluster",
+ "javaType": "io.fabric8.kubernetes.api.model.Cluster"
+ },
+ "name": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NamedCluster"
+ },
+ "kubernetes_config_NamedContext": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "context": {
+ "$ref": "#/definitions/kubernetes_config_Context",
+ "javaType": "io.fabric8.kubernetes.api.model.Context"
+ },
+ "name": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NamedContext"
+ },
+ "kubernetes_config_NamedExtension": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "extension": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "name": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
+ },
+ "kubernetes_config_Preferences": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "colors": {
+ "type": "boolean",
+ "description": ""
+ },
+ "extensions": {
+ "type": "array",
+ "description": "",
+ "items": {
+ "$ref": "#/definitions/kubernetes_config_NamedExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Preferences"
+ },
+ "kubernetes_resource_Quantity": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "Amount": {
+ "$ref": "#/definitions/speter_inf_Dec",
+ "javaType": "io.fabric8.openshift.api.model.Dec"
+ },
+ "Format": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "kubernetes_runtime_RawExtension": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "RawJSON": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "kubernetes_util_IntOrString": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "IntVal": {
+ "type": "integer",
+ "description": ""
+ },
+ "Kind": {
+ "type": "integer",
+ "description": ""
+ },
+ "StrVal": {
+ "type": "string",
+ "description": ""
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.IntOrString"
+ },
+ "kubernetes_watch_WatchEvent": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "object": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "type": {
+ "type": "string",
+ "description": "the type of watch event; may be ADDED"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.kubernetes.api.model.WatchEvent"
+ },
+ "os_authorization_AuthorizationAttributes": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "namespace": {
+ "type": "string",
+ "description": "namespace of the action being requested"
+ },
+ "resource": {
+ "type": "string",
+ "description": "one of the existing resource types"
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "name of the resource being requested for a get or delete"
+ },
+ "verb": {
+ "type": "string",
+ "description": "one of get"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.AuthorizationAttributes"
+ },
+ "os_authorization_ClusterPolicy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ClusterPolicy",
+ "required": true
+ },
+ "lastModified": {
+ "type": "string",
+ "description": "last time any part of the object was created"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "roles": {
+ "type": "array",
+ "description": "all the roles held by this policy",
+ "items": {
+ "$ref": "#/definitions/os_authorization_NamedClusterRole",
+ "javaType": "io.fabric8.openshift.api.model.NamedClusterRole"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicy",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_ClusterPolicyBinding": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ClusterPolicyBinding",
+ "required": true
+ },
+ "lastModified": {
+ "type": "string",
+ "description": "last time any part of the object was created"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "policyRef": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "roleBindings": {
+ "type": "array",
+ "description": "all the role bindings held by this policy",
+ "items": {
+ "$ref": "#/definitions/os_authorization_NamedClusterRoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.NamedClusterRoleBinding"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_ClusterPolicyBindingList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of cluster policy bindings",
+ "items": {
+ "$ref": "#/definitions/os_authorization_ClusterPolicyBinding",
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ClusterPolicyBindingList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBindingList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_authorization_ClusterPolicyList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of cluster policies",
+ "items": {
+ "$ref": "#/definitions/os_authorization_ClusterPolicy",
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicy"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ClusterPolicyList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicyList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_authorization_ClusterRole": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ClusterRole",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "rules": {
+ "type": "array",
+ "description": "list of policy rules",
+ "items": {
+ "$ref": "#/definitions/os_authorization_PolicyRule",
+ "javaType": "io.fabric8.openshift.api.model.PolicyRule"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ClusterRole",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_ClusterRoleBinding": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "groupNames": {
+ "type": "array",
+ "description": "all the groups directly bound to the role",
+ "items": {
+ "type": "string",
+ "description": "all the groups directly bound to the role"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ClusterRoleBinding",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "roleRef": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "subjects": {
+ "type": "array",
+ "description": "references to subjects bound to the role. Only User",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "userNames": {
+ "type": "array",
+ "description": "all user names directly bound to the role",
+ "items": {
+ "type": "string",
+ "description": "all user names directly bound to the role"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_ClusterRoleBindingList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of cluster role bindings",
+ "items": {
+ "$ref": "#/definitions/os_authorization_ClusterRoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ClusterRoleBindingList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_authorization_LocalSubjectAccessReview": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "TypeMeta": {
+ "$ref": "#/definitions/kubernetes_TypeMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.TypeMeta"
+ },
+ "content": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "groups": {
+ "type": "array",
+ "description": "optional",
+ "items": {
+ "type": "string",
+ "description": "optional"
+ }
+ },
+ "namespace": {
+ "type": "string",
+ "description": "namespace of the action being requested"
+ },
+ "resource": {
+ "type": "string",
+ "description": "one of the existing resource types"
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "name of the resource being requested for a get or delete"
+ },
+ "user": {
+ "type": "string",
+ "description": "optional"
+ },
+ "verb": {
+ "type": "string",
+ "description": "one of get"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.LocalSubjectAccessReview"
+ },
+ "os_authorization_NamedClusterRole": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of the cluster role"
+ },
+ "role": {
+ "$ref": "#/definitions/os_authorization_ClusterRole",
+ "javaType": "io.fabric8.openshift.api.model.ClusterRole"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.NamedClusterRole"
+ },
+ "os_authorization_NamedClusterRoleBinding": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of the cluster role binding"
+ },
+ "roleBinding": {
+ "$ref": "#/definitions/os_authorization_ClusterRoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.NamedClusterRoleBinding"
+ },
+ "os_authorization_NamedRole": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of the role"
+ },
+ "role": {
+ "$ref": "#/definitions/os_authorization_Role",
+ "javaType": "io.fabric8.openshift.api.model.Role"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.NamedRole"
+ },
+ "os_authorization_NamedRoleBinding": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of the roleBinding"
+ },
+ "roleBinding": {
+ "$ref": "#/definitions/os_authorization_RoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.RoleBinding"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.NamedRoleBinding"
+ },
+ "os_authorization_Policy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Policy",
+ "required": true
+ },
+ "lastModified": {
+ "type": "string",
+ "description": "last time that any part of the policy was created"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "roles": {
+ "type": "array",
+ "description": "roles held by this policy",
+ "items": {
+ "$ref": "#/definitions/os_authorization_NamedRole",
+ "javaType": "io.fabric8.openshift.api.model.NamedRole"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Policy",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_PolicyBinding": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PolicyBinding",
+ "required": true
+ },
+ "lastModified": {
+ "type": "string",
+ "description": "last time that any part of the object was created"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "policyRef": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "roleBindings": {
+ "type": "array",
+ "description": "all roleBindings held by this policyBinding",
+ "items": {
+ "$ref": "#/definitions/os_authorization_NamedRoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.NamedRoleBinding"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.PolicyBinding",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_PolicyBindingList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of policy bindings",
+ "items": {
+ "$ref": "#/definitions/os_authorization_PolicyBinding",
+ "javaType": "io.fabric8.openshift.api.model.PolicyBinding"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PolicyBindingList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.PolicyBindingList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_authorization_PolicyList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of policies",
+ "items": {
+ "$ref": "#/definitions/os_authorization_Policy",
+ "javaType": "io.fabric8.openshift.api.model.Policy"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "PolicyList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.PolicyList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_authorization_PolicyRule": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "attributeRestrictions": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "nonResourceURLs": {
+ "type": "array",
+ "description": "set of partial urls that a user should have access to. *s are allowed",
+ "items": {
+ "type": "string",
+ "description": "set of partial urls that a user should have access to. *s are allowed"
+ }
+ },
+ "resourceNames": {
+ "type": "array",
+ "description": "optional white list of names that the rule applies to. An empty set means that everything is allowed.",
+ "items": {
+ "type": "string",
+ "description": "optional white list of names that the rule applies to. An empty set means that everything is allowed."
+ }
+ },
+ "resources": {
+ "type": "array",
+ "description": "list of resources this rule applies to. * represents all resources.",
+ "items": {
+ "type": "string",
+ "description": "list of resources this rule applies to. * represents all resources."
+ }
+ },
+ "verbs": {
+ "type": "array",
+ "description": "list of verbs that apply to ALL the resourceKinds and attributeRestrictions contained in this rule. The verb * represents all kinds.",
+ "items": {
+ "type": "string",
+ "description": "list of verbs that apply to ALL the resourceKinds and attributeRestrictions contained in this rule. The verb * represents all kinds."
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.PolicyRule"
+ },
+ "os_authorization_Role": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Role",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "rules": {
+ "type": "array",
+ "description": "all the rules for this role",
+ "items": {
+ "$ref": "#/definitions/os_authorization_PolicyRule",
+ "javaType": "io.fabric8.openshift.api.model.PolicyRule"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Role",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_RoleBinding": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "groupNames": {
+ "type": "array",
+ "description": "all the groups directly bound to the role",
+ "items": {
+ "type": "string",
+ "description": "all the groups directly bound to the role"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "RoleBinding",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "roleRef": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "subjects": {
+ "type": "array",
+ "description": "references to subjects bound to the role. Only User",
+ "items": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "userNames": {
+ "type": "array",
+ "description": "all the usernames directly bound to the role",
+ "items": {
+ "type": "string",
+ "description": "all the usernames directly bound to the role"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RoleBinding",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_authorization_RoleBindingList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of role bindings",
+ "items": {
+ "$ref": "#/definitions/os_authorization_RoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.RoleBinding"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "RoleBindingList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RoleBindingList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_authorization_RoleList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of roles",
+ "items": {
+ "$ref": "#/definitions/os_authorization_Role",
+ "javaType": "io.fabric8.openshift.api.model.Role"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "RoleList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RoleList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_authorization_SubjectAccessReview": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "content": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "groups": {
+ "type": "array",
+ "description": "optional",
+ "items": {
+ "type": "string",
+ "description": "optional"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "SubjectAccessReview",
+ "required": true
+ },
+ "namespace": {
+ "type": "string",
+ "description": "namespace of the action being requested"
+ },
+ "resource": {
+ "type": "string",
+ "description": "one of the existing resource types"
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "name of the resource being requested for a get or delete"
+ },
+ "user": {
+ "type": "string",
+ "description": "optional"
+ },
+ "verb": {
+ "type": "string",
+ "description": "one of get"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.SubjectAccessReview"
+ },
+ "os_authorization_SubjectAccessReviewResponse": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "allowed": {
+ "type": "boolean",
+ "description": "true if the action would be allowed"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "SubjectAccessReviewResponse",
+ "required": true
+ },
+ "namespace": {
+ "type": "string",
+ "description": "the namespace used for the access review"
+ },
+ "reason": {
+ "type": "string",
+ "description": "reason is optional"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.SubjectAccessReviewResponse"
+ },
+ "os_build_Build": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Build",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/os_build_BuildSpec",
+ "javaType": "io.fabric8.openshift.api.model.BuildSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/os_build_BuildStatus",
+ "javaType": "io.fabric8.openshift.api.model.BuildStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Build",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_build_BuildConfig": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "BuildConfig",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/os_build_BuildConfigSpec",
+ "javaType": "io.fabric8.openshift.api.model.BuildConfigSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/os_build_BuildConfigStatus",
+ "javaType": "io.fabric8.openshift.api.model.BuildConfigStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildConfig",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_build_BuildConfigList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of build configs",
+ "items": {
+ "$ref": "#/definitions/os_build_BuildConfig",
+ "javaType": "io.fabric8.openshift.api.model.BuildConfig"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "BuildConfigList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildConfigList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_build_BuildConfigSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "output": {
+ "$ref": "#/definitions/os_build_BuildOutput",
+ "javaType": "io.fabric8.openshift.api.model.BuildOutput"
+ },
+ "resources": {
+ "$ref": "#/definitions/kubernetes_ResourceRequirements",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
+ },
+ "revision": {
+ "$ref": "#/definitions/os_build_SourceRevision",
+ "javaType": "io.fabric8.openshift.api.model.SourceRevision"
+ },
+ "serviceAccount": {
+ "type": "string",
+ "description": "the name of the service account to use to run pods created by the build"
+ },
+ "source": {
+ "$ref": "#/definitions/os_build_BuildSource",
+ "javaType": "io.fabric8.openshift.api.model.BuildSource"
+ },
+ "strategy": {
+ "$ref": "#/definitions/os_build_BuildStrategy",
+ "javaType": "io.fabric8.openshift.api.model.BuildStrategy"
+ },
+ "triggers": {
+ "type": "array",
+ "description": "determines how new builds can be launched from a build config. if no triggers are defined",
+ "items": {
+ "$ref": "#/definitions/os_build_BuildTriggerPolicy",
+ "javaType": "io.fabric8.openshift.api.model.BuildTriggerPolicy"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildConfigSpec"
+ },
+ "os_build_BuildConfigStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "lastVersion": {
+ "type": "integer",
+ "description": "used to inform about number of last triggered build"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildConfigStatus"
+ },
+ "os_build_BuildList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of builds",
+ "items": {
+ "$ref": "#/definitions/os_build_Build",
+ "javaType": "io.fabric8.openshift.api.model.Build"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "BuildList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_build_BuildOutput": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "pushSecret": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ },
+ "to": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildOutput"
+ },
+ "os_build_BuildRequest": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "BuildRequest",
+ "required": true
+ },
+ "lastVersion": {
+ "type": "integer",
+ "description": "LastVersion of the BuildConfig that triggered this build"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "revision": {
+ "$ref": "#/definitions/os_build_SourceRevision",
+ "javaType": "io.fabric8.openshift.api.model.SourceRevision"
+ },
+ "triggeredByImage": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildRequest",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_build_BuildSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "contextDir": {
+ "type": "string",
+ "description": "specifies sub-directory where the source code for the application exists"
+ },
+ "git": {
+ "$ref": "#/definitions/os_build_GitBuildSource",
+ "javaType": "io.fabric8.openshift.api.model.GitBuildSource"
+ },
+ "sourceSecret": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ },
+ "type": {
+ "type": "string",
+ "description": "type of source control management system"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildSource"
+ },
+ "os_build_BuildSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "output": {
+ "$ref": "#/definitions/os_build_BuildOutput",
+ "javaType": "io.fabric8.openshift.api.model.BuildOutput"
+ },
+ "resources": {
+ "$ref": "#/definitions/kubernetes_ResourceRequirements",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
+ },
+ "revision": {
+ "$ref": "#/definitions/os_build_SourceRevision",
+ "javaType": "io.fabric8.openshift.api.model.SourceRevision"
+ },
+ "serviceAccount": {
+ "type": "string",
+ "description": "the name of the service account to use to run pods created by the build"
+ },
+ "source": {
+ "$ref": "#/definitions/os_build_BuildSource",
+ "javaType": "io.fabric8.openshift.api.model.BuildSource"
+ },
+ "strategy": {
+ "$ref": "#/definitions/os_build_BuildStrategy",
+ "javaType": "io.fabric8.openshift.api.model.BuildStrategy"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildSpec"
+ },
+ "os_build_BuildStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "cancelled": {
+ "type": "boolean",
+ "description": "describes if a canceling event was triggered for the build"
+ },
+ "completionTimestamp": {
+ "type": "string",
+ "description": "server time when the pod running this build stopped running"
+ },
+ "config": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "duration": {
+ "type": "integer",
+ "description": "amount of time the build has been running",
+ "javaType": "Long"
+ },
+ "message": {
+ "type": "string",
+ "description": "human-readable message indicating details about why the build has this status"
+ },
+ "phase": {
+ "type": "string",
+ "description": "observed point in the build lifecycle"
+ },
+ "startTimestamp": {
+ "type": "string",
+ "description": "server time when this build started running in a pod"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildStatus"
+ },
+ "os_build_BuildStrategy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "customStrategy": {
+ "$ref": "#/definitions/os_build_CustomBuildStrategy",
+ "javaType": "io.fabric8.openshift.api.model.CustomBuildStrategy"
+ },
+ "dockerStrategy": {
+ "$ref": "#/definitions/os_build_DockerBuildStrategy",
+ "javaType": "io.fabric8.openshift.api.model.DockerBuildStrategy"
+ },
+ "sourceStrategy": {
+ "$ref": "#/definitions/os_build_SourceBuildStrategy",
+ "javaType": "io.fabric8.openshift.api.model.SourceBuildStrategy"
+ },
+ "type": {
+ "type": "string",
+ "description": "identifies the type of build strategy"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildStrategy"
+ },
+ "os_build_BuildTriggerPolicy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "generic": {
+ "$ref": "#/definitions/os_build_WebHookTrigger",
+ "javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
+ },
+ "github": {
+ "$ref": "#/definitions/os_build_WebHookTrigger",
+ "javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
+ },
+ "imageChange": {
+ "$ref": "#/definitions/os_build_ImageChangeTrigger",
+ "javaType": "io.fabric8.openshift.api.model.ImageChangeTrigger"
+ },
+ "type": {
+ "type": "string",
+ "description": "type of build trigger"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.BuildTriggerPolicy"
+ },
+ "os_build_CustomBuildStrategy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "env": {
+ "type": "array",
+ "description": "additional environment variables you want to pass into a builder container",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EnvVar",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ }
+ },
+ "exposeDockerSocket": {
+ "type": "boolean",
+ "description": "allow running Docker commands (and build Docker images) from inside the container"
+ },
+ "forcePull": {
+ "type": "boolean",
+ "description": "forces pulling of builder image from remote registry if true"
+ },
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "pullSecret": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.CustomBuildStrategy"
+ },
+ "os_build_DockerBuildStrategy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "env": {
+ "type": "array",
+ "description": "additional environment variables you want to pass into a builder container",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EnvVar",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ }
+ },
+ "forcePull": {
+ "type": "boolean",
+ "description": "forces the source build to pull the image if true"
+ },
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "noCache": {
+ "type": "boolean",
+ "description": "if true"
+ },
+ "pullSecret": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DockerBuildStrategy"
+ },
+ "os_build_GitBuildSource": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "httpProxy": {
+ "type": "string",
+ "description": "specifies a http proxy to be used during git clone operations"
+ },
+ "httpsProxy": {
+ "type": "string",
+ "description": "specifies a https proxy to be used during git clone operations"
+ },
+ "ref": {
+ "type": "string",
+ "description": "identifies the branch/tag/ref to build"
+ },
+ "uri": {
+ "type": "string",
+ "description": "points to the source that will be built"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.GitBuildSource"
+ },
+ "os_build_GitSourceRevision": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "author": {
+ "$ref": "#/definitions/os_build_SourceControlUser",
+ "javaType": "io.fabric8.openshift.api.model.SourceControlUser"
+ },
+ "commit": {
+ "type": "string",
+ "description": "hash identifying a specific commit"
+ },
+ "committer": {
+ "$ref": "#/definitions/os_build_SourceControlUser",
+ "javaType": "io.fabric8.openshift.api.model.SourceControlUser"
+ },
+ "message": {
+ "type": "string",
+ "description": "description of a specific commit"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.GitSourceRevision"
+ },
+ "os_build_ImageChangeTrigger": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "lastTriggeredImageID": {
+ "type": "string",
+ "description": "used internally to save last used image ID for build"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ImageChangeTrigger"
+ },
+ "os_build_SourceBuildStrategy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "env": {
+ "type": "array",
+ "description": "additional environment variables you want to pass into a builder container",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EnvVar",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ }
+ },
+ "forcePull": {
+ "type": "boolean",
+ "description": "forces the source build to pull the image if true"
+ },
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "incremental": {
+ "type": "boolean",
+ "description": "forces the source build to do incremental builds if true"
+ },
+ "pullSecret": {
+ "$ref": "#/definitions/kubernetes_LocalObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
+ },
+ "scripts": {
+ "type": "string",
+ "description": "location of the source scripts"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.SourceBuildStrategy"
+ },
+ "os_build_SourceControlUser": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "email": {
+ "type": "string",
+ "description": "e-mail of the source control user"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of the source control user"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.SourceControlUser"
+ },
+ "os_build_SourceRevision": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "git": {
+ "$ref": "#/definitions/os_build_GitSourceRevision",
+ "javaType": "io.fabric8.openshift.api.model.GitSourceRevision"
+ },
+ "type": {
+ "type": "string",
+ "description": "type of the build source"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.SourceRevision"
+ },
+ "os_build_WebHookTrigger": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "secret": {
+ "type": "string",
+ "description": "secret used to validate requests"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
+ },
+ "os_deploy_CustomDeploymentStrategyParams": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "command": {
+ "type": "array",
+ "description": "optionally overrides the container command (default is specified by the image)",
+ "items": {
+ "type": "string",
+ "description": "optionally overrides the container command (default is specified by the image)"
+ }
+ },
+ "environment": {
+ "type": "array",
+ "description": "environment variables provided to the deployment process container",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EnvVar",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ }
+ },
+ "image": {
+ "type": "string",
+ "description": "a Docker image which can carry out a deployment"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.CustomDeploymentStrategyParams"
+ },
+ "os_deploy_DeploymentCause": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "imageTrigger": {
+ "$ref": "#/definitions/os_deploy_DeploymentCauseImageTrigger",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentCauseImageTrigger"
+ },
+ "type": {
+ "type": "string",
+ "description": "the type of trigger that resulted in a new deployment"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentCause"
+ },
+ "os_deploy_DeploymentCauseImageTrigger": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentCauseImageTrigger"
+ },
+ "os_deploy_DeploymentConfig": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "DeploymentConfig",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/os_deploy_DeploymentConfigSpec",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfigSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/os_deploy_DeploymentConfigStatus",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfigStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfig",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_deploy_DeploymentConfigList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "a list of deployment configs",
+ "items": {
+ "$ref": "#/definitions/os_deploy_DeploymentConfig",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfig"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "DeploymentConfigList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfigList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_deploy_DeploymentConfigSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "replicas": {
+ "type": "integer",
+ "description": "the desired number of replicas"
+ },
+ "selector": {
+ "type": "object",
+ "description": "a label query over pods that should match the replicas count",
+ "additionalProperties": {
+ "type": "string",
+ "description": "a label query over pods that should match the replicas count"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "strategy": {
+ "$ref": "#/definitions/os_deploy_DeploymentStrategy",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentStrategy"
+ },
+ "template": {
+ "$ref": "#/definitions/kubernetes_PodTemplateSpec",
+ "javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
+ },
+ "triggers": {
+ "type": "array",
+ "description": "how new deployments are triggered",
+ "items": {
+ "$ref": "#/definitions/os_deploy_DeploymentTriggerPolicy",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerPolicy"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfigSpec"
+ },
+ "os_deploy_DeploymentConfigStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "details": {
+ "$ref": "#/definitions/os_deploy_DeploymentDetails",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentDetails"
+ },
+ "latestVersion": {
+ "type": "integer",
+ "description": "used to determine whether the current deployment is out of sync"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfigStatus"
+ },
+ "os_deploy_DeploymentDetails": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "causes": {
+ "type": "array",
+ "description": "extended data associated with all the causes for creating a new deployment",
+ "items": {
+ "$ref": "#/definitions/os_deploy_DeploymentCause",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentCause"
+ }
+ },
+ "message": {
+ "type": "string",
+ "description": "a user specified change message"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentDetails"
+ },
+ "os_deploy_DeploymentStrategy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "customParams": {
+ "$ref": "#/definitions/os_deploy_CustomDeploymentStrategyParams",
+ "javaType": "io.fabric8.openshift.api.model.CustomDeploymentStrategyParams"
+ },
+ "recreateParams": {
+ "$ref": "#/definitions/os_deploy_RecreateDeploymentStrategyParams",
+ "javaType": "io.fabric8.openshift.api.model.RecreateDeploymentStrategyParams"
+ },
+ "resources": {
+ "$ref": "#/definitions/kubernetes_ResourceRequirements",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
+ },
+ "rollingParams": {
+ "$ref": "#/definitions/os_deploy_RollingDeploymentStrategyParams",
+ "javaType": "io.fabric8.openshift.api.model.RollingDeploymentStrategyParams"
+ },
+ "type": {
+ "type": "string",
+ "description": "the name of a deployment strategy"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentStrategy"
+ },
+ "os_deploy_DeploymentTriggerImageChangeParams": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "automatic": {
+ "type": "boolean",
+ "description": "whether detection of a new tag value should trigger a deployment"
+ },
+ "containerNames": {
+ "type": "array",
+ "description": "restricts tag updates to a set of container names in the pod",
+ "items": {
+ "type": "string",
+ "description": "restricts tag updates to a set of container names in the pod"
+ }
+ },
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "lastTriggeredImage": {
+ "type": "string",
+ "description": "the last image to be triggered"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerImageChangeParams"
+ },
+ "os_deploy_DeploymentTriggerPolicy": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "imageChangeParams": {
+ "$ref": "#/definitions/os_deploy_DeploymentTriggerImageChangeParams",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerImageChangeParams"
+ },
+ "type": {
+ "type": "string",
+ "description": "the type of the trigger"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.DeploymentTriggerPolicy"
+ },
+ "os_deploy_ExecNewPodHook": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "command": {
+ "type": "array",
+ "description": "the hook command and its arguments",
+ "items": {
+ "type": "string",
+ "description": "the hook command and its arguments"
+ }
+ },
+ "containerName": {
+ "type": "string",
+ "description": "the name of a container from the pod template whose image will be used for the hook container"
+ },
+ "env": {
+ "type": "array",
+ "description": "environment variables provided to the hook container",
+ "items": {
+ "$ref": "#/definitions/kubernetes_EnvVar",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ExecNewPodHook"
+ },
+ "os_deploy_LifecycleHook": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "execNewPod": {
+ "$ref": "#/definitions/os_deploy_ExecNewPodHook",
+ "javaType": "io.fabric8.openshift.api.model.ExecNewPodHook"
+ },
+ "failurePolicy": {
+ "type": "string",
+ "description": "what action to take if the hook fails"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
+ },
+ "os_deploy_RecreateDeploymentStrategyParams": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "post": {
+ "$ref": "#/definitions/os_deploy_LifecycleHook",
+ "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
+ },
+ "pre": {
+ "$ref": "#/definitions/os_deploy_LifecycleHook",
+ "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RecreateDeploymentStrategyParams"
+ },
+ "os_deploy_RollingDeploymentStrategyParams": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "intervalSeconds": {
+ "type": "integer",
+ "description": "the time to wait between polling deployment status after update",
+ "javaType": "Long"
+ },
+ "post": {
+ "$ref": "#/definitions/os_deploy_LifecycleHook",
+ "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
+ },
+ "pre": {
+ "$ref": "#/definitions/os_deploy_LifecycleHook",
+ "javaType": "io.fabric8.openshift.api.model.LifecycleHook"
+ },
+ "timeoutSeconds": {
+ "type": "integer",
+ "description": "the time to wait for updates before giving up",
+ "javaType": "Long"
+ },
+ "updatePercent": {
+ "type": "integer",
+ "description": "the percentage of replicas to scale up or down each interval (negative value switches scale order to down/up instead of up/down)"
+ },
+ "updatePeriodSeconds": {
+ "type": "integer",
+ "description": "the time to wait between individual pod updates",
+ "javaType": "Long"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RollingDeploymentStrategyParams"
+ },
+ "os_image_Image": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "dockerImageManifest": {
+ "type": "string",
+ "description": "raw JSON of the manifest"
+ },
+ "dockerImageMetadata": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ },
+ "dockerImageMetadataVersion": {
+ "type": "string",
+ "description": "conveys version of the object"
+ },
+ "dockerImageReference": {
+ "type": "string",
+ "description": "string that can be used to pull this image"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Image",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Image",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_image_ImageList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of image objects",
+ "items": {
+ "$ref": "#/definitions/os_image_Image",
+ "javaType": "io.fabric8.openshift.api.model.Image"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ImageList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ImageList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_image_ImageStream": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ImageStream",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/os_image_ImageStreamSpec",
+ "javaType": "io.fabric8.openshift.api.model.ImageStreamSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/os_image_ImageStreamStatus",
+ "javaType": "io.fabric8.openshift.api.model.ImageStreamStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ImageStream",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_image_ImageStreamList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of image stream objects",
+ "items": {
+ "$ref": "#/definitions/os_image_ImageStream",
+ "javaType": "io.fabric8.openshift.api.model.ImageStream"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ImageStreamList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ImageStreamList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_image_ImageStreamSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "dockerImageRepository": {
+ "type": "string",
+ "description": "optional field if specified this stream is backed by a Docker repository on this server"
+ },
+ "tags": {
+ "type": "array",
+ "description": "map arbitrary string values to specific image locators",
+ "items": {
+ "$ref": "#/definitions/os_image_NamedTagReference",
+ "javaType": "io.fabric8.openshift.api.model.NamedTagReference"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ImageStreamSpec"
+ },
+ "os_image_ImageStreamStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "dockerImageRepository": {
+ "type": "string",
+ "description": "represents the effective location this stream may be accessed at"
+ },
+ "tags": {
+ "type": "array",
+ "description": "historical record of images associated with each tag",
+ "items": {
+ "$ref": "#/definitions/os_image_NamedTagEventList",
+ "javaType": "io.fabric8.openshift.api.model.NamedTagEventList"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ImageStreamStatus"
+ },
+ "os_image_NamedTagEventList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "list of tag events related to the tag",
+ "items": {
+ "$ref": "#/definitions/os_image_TagEvent",
+ "javaType": "io.fabric8.openshift.api.model.TagEvent"
+ }
+ },
+ "tag": {
+ "type": "string",
+ "description": "the tag"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.NamedTagEventList"
+ },
+ "os_image_NamedTagReference": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "annotations": {
+ "type": "object",
+ "description": "annotations associated with images using this tag",
+ "additionalProperties": {
+ "type": "string",
+ "description": "annotations associated with images using this tag"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "from": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of tag"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.NamedTagReference"
+ },
+ "os_image_TagEvent": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "created": {
+ "type": "string",
+ "description": "when the event was created"
+ },
+ "dockerImageReference": {
+ "type": "string",
+ "description": "the string that can be used to pull this image"
+ },
+ "image": {
+ "type": "string",
+ "description": "the image"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.TagEvent"
+ },
+ "os_oauth_OAuthAccessToken": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "authorizeToken": {
+ "type": "string",
+ "description": "contains the token that authorized this token"
+ },
+ "clientName": {
+ "type": "string",
+ "description": "references the client that created this token"
+ },
+ "expiresIn": {
+ "type": "integer",
+ "description": "is the seconds from creation time before this token expires",
+ "javaType": "Long"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthAccessToken",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "redirectURI": {
+ "type": "string",
+ "description": "redirection URI associated with the token"
+ },
+ "refreshToken": {
+ "type": "string",
+ "description": "optional value by which this token can be renewed"
+ },
+ "scopes": {
+ "type": "array",
+ "description": "list of requested scopes",
+ "items": {
+ "type": "string",
+ "description": "list of requested scopes"
+ }
+ },
+ "userName": {
+ "type": "string",
+ "description": "user name associated with this token"
+ },
+ "userUID": {
+ "type": "string",
+ "description": "unique UID associated with this token"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthAccessToken",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_oauth_OAuthAccessTokenList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of oauth access tokens",
+ "items": {
+ "$ref": "#/definitions/os_oauth_OAuthAccessToken",
+ "javaType": "io.fabric8.openshift.api.model.OAuthAccessToken"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthAccessTokenList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthAccessTokenList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_oauth_OAuthAuthorizeToken": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "clientName": {
+ "type": "string",
+ "description": "references the client that created this token"
+ },
+ "expiresIn": {
+ "type": "integer",
+ "description": "seconds from creation time before this token expires",
+ "javaType": "Long"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthAuthorizeToken",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "redirectURI": {
+ "type": "string",
+ "description": "redirection URI associated with the token"
+ },
+ "scopes": {
+ "type": "array",
+ "description": "list of requested scopes",
+ "items": {
+ "type": "string",
+ "description": "list of requested scopes"
+ }
+ },
+ "state": {
+ "type": "string",
+ "description": "state data from request"
+ },
+ "userName": {
+ "type": "string",
+ "description": "user name associated with this token"
+ },
+ "userUID": {
+ "type": "string",
+ "description": "unique UID associated with this token. userUID and userName must both match for this token to be valid"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_oauth_OAuthAuthorizeTokenList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of oauth authorization tokens",
+ "items": {
+ "$ref": "#/definitions/os_oauth_OAuthAuthorizeToken",
+ "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthAuthorizeTokenList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeTokenList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_oauth_OAuthClient": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthClient",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "redirectURIs": {
+ "type": "array",
+ "description": "valid redirection URIs associated with a client",
+ "items": {
+ "type": "string",
+ "description": "valid redirection URIs associated with a client"
+ }
+ },
+ "respondWithChallenges": {
+ "type": "boolean",
+ "description": "indicates whether the client wants authentication needed responses made in the form of challenges instead of redirects"
+ },
+ "secret": {
+ "type": "string",
+ "description": "unique secret associated with a client"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthClient",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_oauth_OAuthClientAuthorization": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "clientName": {
+ "type": "string",
+ "description": "references the client that created this authorization"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthClientAuthorization",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "scopes": {
+ "type": "array",
+ "description": "list of granted scopes",
+ "items": {
+ "type": "string",
+ "description": "list of granted scopes"
+ }
+ },
+ "userName": {
+ "type": "string",
+ "description": "user name that authorized this client"
+ },
+ "userUID": {
+ "type": "string",
+ "description": "unique UID associated with this authorization. userUID and userName must both match for this authorization to be valid"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_oauth_OAuthClientAuthorizationList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of oauth client authorizations",
+ "items": {
+ "$ref": "#/definitions/os_oauth_OAuthClientAuthorization",
+ "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthClientAuthorizationList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorizationList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_oauth_OAuthClientList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of oauth clients",
+ "items": {
+ "$ref": "#/definitions/os_oauth_OAuthClient",
+ "javaType": "io.fabric8.openshift.api.model.OAuthClient"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "OAuthClientList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.OAuthClientList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_project_Project": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Project",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/os_project_ProjectSpec",
+ "javaType": "io.fabric8.openshift.api.model.ProjectSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/os_project_ProjectStatus",
+ "javaType": "io.fabric8.openshift.api.model.ProjectStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Project",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_project_ProjectList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of projects",
+ "items": {
+ "$ref": "#/definitions/os_project_Project",
+ "javaType": "io.fabric8.openshift.api.model.Project"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ProjectList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ProjectList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_project_ProjectRequest": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "description": {
+ "type": "string",
+ "description": "description to apply to a project"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "display name to apply to a project"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "ProjectRequest",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ProjectRequest",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_project_ProjectSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "finalizers": {
+ "type": "array",
+ "description": "an opaque list of values that must be empty to permanently remove object from storage",
+ "items": {
+ "type": "string",
+ "description": "an opaque list of values that must be empty to permanently remove object from storage"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ProjectSpec"
+ },
+ "os_project_ProjectStatus": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "phase": {
+ "type": "string",
+ "description": "phase is the current lifecycle phase of the project"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.ProjectStatus"
+ },
+ "os_route_Route": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Route",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/os_route_RouteSpec",
+ "javaType": "io.fabric8.openshift.api.model.RouteSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/os_route_RouteStatus",
+ "javaType": "io.fabric8.openshift.api.model.RouteStatus"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Route",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_route_RouteList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of routes",
+ "items": {
+ "$ref": "#/definitions/os_route_Route",
+ "javaType": "io.fabric8.openshift.api.model.Route"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "RouteList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RouteList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_route_RouteSpec": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "host": {
+ "type": "string",
+ "description": "optional: alias/dns that points to the service"
+ },
+ "path": {
+ "type": "string",
+ "description": "optional: path that the router watches to route traffic to the service"
+ },
+ "tls": {
+ "$ref": "#/definitions/os_route_TLSConfig",
+ "javaType": "io.fabric8.openshift.api.model.TLSConfig"
+ },
+ "to": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RouteSpec"
+ },
+ "os_route_RouteStatus": {
+ "type": "object",
+ "description": "",
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.RouteStatus"
+ },
+ "os_route_TLSConfig": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "caCertificate": {
+ "type": "string",
+ "description": "provides the cert authority certificate contents"
+ },
+ "certificate": {
+ "type": "string",
+ "description": "provides certificate contents"
+ },
+ "destinationCACertificate": {
+ "type": "string",
+ "description": "provides the contents of the ca certificate of the final destination. When using re-encrypt termination this file should be provided in order to have routers use it for health checks on the secure connection"
+ },
+ "key": {
+ "type": "string",
+ "description": "provides key file contents"
+ },
+ "termination": {
+ "type": "string",
+ "description": "indicates termination type. if not set"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.TLSConfig"
+ },
+ "os_template_Parameter": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "description": {
+ "type": "string",
+ "description": "optional: describes the parameter"
+ },
+ "from": {
+ "type": "string",
+ "description": "input value for the generator"
+ },
+ "generate": {
+ "type": "string",
+ "description": "optional: generate specifies the generator to be used to generate random string from an input value specified by the from field. the result string is stored in the value field. if not specified"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of the parameter"
+ },
+ "required": {
+ "type": "boolean",
+ "description": "indicates the parameter must have a non-empty value or be generated"
+ },
+ "value": {
+ "type": "string",
+ "description": "optional: holds the parameter data. if specified"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Parameter"
+ },
+ "os_template_Template": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Template",
+ "required": true
+ },
+ "labels": {
+ "type": "object",
+ "description": "optional: list of lables that are applied to every object during the template to config transformation",
+ "additionalProperties": {
+ "type": "string",
+ "description": "optional: list of lables that are applied to every object during the template to config transformation"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "objects": {
+ "type": "array",
+ "description": "list of objects to include in the template",
+ "items": {
+ "$ref": "#/definitions/kubernetes_runtime_RawExtension",
+ "javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
+ }
+ },
+ "parameters": {
+ "type": "array",
+ "description": "optional: list of parameters used during template to config transformation",
+ "items": {
+ "$ref": "#/definitions/os_template_Parameter",
+ "javaType": "io.fabric8.openshift.api.model.Parameter"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Template",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_template_TemplateList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of templates",
+ "items": {
+ "$ref": "#/definitions/os_template_Template",
+ "javaType": "io.fabric8.openshift.api.model.Template"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "TemplateList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.TemplateList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_user_Group": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Group",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "users": {
+ "type": "array",
+ "description": "list of users in this group",
+ "items": {
+ "type": "string",
+ "description": "list of users in this group"
+ }
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Group",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_user_GroupList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of groups",
+ "items": {
+ "$ref": "#/definitions/os_user_Group",
+ "javaType": "io.fabric8.openshift.api.model.Group"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "GroupList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.GroupList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_user_Identity": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "extra": {
+ "type": "object",
+ "description": "extra information for this identity",
+ "additionalProperties": {
+ "type": "string",
+ "description": "extra information for this identity"
+ },
+ "javaType": "java.util.Map\u003cString,String\u003e"
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "Identity",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "providerName": {
+ "type": "string",
+ "description": "source of identity information"
+ },
+ "providerUserName": {
+ "type": "string",
+ "description": "uniquely represents this identity in the scope of the provider"
+ },
+ "user": {
+ "$ref": "#/definitions/kubernetes_ObjectReference",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Identity",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_user_IdentityList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of identities",
+ "items": {
+ "$ref": "#/definitions/os_user_Identity",
+ "javaType": "io.fabric8.openshift.api.model.Identity"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "IdentityList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.IdentityList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "os_user_User": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "fullName": {
+ "type": "string",
+ "description": "full name of user"
+ },
+ "groups": {
+ "type": "array",
+ "description": "list of groups",
+ "items": {
+ "type": "string",
+ "description": "list of groups"
+ }
+ },
+ "identities": {
+ "type": "array",
+ "description": "list of identities",
+ "items": {
+ "type": "string",
+ "description": "list of identities"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "User",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.User",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.HasMetadata"
+ ]
+ },
+ "os_user_UserList": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "",
+ "default": "v1",
+ "required": true,
+ "enum": [
+ "v1"
+ ]
+ },
+ "items": {
+ "type": "array",
+ "description": "list of users",
+ "items": {
+ "$ref": "#/definitions/os_user_User",
+ "javaType": "io.fabric8.openshift.api.model.User"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "",
+ "default": "UserList",
+ "required": true
+ },
+ "metadata": {
+ "$ref": "#/definitions/kubernetes_ListMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ListMeta"
+ }
+ },
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.UserList",
+ "javaInterfaces": [
+ "io.fabric8.kubernetes.api.model.KubernetesResource",
+ "io.fabric8.kubernetes.api.model.KubernetesResourceList"
+ ]
+ },
+ "speter_inf_Dec": {
+ "type": "object",
+ "description": "",
+ "additionalProperties": true,
+ "javaType": "io.fabric8.openshift.api.model.Dec"
+ }
+ },
+ "type": "object",
+ "properties": {
+ "BaseKubernetesList": {
+ "$ref": "#/definitions/kubernetes_List",
+ "javaType": "io.fabric8.kubernetes.api.model.BaseKubernetesList"
+ },
+ "BuildConfigList": {
+ "$ref": "#/definitions/os_build_BuildConfigList",
+ "javaType": "io.fabric8.openshift.api.model.BuildConfigList"
+ },
+ "BuildList": {
+ "$ref": "#/definitions/os_build_BuildList",
+ "javaType": "io.fabric8.openshift.api.model.BuildList"
+ },
+ "BuildRequest": {
+ "$ref": "#/definitions/os_build_BuildRequest",
+ "javaType": "io.fabric8.openshift.api.model.BuildRequest"
+ },
+ "ClusterPolicy": {
+ "$ref": "#/definitions/os_authorization_ClusterPolicy",
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicy"
+ },
+ "ClusterPolicyBinding": {
+ "$ref": "#/definitions/os_authorization_ClusterPolicyBinding",
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding"
+ },
+ "ClusterPolicyBindingList": {
+ "$ref": "#/definitions/os_authorization_ClusterPolicyBindingList",
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicyBindingList"
+ },
+ "ClusterPolicyList": {
+ "$ref": "#/definitions/os_authorization_ClusterPolicyList",
+ "javaType": "io.fabric8.openshift.api.model.ClusterPolicyList"
+ },
+ "ClusterRoleBinding": {
+ "$ref": "#/definitions/os_authorization_ClusterRoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
+ },
+ "ClusterRoleBindingList": {
+ "$ref": "#/definitions/os_authorization_ClusterRoleBindingList",
+ "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList"
+ },
+ "Config": {
+ "$ref": "#/definitions/kubernetes_config_Config",
+ "javaType": "io.fabric8.kubernetes.api.model.Config"
+ },
+ "ContainerStatus": {
+ "$ref": "#/definitions/kubernetes_ContainerStatus",
+ "javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
+ },
+ "DeploymentConfigList": {
+ "$ref": "#/definitions/os_deploy_DeploymentConfigList",
+ "javaType": "io.fabric8.openshift.api.model.DeploymentConfigList"
+ },
+ "Endpoints": {
+ "$ref": "#/definitions/kubernetes_Endpoints",
+ "javaType": "io.fabric8.kubernetes.api.model.Endpoints"
+ },
+ "EndpointsList": {
+ "$ref": "#/definitions/kubernetes_EndpointsList",
+ "javaType": "io.fabric8.kubernetes.api.model.EndpointsList"
+ },
+ "EnvVar": {
+ "$ref": "#/definitions/kubernetes_EnvVar",
+ "javaType": "io.fabric8.kubernetes.api.model.EnvVar"
+ },
+ "EventList": {
+ "$ref": "#/definitions/kubernetes_EventList",
+ "javaType": "io.fabric8.kubernetes.api.model.EventList"
+ },
+ "Group": {
+ "$ref": "#/definitions/os_user_Group",
+ "javaType": "io.fabric8.openshift.api.model.Group"
+ },
+ "GroupList": {
+ "$ref": "#/definitions/os_user_GroupList",
+ "javaType": "io.fabric8.openshift.api.model.GroupList"
+ },
+ "Identity": {
+ "$ref": "#/definitions/os_user_Identity",
+ "javaType": "io.fabric8.openshift.api.model.Identity"
+ },
+ "IdentityList": {
+ "$ref": "#/definitions/os_user_IdentityList",
+ "javaType": "io.fabric8.openshift.api.model.IdentityList"
+ },
+ "ImageList": {
+ "$ref": "#/definitions/os_image_ImageList",
+ "javaType": "io.fabric8.openshift.api.model.ImageList"
+ },
+ "ImageStreamList": {
+ "$ref": "#/definitions/os_image_ImageStreamList",
+ "javaType": "io.fabric8.openshift.api.model.ImageStreamList"
+ },
+ "LocalSubjectAccessReview": {
+ "$ref": "#/definitions/os_authorization_LocalSubjectAccessReview",
+ "javaType": "io.fabric8.openshift.api.model.LocalSubjectAccessReview"
+ },
+ "Namespace": {
+ "$ref": "#/definitions/kubernetes_Namespace",
+ "javaType": "io.fabric8.kubernetes.api.model.Namespace"
+ },
+ "NamespaceList": {
+ "$ref": "#/definitions/kubernetes_NamespaceList",
+ "javaType": "io.fabric8.kubernetes.api.model.NamespaceList"
+ },
+ "Node": {
+ "$ref": "#/definitions/kubernetes_Node",
+ "javaType": "io.fabric8.kubernetes.api.model.Node"
+ },
+ "NodeList": {
+ "$ref": "#/definitions/kubernetes_NodeList",
+ "javaType": "io.fabric8.kubernetes.api.model.NodeList"
+ },
+ "OAuthAccessToken": {
+ "$ref": "#/definitions/os_oauth_OAuthAccessToken",
+ "javaType": "io.fabric8.openshift.api.model.OAuthAccessToken"
+ },
+ "OAuthAccessTokenList": {
+ "$ref": "#/definitions/os_oauth_OAuthAccessTokenList",
+ "javaType": "io.fabric8.openshift.api.model.OAuthAccessTokenList"
+ },
+ "OAuthAuthorizeToken": {
+ "$ref": "#/definitions/os_oauth_OAuthAuthorizeToken",
+ "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken"
+ },
+ "OAuthAuthorizeTokenList": {
+ "$ref": "#/definitions/os_oauth_OAuthAuthorizeTokenList",
+ "javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeTokenList"
+ },
+ "OAuthClient": {
+ "$ref": "#/definitions/os_oauth_OAuthClient",
+ "javaType": "io.fabric8.openshift.api.model.OAuthClient"
+ },
+ "OAuthClientAuthorization": {
+ "$ref": "#/definitions/os_oauth_OAuthClientAuthorization",
+ "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization"
+ },
+ "OAuthClientAuthorizationList": {
+ "$ref": "#/definitions/os_oauth_OAuthClientAuthorizationList",
+ "javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorizationList"
+ },
+ "OAuthClientList": {
+ "$ref": "#/definitions/os_oauth_OAuthClientList",
+ "javaType": "io.fabric8.openshift.api.model.OAuthClientList"
+ },
+ "ObjectMeta": {
+ "$ref": "#/definitions/kubernetes_ObjectMeta",
+ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
+ },
+ "PersistentVolume": {
+ "$ref": "#/definitions/kubernetes_PersistentVolume",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolume"
+ },
+ "PersistentVolumeClaim": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeClaim",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim"
+ },
+ "PersistentVolumeClaimList": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeClaimList",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimList"
+ },
+ "PersistentVolumeList": {
+ "$ref": "#/definitions/kubernetes_PersistentVolumeList",
+ "javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeList"
+ },
+ "PodList": {
+ "$ref": "#/definitions/kubernetes_PodList",
+ "javaType": "io.fabric8.kubernetes.api.model.PodList"
+ },
+ "Policy": {
+ "$ref": "#/definitions/os_authorization_Policy",
+ "javaType": "io.fabric8.openshift.api.model.Policy"
+ },
+ "PolicyBinding": {
+ "$ref": "#/definitions/os_authorization_PolicyBinding",
+ "javaType": "io.fabric8.openshift.api.model.PolicyBinding"
+ },
+ "PolicyBindingList": {
+ "$ref": "#/definitions/os_authorization_PolicyBindingList",
+ "javaType": "io.fabric8.openshift.api.model.PolicyBindingList"
+ },
+ "PolicyList": {
+ "$ref": "#/definitions/os_authorization_PolicyList",
+ "javaType": "io.fabric8.openshift.api.model.PolicyList"
+ },
+ "Project": {
+ "$ref": "#/definitions/os_project_Project",
+ "javaType": "io.fabric8.openshift.api.model.Project"
+ },
+ "ProjectList": {
+ "$ref": "#/definitions/os_project_ProjectList",
+ "javaType": "io.fabric8.openshift.api.model.ProjectList"
+ },
+ "ProjectRequest": {
+ "$ref": "#/definitions/os_project_ProjectRequest",
+ "javaType": "io.fabric8.openshift.api.model.ProjectRequest"
+ },
+ "Quantity": {
+ "$ref": "#/definitions/kubernetes_resource_Quantity",
+ "javaType": "io.fabric8.kubernetes.api.model.Quantity"
+ },
+ "ReplicationControllerList": {
+ "$ref": "#/definitions/kubernetes_ReplicationControllerList",
+ "javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerList"
+ },
+ "ResourceQuota": {
+ "$ref": "#/definitions/kubernetes_ResourceQuota",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuota"
+ },
+ "ResourceQuotaList": {
+ "$ref": "#/definitions/kubernetes_ResourceQuotaList",
+ "javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaList"
+ },
+ "Role": {
+ "$ref": "#/definitions/os_authorization_Role",
+ "javaType": "io.fabric8.openshift.api.model.Role"
+ },
+ "RoleBinding": {
+ "$ref": "#/definitions/os_authorization_RoleBinding",
+ "javaType": "io.fabric8.openshift.api.model.RoleBinding"
+ },
+ "RoleBindingList": {
+ "$ref": "#/definitions/os_authorization_RoleBindingList",
+ "javaType": "io.fabric8.openshift.api.model.RoleBindingList"
+ },
+ "RoleList": {
+ "$ref": "#/definitions/os_authorization_RoleList",
+ "javaType": "io.fabric8.openshift.api.model.RoleList"
+ },
+ "RootPaths": {
+ "$ref": "#/definitions/api_RootPaths",
+ "javaType": "io.fabric8.kubernetes.api.model.RootPaths"
+ },
+ "RouteList": {
+ "$ref": "#/definitions/os_route_RouteList",
+ "javaType": "io.fabric8.openshift.api.model.RouteList"
+ },
+ "Secret": {
+ "$ref": "#/definitions/kubernetes_Secret",
+ "javaType": "io.fabric8.kubernetes.api.model.Secret"
+ },
+ "SecretList": {
+ "$ref": "#/definitions/kubernetes_SecretList",
+ "javaType": "io.fabric8.kubernetes.api.model.SecretList"
+ },
+ "SecurityContextConstraints": {
+ "$ref": "#/definitions/kubernetes_SecurityContextConstraints",
+ "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints"
+ },
+ "SecurityContextConstraintsList": {
+ "$ref": "#/definitions/kubernetes_SecurityContextConstraintsList",
+ "javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraintsList"
+ },
+ "ServiceAccount": {
+ "$ref": "#/definitions/kubernetes_ServiceAccount",
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceAccount"
+ },
+ "ServiceAccountList": {
+ "$ref": "#/definitions/kubernetes_ServiceAccountList",
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceAccountList"
+ },
+ "ServiceList": {
+ "$ref": "#/definitions/kubernetes_ServiceList",
+ "javaType": "io.fabric8.kubernetes.api.model.ServiceList"
+ },
+ "Status": {
+ "$ref": "#/definitions/kubernetes_Status",
+ "javaType": "io.fabric8.kubernetes.api.model.Status"
+ },
+ "SubjectAccessReview": {
+ "$ref": "#/definitions/os_authorization_SubjectAccessReview",
+ "javaType": "io.fabric8.openshift.api.model.SubjectAccessReview"
+ },
+ "SubjectAccessReviewResponse": {
+ "$ref": "#/definitions/os_authorization_SubjectAccessReviewResponse",
+ "javaType": "io.fabric8.openshift.api.model.SubjectAccessReviewResponse"
+ },
+ "TagEvent": {
+ "$ref": "#/definitions/os_image_TagEvent",
+ "javaType": "io.fabric8.openshift.api.model.TagEvent"
+ },
+ "Template": {
+ "$ref": "#/definitions/os_template_Template",
+ "javaType": "io.fabric8.openshift.api.model.Template"
+ },
+ "TemplateList": {
+ "$ref": "#/definitions/os_template_TemplateList",
+ "javaType": "io.fabric8.openshift.api.model.TemplateList"
+ },
+ "User": {
+ "$ref": "#/definitions/os_user_User",
+ "javaType": "io.fabric8.openshift.api.model.User"
+ },
+ "UserList": {
+ "$ref": "#/definitions/os_user_UserList",
+ "javaType": "io.fabric8.openshift.api.model.UserList"
+ },
+ "WatchEvent": {
+ "$ref": "#/definitions/kubernetes_watch_WatchEvent",
+ "javaType": "io.fabric8.kubernetes.api.model.WatchEvent"
+ }
+ },
+ "additionalProperties": true
+ }
+
+
}
\ No newline at end of file
diff --git a/plugins/kubernetes/ts/schemaHelpers.ts b/plugins/kubernetes/ts/schemaHelpers.ts
index 2a91fc2..60c8450 100644
--- a/plugins/kubernetes/ts/schemaHelpers.ts
+++ b/plugins/kubernetes/ts/schemaHelpers.ts
@@ -1,26 +1,26 @@
-///
-///
-module Kubernetes {
-
- export function schemaSetRequired(schema, propertyName, isRequired = true) {
- if (schema && propertyName) {
- var required = schema.required;
- if (isRequired) {
- if (!required) {
- required = [];
- schema.required = required;
- }
- if (!_.contains(required, propertyName)) {
- required.push(propertyName);
- }
- } else {
- if (required) {
- var idx = required.indexOf(propertyName);
- if (idx >= 0) {
- required.splice(idx, 1);
- }
- }
- }
- }
- }
-}
+///
+///
+module Kubernetes {
+
+ export function schemaSetRequired(schema, propertyName, isRequired = true) {
+ if (schema && propertyName) {
+ var required = schema.required;
+ if (isRequired) {
+ if (!required) {
+ required = [];
+ schema.required = required;
+ }
+ if (!_.contains(required, propertyName)) {
+ required.push(propertyName);
+ }
+ } else {
+ if (required) {
+ var idx = required.indexOf(propertyName);
+ if (idx >= 0) {
+ required.splice(idx, 1);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/kubernetes/ts/secret.ts b/plugins/kubernetes/ts/secret.ts
index 3d11972..18211c9 100644
--- a/plugins/kubernetes/ts/secret.ts
+++ b/plugins/kubernetes/ts/secret.ts
@@ -1,250 +1,250 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var SecretController = controller("SecretController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "K8SClientFactory",
- ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, K8SClientFactory) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- selectSubNavBar($scope, "Secrets", $scope.id ? "Edit Secret: " + $scope.id : "Create Secret");
-
- var kubeClient = createKubernetesClient("secrets");
-
- var onSaveUrl = $location.search()["savedUrl"];
- var createKind = $location.search()["kind"];
-
- $scope.sshKeys = sshSecretDataKeys;
- $scope.httpsKeys = httpsSecretDataKeys;
-
- var secretLabels = {
- "ssh-key": "SSH private key",
- "ssh-key.pub": "SSH public key",
- "ca.crt": "CA Certificate",
- ".dockercfg": "Docker config",
- "username": "User name"
- };
- var secretTooltips = {
- "ssh-key": "SSH private key text contents",
- "ca.crt": "Certificate Authority (CA) Certificate",
- ".dockercfg": "Docker configuration token"
- };
-
-
- $scope.$on('kubernetesModelUpdated', function () {
- if ($scope.id && !$scope.secret) {
- updateData();
- }
- });
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- $scope.propertyKeys = () => {
- return _.keys(secretLabels);
- };
-
- $scope.checkNameUnique = (value) => {
- var answer = true;
- angular.forEach($scope.model.secrets, (secret) => {
- var name = getName(secret);
- if (value === name) {
- answer = false;
- }
- });
- return answer;
- };
-
- $scope.checkFieldUnique = (key) => {
- return $scope.entity.properties[key] ? false : true;
- };
-
- $scope.hasAllKeys = (keys) => {
- var answer = keys && keys.length;
- angular.forEach(keys, (key) => {
- if (!$scope.entity.properties[key]) {
- answer = false;
- }
- });
- return answer;
- };
-
- $scope.addFieldDialog = {
- controller: null,
- newReplicas: 0,
- dialog: new UI.Dialog(),
- onOk: () => {
- $scope.addFieldDialog.dialog.close();
- $scope.addDataField();
- },
- open: (controller) => {
- var addFieldDialog = $scope.addFieldDialog;
- addFieldDialog.dialog.open();
-
- $timeout(() => {
- $('#newDataName').focus();
- }, 50);
- },
- close: () => {
- $scope.addFieldDialog.dialog.close();
- }
- };
-
-
-
- $scope.entityChanged = () => {
- $scope.changed = true;
- };
-
- $scope.addFields = (keys) => {
- angular.forEach(keys, (key) => addField(key));
- Core.$apply($scope);
- };
-
- function addField(key) {
- var property = createProperty(key, "");
- $scope.entity.properties[key] = property;
- $scope.entity.newDataKey = "";
- $scope.showAddDataFieldForm = false;
- $scope.entityChanged();
- }
-
- $scope.addDataField = () => {
- var key = $scope.entity.newDataKey;
- if (key) {
- addField(key);
- Core.$apply($scope);
- }
- };
-
- $scope.deleteProperty = (key) => {
- if (key) {
- delete $scope.entity.properties[key];
- $scope.entityChanged();
- Core.$apply($scope);
- }
- };
-
- $scope.cancel = () => {
- updateData();
- };
-
- $scope.save = () => {
- var entity = $scope.entity || {};
- var name = entity.name;
- if (name) {
- if (!$scope.secret) {
- $scope.secret = {
- apiVersion: Kubernetes.defaultApiVersion,
- kind: "Secret",
- metadata: {
- name: ""
- },
- data: {}
- }
- }
- var data = {};
- angular.forEach(entity.properties, (property) => {
- var key = property.key;
- var value = property.value || "";
- if (key) {
- data[key] = window.btoa(value);
- }
- });
- $scope.secret.metadata.name = name;
- $scope.secret.data = data;
-
- Core.notification('info', "Saving secret " + name);
-
- kubeClient.put($scope.secret,
- (data) => {
- var secretsLink = onSaveUrl || Developer.namespaceLink($scope, $routeParams, "secrets");
- var params = {};
- if (onSaveUrl) {
- params['secret'] = name;
- }
- $location.path(secretsLink);
- $location.search(params);
- log.info("navigating to URL: " + secretsLink + " with params " + angular.toJson($location.search()));
- },
- (err) => {
- Core.notification('error', "Failed to secret " + name + "\n" + err);
- });
- }
- };
-
- updateData();
-
- function createProperty(key, text) {
- var label = secretLabels[key] || Core.humanizeValue(key);
- var tooltip = secretTooltips[key] || "Value of the " + label;
-
- var rows = 5;
- var lines = text.split("\n").length + 1;
- if (lines > rows) {
- rows = lines;
- }
- var type = "textarea";
- if (key === "username") {
- type = "text";
- if (!text) {
- text = currentUserName();
- }
- } else if (key === "password") {
- type = "password";
- }
- var property = {
- key: key,
- label: label,
- tooltip: tooltip,
- rows: rows,
- value: text,
- type: type
- };
- return property;
- }
-
- function updateData() {
- $scope.item = null;
- $scope.changed = false;
- $scope.entity = {
- name: $scope.id,
- properties: {}
- };
- if ($scope.id) {
- angular.forEach($scope.model.secrets, (secret) => {
- var name = getName(secret);
- if (name === $scope.id) {
- $scope.secret = secret;
- angular.forEach(secret.data, (value, key) => {
- var text = "";
- if (angular.isString(value) && value) {
- text = window.atob(value);
- }
- var property = createProperty(key, text);
- $scope.entity.properties[key] = property;
- });
- $scope.fetched = true;
- Core.$apply($scope);
- }
- });
- } else {
- if (createKind === "ssh") {
- $scope.addFields($scope.sshKeys);
- } else if (createKind === "https") {
- $scope.addFields($scope.httpsKeys);
- }
- $scope.fetched = true;
- Core.$apply($scope);
- }
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var SecretController = controller("SecretController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "K8SClientFactory",
+ ($scope, KubernetesModel:Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, K8SClientFactory) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ selectSubNavBar($scope, "Secrets", $scope.id ? "Edit Secret: " + $scope.id : "Create Secret");
+
+ var kubeClient = createKubernetesClient("secrets");
+
+ var onSaveUrl = $location.search()["savedUrl"];
+ var createKind = $location.search()["kind"];
+
+ $scope.sshKeys = sshSecretDataKeys;
+ $scope.httpsKeys = httpsSecretDataKeys;
+
+ var secretLabels = {
+ "ssh-key": "SSH private key",
+ "ssh-key.pub": "SSH public key",
+ "ca.crt": "CA Certificate",
+ ".dockercfg": "Docker config",
+ "username": "User name"
+ };
+ var secretTooltips = {
+ "ssh-key": "SSH private key text contents",
+ "ca.crt": "Certificate Authority (CA) Certificate",
+ ".dockercfg": "Docker configuration token"
+ };
+
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ if ($scope.id && !$scope.secret) {
+ updateData();
+ }
+ });
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ $scope.propertyKeys = () => {
+ return _.keys(secretLabels);
+ };
+
+ $scope.checkNameUnique = (value) => {
+ var answer = true;
+ angular.forEach($scope.model.secrets, (secret) => {
+ var name = getName(secret);
+ if (value === name) {
+ answer = false;
+ }
+ });
+ return answer;
+ };
+
+ $scope.checkFieldUnique = (key) => {
+ return $scope.entity.properties[key] ? false : true;
+ };
+
+ $scope.hasAllKeys = (keys) => {
+ var answer = keys && keys.length;
+ angular.forEach(keys, (key) => {
+ if (!$scope.entity.properties[key]) {
+ answer = false;
+ }
+ });
+ return answer;
+ };
+
+ $scope.addFieldDialog = {
+ controller: null,
+ newReplicas: 0,
+ dialog: new UI.Dialog(),
+ onOk: () => {
+ $scope.addFieldDialog.dialog.close();
+ $scope.addDataField();
+ },
+ open: (controller) => {
+ var addFieldDialog = $scope.addFieldDialog;
+ addFieldDialog.dialog.open();
+
+ $timeout(() => {
+ $('#newDataName').focus();
+ }, 50);
+ },
+ close: () => {
+ $scope.addFieldDialog.dialog.close();
+ }
+ };
+
+
+
+ $scope.entityChanged = () => {
+ $scope.changed = true;
+ };
+
+ $scope.addFields = (keys) => {
+ angular.forEach(keys, (key) => addField(key));
+ Core.$apply($scope);
+ };
+
+ function addField(key) {
+ var property = createProperty(key, "");
+ $scope.entity.properties[key] = property;
+ $scope.entity.newDataKey = "";
+ $scope.showAddDataFieldForm = false;
+ $scope.entityChanged();
+ }
+
+ $scope.addDataField = () => {
+ var key = $scope.entity.newDataKey;
+ if (key) {
+ addField(key);
+ Core.$apply($scope);
+ }
+ };
+
+ $scope.deleteProperty = (key) => {
+ if (key) {
+ delete $scope.entity.properties[key];
+ $scope.entityChanged();
+ Core.$apply($scope);
+ }
+ };
+
+ $scope.cancel = () => {
+ updateData();
+ };
+
+ $scope.save = () => {
+ var entity = $scope.entity || {};
+ var name = entity.name;
+ if (name) {
+ if (!$scope.secret) {
+ $scope.secret = {
+ apiVersion: Kubernetes.defaultApiVersion,
+ kind: "Secret",
+ metadata: {
+ name: ""
+ },
+ data: {}
+ }
+ }
+ var data = {};
+ angular.forEach(entity.properties, (property) => {
+ var key = property.key;
+ var value = property.value || "";
+ if (key) {
+ data[key] = window.btoa(value);
+ }
+ });
+ $scope.secret.metadata.name = name;
+ $scope.secret.data = data;
+
+ Core.notification('info', "Saving secret " + name);
+
+ kubeClient.put($scope.secret,
+ (data) => {
+ var secretsLink = onSaveUrl || Developer.namespaceLink($scope, $routeParams, "secrets");
+ var params = {};
+ if (onSaveUrl) {
+ params['secret'] = name;
+ }
+ $location.path(secretsLink);
+ $location.search(params);
+ log.info("navigating to URL: " + secretsLink + " with params " + angular.toJson($location.search()));
+ },
+ (err) => {
+ Core.notification('error', "Failed to secret " + name + "\n" + err);
+ });
+ }
+ };
+
+ updateData();
+
+ function createProperty(key, text) {
+ var label = secretLabels[key] || Core.humanizeValue(key);
+ var tooltip = secretTooltips[key] || "Value of the " + label;
+
+ var rows = 5;
+ var lines = text.split("\n").length + 1;
+ if (lines > rows) {
+ rows = lines;
+ }
+ var type = "textarea";
+ if (key === "username") {
+ type = "text";
+ if (!text) {
+ text = currentUserName();
+ }
+ } else if (key === "password") {
+ type = "password";
+ }
+ var property = {
+ key: key,
+ label: label,
+ tooltip: tooltip,
+ rows: rows,
+ value: text,
+ type: type
+ };
+ return property;
+ }
+
+ function updateData() {
+ $scope.item = null;
+ $scope.changed = false;
+ $scope.entity = {
+ name: $scope.id,
+ properties: {}
+ };
+ if ($scope.id) {
+ angular.forEach($scope.model.secrets, (secret) => {
+ var name = getName(secret);
+ if (name === $scope.id) {
+ $scope.secret = secret;
+ angular.forEach(secret.data, (value, key) => {
+ var text = "";
+ if (angular.isString(value) && value) {
+ text = window.atob(value);
+ }
+ var property = createProperty(key, text);
+ $scope.entity.properties[key] = property;
+ });
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ });
+ } else {
+ if (createKind === "ssh") {
+ $scope.addFields($scope.sshKeys);
+ } else if (createKind === "https") {
+ $scope.addFields($scope.httpsKeys);
+ }
+ $scope.fetched = true;
+ Core.$apply($scope);
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/secrets.ts b/plugins/kubernetes/ts/secrets.ts
index 3ed5a22..65d1afb 100644
--- a/plugins/kubernetes/ts/secrets.ts
+++ b/plugins/kubernetes/ts/secrets.ts
@@ -1,76 +1,76 @@
-///
-///
-///
-///
-
-module Kubernetes {
-
- export var SecretsController = controller("SecretsController", ["$scope", "KubernetesModel", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.$on('kubernetesModelUpdated', function () {
- Core.$apply($scope);
- });
-
- $scope.$createSecretLink = Developer.namespaceLink($scope, $routeParams, "secretCreate");
-
- var kubeClient = createKubernetesClient("secrets");
-
- $scope.tableConfig = {
- data: 'model.secrets',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- {
- field: '_key',
- displayName: 'Name',
- defaultSort: true,
- cellTemplate: $templateCache.get("idTemplate.html")
- },
- {
- field: '$labelsText',
- displayName: 'Labels',
- cellTemplate: $templateCache.get("labelTemplate.html")
- },
- ]
- };
-
- $scope.deletePrompt = (selected) => {
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: 'metadata.name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected, next) {
- if (next) {
- kubeClient.delete(next, () => {
- deleteSelected(selected, selected.shift());
- });
- } else {
- // TODO
- // updateData();
- }
- }
-
- deleteSelected(selected, selected.shift());
- }
- },
- title: 'Delete Secrets',
- action: 'The following Secrets will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
- }]);
-}
+///
+///
+///
+///
+
+module Kubernetes {
+
+ export var SecretsController = controller("SecretsController", ["$scope", "KubernetesModel", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location:ng.ILocationService, localStorage, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.$on('kubernetesModelUpdated', function () {
+ Core.$apply($scope);
+ });
+
+ $scope.$createSecretLink = Developer.namespaceLink($scope, $routeParams, "secretCreate");
+
+ var kubeClient = createKubernetesClient("secrets");
+
+ $scope.tableConfig = {
+ data: 'model.secrets',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ {
+ field: '_key',
+ displayName: 'Name',
+ defaultSort: true,
+ cellTemplate: $templateCache.get("idTemplate.html")
+ },
+ {
+ field: '$labelsText',
+ displayName: 'Labels',
+ cellTemplate: $templateCache.get("labelTemplate.html")
+ },
+ ]
+ };
+
+ $scope.deletePrompt = (selected) => {
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: 'metadata.name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected, next) {
+ if (next) {
+ kubeClient.delete(next, () => {
+ deleteSelected(selected, selected.shift());
+ });
+ } else {
+ // TODO
+ // updateData();
+ }
+ }
+
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: 'Delete Secrets',
+ action: 'The following Secrets will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+ }]);
+}
diff --git a/plugins/kubernetes/ts/service.ts b/plugins/kubernetes/ts/service.ts
index 9acc1af..ae7b36e 100644
--- a/plugins/kubernetes/ts/service.ts
+++ b/plugins/kubernetes/ts/service.ts
@@ -1,55 +1,55 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var ServiceController = controller("ServiceController",
- ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.rawModel = null;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.itemConfig = {
- properties: {
- '^\\/labels$': {
- template: $templateCache.get('labelTemplate.html')
- }
- }
- };
-
- $scope.$on('kubernetesModelUpdated', function () {
- updateData();
- });
-
- $scope.$watch('model.services', (newValue, oldValue) => {
- updateData();
- }, true);
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- $scope.flipRaw = () => {
- $scope.rawMode = !$scope.rawMode;
- Core.$apply($scope);
- };
-
- updateData();
-
- function updateData() {
- $scope.id = $routeParams["id"];
- $scope.namespace = $routeParams["namespace"] || KubernetesState.selectedNamespace;
- $scope.item = $scope.model.getService($scope.namespace, $scope.id);
- if ($scope.item) {
- $scope.rawModel = toRawYaml($scope.item);
- }
- Core.$apply($scope);
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var ServiceController = controller("ServiceController",
+ ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.rawModel = null;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.itemConfig = {
+ properties: {
+ '^\\/labels$': {
+ template: $templateCache.get('labelTemplate.html')
+ }
+ }
+ };
+
+ $scope.$on('kubernetesModelUpdated', function () {
+ updateData();
+ });
+
+ $scope.$watch('model.services', (newValue, oldValue) => {
+ updateData();
+ }, true);
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ $scope.flipRaw = () => {
+ $scope.rawMode = !$scope.rawMode;
+ Core.$apply($scope);
+ };
+
+ updateData();
+
+ function updateData() {
+ $scope.id = $routeParams["id"];
+ $scope.namespace = $routeParams["namespace"] || KubernetesState.selectedNamespace;
+ $scope.item = $scope.model.getService($scope.namespace, $scope.id);
+ if ($scope.item) {
+ $scope.rawModel = toRawYaml($scope.item);
+ }
+ Core.$apply($scope);
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/serviceEdit.ts b/plugins/kubernetes/ts/serviceEdit.ts
index 8837509..8c5642b 100644
--- a/plugins/kubernetes/ts/serviceEdit.ts
+++ b/plugins/kubernetes/ts/serviceEdit.ts
@@ -1,37 +1,37 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var ServiceEditController = controller("ServiceEditController",
- ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, schemas:HawtioForms.SchemaRegistry) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
- $scope.id = $routeParams["id"];
- $scope.schema = KubernetesSchema;
- $scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.Service");
- //$scope.config = KubernetesSchema.definitions.kubernetes_v1beta2_Service;
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$on('$routeUpdate', ($event) => {
- updateData();
- });
-
- updateData();
-
- function updateData() {
- if ($scope.id) {
- $scope.entity = $scope.model.getService(KubernetesState.selectedNamespace, $scope.id);
- Core.$apply($scope);
- $scope.fetched = true;
- } else {
- $scope.fetched = true;
- }
- }
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var ServiceEditController = controller("ServiceEditController",
+ ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState, KubernetesSchema,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, schemas:HawtioForms.SchemaRegistry) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+ $scope.id = $routeParams["id"];
+ $scope.schema = KubernetesSchema;
+ $scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.Service");
+ //$scope.config = KubernetesSchema.definitions.kubernetes_v1beta2_Service;
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$on('$routeUpdate', ($event) => {
+ updateData();
+ });
+
+ updateData();
+
+ function updateData() {
+ if ($scope.id) {
+ $scope.entity = $scope.model.getService(KubernetesState.selectedNamespace, $scope.id);
+ Core.$apply($scope);
+ $scope.fetched = true;
+ } else {
+ $scope.fetched = true;
+ }
+ }
+ }]);
+}
diff --git a/plugins/kubernetes/ts/serviceRegistry.ts b/plugins/kubernetes/ts/serviceRegistry.ts
index 546a306..699b6fa 100644
--- a/plugins/kubernetes/ts/serviceRegistry.ts
+++ b/plugins/kubernetes/ts/serviceRegistry.ts
@@ -1,91 +1,91 @@
-///
-///
-///
-///
-
-module Kubernetes {
-
- _module.factory('ServiceRegistry', [() => {
- return new ServiceRegistryService();
- }]);
-
- /**
- * Represents a simple interface to service discovery that can be used early on in the application lifecycle before the
- * underlying model has been created via dependency injection
- */
- export class ServiceRegistryService {
- private model:KubernetesModelService = null;
-
- /**
- * Returns true if there is a service available for the given ID or false
- */
- public hasService(serviceName: string) {
- return this.findService(serviceName) ? true : false;
- }
-
- /**
- * Returns the service for the given service name (ID) or null if it cannot be found
- *
- * @param serviceName the name of the service to look for
- * @return {null}
- */
- public findService(serviceName: string) {
- var answer = null;
- if (serviceName) {
- var model = this.getModel();
- if (model) {
- var namespace = model.currentNamespace();
- return model.getService(namespace ,serviceName);
-/*
- TODO lets only look in the current namespace
- angular.forEach(model.services, (service) => {
- if (serviceName === getName(service)) {
- answer = service;
- }
- });
-*/
- }
- }
- return answer;
- }
-
- /**
- * Returns the service link for the given service name
- *
- * @param serviceName the name of the service
- * @return {null}
- */
- public serviceLink(serviceName: string): string {
- var service = this.findService(serviceName);
- return serviceLinkUrl(service);
- }
-
- /**
- * Returns the service link for the given service name if its ready (has at least one ready pod)
- *
- * @param serviceName the name of the service
- * @return {null}
- */
- public serviceReadyLink(serviceName: string): string {
- var service = this.findService(serviceName);
- if (readyPodCount(service)) {
- return serviceLinkUrl(service);
- } else {
- return null;
- }
- }
-
- private getModel():KubernetesModelService {
- var answer = this.model;
- // lets allow lazy load so we can be invoked before the injector has been created
- if (!answer) {
- var injector = HawtioCore.injector;
- if (injector) {
- this.model = injector.get('KubernetesModel');
- }
- }
- answer = this.model;
- return answer;
- }
- }
-}
+///
+///
+///
+///
+
+module Kubernetes {
+
+ _module.factory('ServiceRegistry', [() => {
+ return new ServiceRegistryService();
+ }]);
+
+ /**
+ * Represents a simple interface to service discovery that can be used early on in the application lifecycle before the
+ * underlying model has been created via dependency injection
+ */
+ export class ServiceRegistryService {
+ private model:KubernetesModelService = null;
+
+ /**
+ * Returns true if there is a service available for the given ID or false
+ */
+ public hasService(serviceName: string) {
+ return this.findService(serviceName) ? true : false;
+ }
+
+ /**
+ * Returns the service for the given service name (ID) or null if it cannot be found
+ *
+ * @param serviceName the name of the service to look for
+ * @return {null}
+ */
+ public findService(serviceName: string) {
+ var answer = null;
+ if (serviceName) {
+ var model = this.getModel();
+ if (model) {
+ var namespace = model.currentNamespace();
+ return model.getService(namespace ,serviceName);
+/*
+ TODO lets only look in the current namespace
+ angular.forEach(model.services, (service) => {
+ if (serviceName === getName(service)) {
+ answer = service;
+ }
+ });
+*/
+ }
+ }
+ return answer;
+ }
+
+ /**
+ * Returns the service link for the given service name
+ *
+ * @param serviceName the name of the service
+ * @return {null}
+ */
+ public serviceLink(serviceName: string): string {
+ var service = this.findService(serviceName);
+ return serviceLinkUrl(service);
+ }
+
+ /**
+ * Returns the service link for the given service name if its ready (has at least one ready pod)
+ *
+ * @param serviceName the name of the service
+ * @return {null}
+ */
+ public serviceReadyLink(serviceName: string): string {
+ var service = this.findService(serviceName);
+ if (readyPodCount(service)) {
+ return serviceLinkUrl(service);
+ } else {
+ return null;
+ }
+ }
+
+ private getModel():KubernetesModelService {
+ var answer = this.model;
+ // lets allow lazy load so we can be invoked before the injector has been created
+ if (!answer) {
+ var injector = HawtioCore.injector;
+ if (injector) {
+ this.model = injector.get('KubernetesModel');
+ }
+ }
+ answer = this.model;
+ return answer;
+ }
+ }
+}
diff --git a/plugins/kubernetes/ts/services.ts b/plugins/kubernetes/ts/services.ts
index 6d88bd9..447da73 100644
--- a/plugins/kubernetes/ts/services.ts
+++ b/plugins/kubernetes/ts/services.ts
@@ -1,102 +1,102 @@
-///
-///
-///
-
-module Kubernetes {
-
- export var ServiceApps = _module.controller('Kubernetes.ServiceApps', ($scope, KubernetesModel) => {
- $scope.model = KubernetesModel;
- });
-
- export var Services = controller("Services",
- ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
- ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesServices:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState,
- $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
-
- $scope.kubernetes = KubernetesState;
- $scope.model = KubernetesModel;
-
- ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'list');
-
- $scope.tableConfig = {
- data: 'model.services',
- showSelectionCheckbox: true,
- enableRowClickSelection: false,
- multiSelect: true,
- selectedItems: [],
- filterOptions: {
- filterText: $location.search()["q"] || ''
- },
- columnDefs: [
- { field: '_key',
- displayName: 'Name',
- cellTemplate: $templateCache.get("idTemplate.html")
- },
- { field: '$serviceUrl',
- displayName: 'Address',
- cellTemplate: $templateCache.get("portalAddress.html")
- },
- { field: '$podCount',
- displayName: 'Pods',
- cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
- customSortField: (field) => {
- // need to concat all the pod counters
- var ready = field.$podCounters.ready || 0;
- var valid = field.$podCounters.valid || 0;
- var waiting = field.$podCounters.waiting || 0;
- var error = field.$podCounters.error || 0;
- return ready + valid + waiting + error;
- }
- },
- { field: '$selectorText',
- displayName: 'Selector',
- cellTemplate: $templateCache.get("selectorTemplate.html")
- },
- { field: '$labelsText',
- displayName: 'Labels',
- cellTemplate: $templateCache.get("labelTemplate.html")
- }
- ]
- };
-
- Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.deletePrompt = (selected) => {
- if (angular.isString(selected)) {
- selected = [{
- id: selected
- }];
- }
- UI.multiItemConfirmActionDialog({
- collection: selected,
- index: 'metadata.name',
- onClose: (result:boolean) => {
- if (result) {
- function deleteSelected(selected:Array, next:KubePod) {
- if (next) {
- log.debug("deleting: ", getName(next));
- KubernetesServices.delete({
- id: getName(next)
- }, undefined, () => {
- log.debug("deleted: ", getName(next));
- deleteSelected(selected, selected.shift());
- }, (error) => {
- log.debug("Error deleting: ", error);
- deleteSelected(selected, selected.shift());
- });
- }
- }
- deleteSelected(selected, selected.shift());
- }
- },
- title: 'Delete services?',
- action: 'The following services will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
-
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ export var ServiceApps = _module.controller('Kubernetes.ServiceApps', ($scope, KubernetesModel) => {
+ $scope.model = KubernetesModel;
+ });
+
+ export var Services = controller("Services",
+ ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
+ ($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesServices:ng.resource.IResourceClass, KubernetesPods:ng.resource.IResourceClass, KubernetesState,
+ $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
+
+ $scope.kubernetes = KubernetesState;
+ $scope.model = KubernetesModel;
+
+ ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'list');
+
+ $scope.tableConfig = {
+ data: 'model.services',
+ showSelectionCheckbox: true,
+ enableRowClickSelection: false,
+ multiSelect: true,
+ selectedItems: [],
+ filterOptions: {
+ filterText: $location.search()["q"] || ''
+ },
+ columnDefs: [
+ { field: '_key',
+ displayName: 'Name',
+ cellTemplate: $templateCache.get("idTemplate.html")
+ },
+ { field: '$serviceUrl',
+ displayName: 'Address',
+ cellTemplate: $templateCache.get("portalAddress.html")
+ },
+ { field: '$podCount',
+ displayName: 'Pods',
+ cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
+ customSortField: (field) => {
+ // need to concat all the pod counters
+ var ready = field.$podCounters.ready || 0;
+ var valid = field.$podCounters.valid || 0;
+ var waiting = field.$podCounters.waiting || 0;
+ var error = field.$podCounters.error || 0;
+ return ready + valid + waiting + error;
+ }
+ },
+ { field: '$selectorText',
+ displayName: 'Selector',
+ cellTemplate: $templateCache.get("selectorTemplate.html")
+ },
+ { field: '$labelsText',
+ displayName: 'Labels',
+ cellTemplate: $templateCache.get("labelTemplate.html")
+ }
+ ]
+ };
+
+ Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.deletePrompt = (selected) => {
+ if (angular.isString(selected)) {
+ selected = [{
+ id: selected
+ }];
+ }
+ UI.multiItemConfirmActionDialog({
+ collection: selected,
+ index: 'metadata.name',
+ onClose: (result:boolean) => {
+ if (result) {
+ function deleteSelected(selected:Array, next:KubePod) {
+ if (next) {
+ log.debug("deleting: ", getName(next));
+ KubernetesServices.delete({
+ id: getName(next)
+ }, undefined, () => {
+ log.debug("deleted: ", getName(next));
+ deleteSelected(selected, selected.shift());
+ }, (error) => {
+ log.debug("Error deleting: ", error);
+ deleteSelected(selected, selected.shift());
+ });
+ }
+ }
+ deleteSelected(selected, selected.shift());
+ }
+ },
+ title: 'Delete services?',
+ action: 'The following services will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+
+ }]);
+}
diff --git a/plugins/kubernetes/ts/sharedControllers.ts b/plugins/kubernetes/ts/sharedControllers.ts
index 1bcf7ae..26bb02b 100644
--- a/plugins/kubernetes/ts/sharedControllers.ts
+++ b/plugins/kubernetes/ts/sharedControllers.ts
@@ -1,105 +1,105 @@
-///
-///
-///
-
-module Kubernetes {
-
- // controller for the status icon cell
- export var PodStatus = controller("PodStatus", ["$scope", ($scope) => {
- $scope.statusMapping = (text) => {
- return statusTextToCssClass(text);
- }
- }]);
-
- _module.controller("Kubernetes.TermController", ($scope, TerminalService) => {
- $scope.canConnectTo = (container) => {
- if (container.securityContext && container.securityContext.privileged) {
- return false;
- }
- return true;
- }
- $scope.openTerminal = (selfLink, containerName) => {
- var id = TerminalService.newTerminal(selfLink, containerName);
- log.debug("Created terminal, id: ", id);
- }
- });
-
- // controller that deals with the labels per pod
- export var Labels = controller("Labels", ["$scope", "$location", ($scope, $location) => {
- $scope.labels = [];
- var labelKeyWeights = {
- "region": 1,
- "system": 2,
- "type": 3,
- "batch": 4,
- "version": 5
- };
- $scope.$watch('entity', (newValue, oldValue) => {
- if (newValue) {
- // log.debug("labels: ", newValue);
- // massage the labels a bit
- $scope.labels = [];
- angular.forEach(Core.pathGet($scope.entity, ["metadata", "labels"]), (value, key) => {
- if (key === 'fabric8' || key === 'style' || key === 'status' || (key === 'isTarget' && value === 'false') || key === 'isExtract' || key === 'name') {
- // TODO not sure what this is for, the container type?
- return;
- }
-
- $scope.labels.push({
- key: key,
- title: value
- });
- });
-
- // lets sort by key but lets make sure that we weight certain labels so they are first
- $scope.labels = $scope.labels.sort((a, b) => {
- function getWeight(key) {
- return labelKeyWeights[key] || 0;
- }
- var n1 = a["key"];
- var n2 = b["key"];
- var w1 = getWeight(n1);
- var w2 = getWeight(n2);
- var diff = w1 - w2;
- if (diff < 0) {
- return -1;
- } else if (diff > 0) {
- return 1;
- }
- if (n1 && n2) {
- if (n1 > n2) {
- return 1;
- } else if (n1 < n2) {
- return -1;
- } else {
- return 0;
- }
- } else {
- if (n1 === n2) {
- return 0;
- } else if (n1) {
- return 1;
- } else {
- return -1;
- }
- }
- });
- }
- });
-
- $scope.handleClick = (entity, labelType:string, value) => {
- // log.debug("handleClick, entity: ", entity, " key: ", labelType, " value: ", value);
- $scope.$emit('labelFilterUpdate', value.title)
- }
-
- $scope.labelClass = containerLabelClass;
- }]);
-
- //服务状态过滤
- export var Status = controller('Status', ["$scope", "$http", "$interval", "$location", "KubernetesApiURL", ($scope, $http, $interval, $location, KubernetesApiURL) => {
- /*$scope.$watch('entity', (newValue, oldValue) => {
- if(newValue)
- console.log(newValue);
- },true);*/
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ // controller for the status icon cell
+ export var PodStatus = controller("PodStatus", ["$scope", ($scope) => {
+ $scope.statusMapping = (text) => {
+ return statusTextToCssClass(text);
+ }
+ }]);
+
+ _module.controller("Kubernetes.TermController", ($scope, TerminalService) => {
+ $scope.canConnectTo = (container) => {
+ if (container.securityContext && container.securityContext.privileged) {
+ return false;
+ }
+ return true;
+ }
+ $scope.openTerminal = (selfLink, containerName) => {
+ var id = TerminalService.newTerminal(selfLink, containerName);
+ log.debug("Created terminal, id: ", id);
+ }
+ });
+
+ // controller that deals with the labels per pod
+ export var Labels = controller("Labels", ["$scope", "$location", ($scope, $location) => {
+ $scope.labels = [];
+ var labelKeyWeights = {
+ "region": 1,
+ "system": 2,
+ "type": 3,
+ "batch": 4,
+ "version": 5
+ };
+ $scope.$watch('entity', (newValue, oldValue) => {
+ if (newValue) {
+ // log.debug("labels: ", newValue);
+ // massage the labels a bit
+ $scope.labels = [];
+ angular.forEach(Core.pathGet($scope.entity, ["metadata", "labels"]), (value, key) => {
+ if (key === 'fabric8' || key === 'style' || key === 'status' || (key === 'isTarget' && value === 'false') || key === 'isExtract' || key === 'name') {
+ // TODO not sure what this is for, the container type?
+ return;
+ }
+
+ $scope.labels.push({
+ key: key,
+ title: value
+ });
+ });
+
+ // lets sort by key but lets make sure that we weight certain labels so they are first
+ $scope.labels = $scope.labels.sort((a, b) => {
+ function getWeight(key) {
+ return labelKeyWeights[key] || 0;
+ }
+ var n1 = a["key"];
+ var n2 = b["key"];
+ var w1 = getWeight(n1);
+ var w2 = getWeight(n2);
+ var diff = w1 - w2;
+ if (diff < 0) {
+ return -1;
+ } else if (diff > 0) {
+ return 1;
+ }
+ if (n1 && n2) {
+ if (n1 > n2) {
+ return 1;
+ } else if (n1 < n2) {
+ return -1;
+ } else {
+ return 0;
+ }
+ } else {
+ if (n1 === n2) {
+ return 0;
+ } else if (n1) {
+ return 1;
+ } else {
+ return -1;
+ }
+ }
+ });
+ }
+ });
+
+ $scope.handleClick = (entity, labelType:string, value) => {
+ // log.debug("handleClick, entity: ", entity, " key: ", labelType, " value: ", value);
+ $scope.$emit('labelFilterUpdate', value.title)
+ }
+
+ $scope.labelClass = containerLabelClass;
+ }]);
+
+ //服务状态过滤
+ export var Status = controller('Status', ["$scope", "$http", "$interval", "$location", "KubernetesApiURL", ($scope, $http, $interval, $location, KubernetesApiURL) => {
+ /*$scope.$watch('entity', (newValue, oldValue) => {
+ if(newValue)
+ console.log(newValue);
+ },true);*/
+ }]);
+}
diff --git a/plugins/kubernetes/ts/tabs.ts b/plugins/kubernetes/ts/tabs.ts
index 10680f9..b2ed13d 100644
--- a/plugins/kubernetes/ts/tabs.ts
+++ b/plugins/kubernetes/ts/tabs.ts
@@ -1,14 +1,14 @@
-///
-///
-///
-
-module Kubernetes {
-
- _module.directive("hawtioTabs", ['HawtioSubTabs', (HawtioSubTabs) => {
- return {
- link: (scope, element, attrs) => {
- HawtioSubTabs.apply(scope.$eval('subTabConfig'));
- }
- };
- }]);
-}
+///
+///
+///
+
+module Kubernetes {
+
+ _module.directive("hawtioTabs", ['HawtioSubTabs', (HawtioSubTabs) => {
+ return {
+ link: (scope, element, attrs) => {
+ HawtioSubTabs.apply(scope.$eval('subTabConfig'));
+ }
+ };
+ }]);
+}
diff --git a/plugins/kubernetes/ts/templates.ts b/plugins/kubernetes/ts/templates.ts
index 801b457..a2d004d 100644
--- a/plugins/kubernetes/ts/templates.ts
+++ b/plugins/kubernetes/ts/templates.ts
@@ -1,330 +1,330 @@
-///
-
-module Kubernetes {
- export var TemplateController = controller("TemplateController", [
- "$scope", "$location", "$http", "$timeout", "$routeParams", "marked", "$templateCache", "$modal", "KubernetesModel", "KubernetesState", "KubernetesApiURL",
- ($scope, $location, $http, $timeout, $routeParams, marked, $templateCache, $modal, KubernetesModel, KubernetesState, KubernetesApiURL) => {
- var model = $scope.model = KubernetesModel;
- $scope.filterText = $location.search()["q"];
-
- $scope.targetNamespace = $routeParams.targetNamespace;
- initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
-
- $scope.$watchCollection('model.namespaces', () => {
- if (!$scope.targetNamespace) {
- $scope.targetNamespace = model.currentNamespace();
- }
- });
-
- var returnTo = new URI($location.search()['returnTo'] || '/kubernetes/apps');
-
- function goBack() {
- $location.path(returnTo.path()).search(returnTo.query(true));
- }
-
- function getAnnotations(obj) {
- return Core.pathGet(obj, ['metadata', 'annotations']);
- }
-
- function getValueFor(obj, key) {
- var annotations = getAnnotations(obj);
- if (!annotations) {
- return "";
- }
- var name = getName(obj);
- if (name) {
- var fullKey = "fabric8." + name + "/" + key;
- var answer = annotations[fullKey];
- if (answer) {
- return answer;
- }
- }
- var key: any = _.find(_.keys(annotations), (k: string) => _.endsWith(k, key));
- if (key) {
- return annotations[key];
- } else {
- return "";
- }
- }
-
- $scope.cancel = () => {
- if ($scope.formConfig) {
- delete $scope.formConfig;
- delete $scope.entity;
- $scope.objects = undefined;
- return;
- }
- goBack();
- }
-
- /*
- $scope.$watch('model.templates.length', (newValue) => {
- if (newValue === 0) {
- goBack();
- }
- });
- */
-
- $scope.filterTemplates = (template) => {
- if (Core.isBlank($scope.filterText)) {
- return true;
- }
- return _.contains(angular.toJson(template), $scope.filterText.toLowerCase());
- };
-
- $scope.openFullDescription = (template) => {
- var text = marked(getValueFor(template, 'description') || 'No description');
- var modal = $modal.open({
- templateUrl: UrlHelpers.join(templatePath, 'templateDescription.html'),
- controller: ['$scope', '$modalInstance', ($scope, $modalInstance) => {
- $scope.text = text,
- $scope.ok = () => {
- modal.close();
- }
- }]
- });
- };
-
- $scope.getDescription = (template) => {
- var answer:any = $(marked(getValueFor(template, 'description') || 'No description'));
- var textDefault = answer.html();
- var maxLength = 200;
- if (textDefault.length > maxLength) {
- var truncated = $.trim(textDefault).substring(0, maxLength).split(' ').slice(0, -1).join(' ');
- answer.html(truncated + '...');
- answer.append($templateCache.get('truncatedDescriptionTag.html'));
- }
- return answer.html();
- };
-
- $scope.getIconUrl = (template) => {
- return getValueFor(template, 'iconUrl') || defaultIconUrl;
- };
-
- $scope.deployTemplate = (template) => {
- log.debug("Template parameters: ", template.parameters);
- log.debug("Template objects: ", template.objects);
- log.debug("Template annotations: ", template.metadata.annotations);
- var templateAnnotations = template.metadata.annotations;
- if (templateAnnotations) {
- _.forEach(template.objects, (object:any) => {
- var annotations = object.metadata.annotations || {};
- var name = getName(object);
- var matches = _.filter(_.keys(templateAnnotations), (key) => key.match('.' + name + '/'));
- matches.forEach((match) => {
- if (!(match in annotations)) {
- annotations[match] = templateAnnotations[match];
- }
- });
- object.metadata.annotations = annotations;
- });
- }
- var routeServiceName = undefined;
- var service = _.find(template.objects, (obj) => {
- if (getKind(obj) === "Service") {
- var ports = getPorts(obj);
- if (ports && ports.length === 1) {
- return true;
- }
- } else {
- return false;
- }
- });
- if (service) {
- routeServiceName = getName(service);
- }
- log.debug("Service: ", service);
- if ((!routeServiceName || !isOpenShift) && (!template.parameters || template.parameters.length === 0)) {
- log.debug("No parameters required, deploying objects");
- applyObjects(template.objects);
- return;
- }
- var formConfig = {
- style: HawtioForms.FormStyle.STANDARD,
- hideLegend: true,
- properties: {}
- };
- var params = template.parameters;
- _.forEach(params, (param:any) => {
- var property = {};
- property.label = _.startCase(param.name);
- property.description = param.description;
- property.default = param.value;
- // TODO, do parameters support types?
- property.type = 'string';
- formConfig.properties[param.name] = property;
- });
- if (routeServiceName && isOpenShift) {
- formConfig.properties.createRoute = {
- type: 'boolean',
- default: true,
- label: "Create Route"
- };
-/*
- formConfig.properties.routeName = {
- type: 'string',
- label: 'Route Name',
- default: routeServiceName,
- 'control-group-attributes': {
- 'ng-show': 'entity.createRoute'
- }
- };
-*/
- formConfig.properties.routeServiceName = {
- type: 'hidden',
- default: routeServiceName
- }
-
- var namespace = currentKubernetesNamespace();
- // TODO store this in localStorage!
- var domain = "vagrant.f8";
- var defaultRouteHostSuffix = '.' + (namespace === "default" ? "" : namespace + ".") + domain;
- formConfig.properties.routeHostname = {
- type: 'string',
- default: defaultRouteHostSuffix,
- label: "Route host name suffix",
- 'control-group-attributes': {
- 'ng-show': 'entity.createRoute'
- }
- };
- }
- $scope.entity = {};
- $scope.formConfig = formConfig;
- $scope.objects = template.objects;
- log.debug("Form config: ", formConfig);
- };
-
- function substitute(str, data) {
- return str.replace(/\${\w*}/g, (match) => {
- var key = match.replace(/\${/, '').replace(/}/, '').trim();
- return data[key] || match;
- });
- };
-
- $scope.substituteAndDeployTemplate = () => {
- var objects = $scope.objects;
- var objectsText = angular.toJson(objects, true);
- // pull these out of the entity object so they're not used in substitutions
- var createRoute = $scope.entity.createRoute;
- var routeHostnameSuffix = $scope.entity.routeHostname || "";
- var routeName = $scope.entity.routeName;
- var routeServiceName = $scope.entity.routeServiceName;
- delete $scope.entity.createRoute;
- delete $scope.entity.routeHostname;
- delete $scope.entity.routeName;
- delete $scope.entity.routeServiceName;
- objectsText = substitute(objectsText, $scope.entity);
- objects = angular.fromJson(objectsText);
- if (createRoute) {
- var routes = [];
- angular.forEach(objects, (object) => {
- var kind = object.kind;
- var name = getName(object);
- if (name && "Service" === kind) {
- var routeHostname = name + routeHostnameSuffix;
- var route = {
- kind: "Route",
- apiVersion: defaultOSApiVersion,
- metadata: {
- name: name,
- },
- spec: {
- host: routeHostname,
- to: {
- kind: "Service",
- name: name
- }
- }
- };
- routes.push(route);
- }
- });
- objects = objects.concat(routes);
- }
- if ($scope.targetNamespace !== model.currentNamespace()) {
- $scope.$on('WatcherNamespaceChanged', () => {
- log.debug("Namespace changed");
- setTimeout(() => {
- applyObjects(objects);
- Core.$apply($scope);
- }, 500);
- });
- Core.notification('info', "Switching to namespace " + $scope.targetNamespace + " and deploying template");
- model.kubernetes.selectedNamespace = $scope.targetNamespace;
- } else {
- applyObjects(objects);
- }
- };
-
- function applyObjects(objects) {
- var projectClient = Kubernetes.createKubernetesClient("projects");
-
- _.forEach(objects, (object:any) => {
- log.debug("Object: ", object);
-
- var kind = getKind(object);
- var name = getName(object);
- var ns = getNamespace(object);
-
- if (kind && name) {
- if (ns && ns !== currentKubernetesNamespace()) {
- var project = {
- apiVersion: Kubernetes.defaultApiVersion,
- kind: "Project",
- metadata: {
- name: ns,
- labels: {
- }
- }
- };
- projectClient.put(project,
- (data) => {
- log.info("Created namespace: " + ns)
- },
- (err) => {
- log.warn("Failed to create namespace: " + ns + ": " + angular.toJson(err));
- });
- }
-
- var pluralKind = kind.toLowerCase() + "s";
- var kubeClient = Kubernetes.createKubernetesClient(pluralKind, ns);
- kubeClient.put(object,
- (data) => {
- log.info("updated " + kind + " name: " + name + (ns ? " ns: " + ns: ""));
- },
- (err) => {
- log.warn("Failed to update " + kind + " name: " + name + (ns ? " ns: " + ns: "") + " error: " + angular.toJson(err));
- });
- }
- });
- goBack();
- }
-
- $scope.deleteTemplate = (template) => {
- UI.multiItemConfirmActionDialog({
- collection: [template],
- index: 'metadata.name',
- onClose: (result:boolean) => {
- if (result) {
- KubernetesModel['templatesResource'].delete({
- id: template.metadata.name
- }, undefined, () => {
- KubernetesModel['templatesResource'].query((data) => {
- KubernetesModel.templates = data.items;
- });
- }, (error) => {
- log.debug("Error deleting template: ", error);
- });
- }
- },
- title: 'Delete Template?',
- action: 'The following template will be deleted:',
- okText: 'Delete',
- okClass: 'btn-danger',
- custom: "This operation is permanent once completed!",
- customClass: "alert alert-warning"
- }).open();
- };
- }]);
-}
-
+///
+
+module Kubernetes {
+ export var TemplateController = controller("TemplateController", [
+ "$scope", "$location", "$http", "$timeout", "$routeParams", "marked", "$templateCache", "$modal", "KubernetesModel", "KubernetesState", "KubernetesApiURL",
+ ($scope, $location, $http, $timeout, $routeParams, marked, $templateCache, $modal, KubernetesModel, KubernetesState, KubernetesApiURL) => {
+ var model = $scope.model = KubernetesModel;
+ $scope.filterText = $location.search()["q"];
+
+ $scope.targetNamespace = $routeParams.targetNamespace;
+ initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
+
+ $scope.$watchCollection('model.namespaces', () => {
+ if (!$scope.targetNamespace) {
+ $scope.targetNamespace = model.currentNamespace();
+ }
+ });
+
+ var returnTo = new URI($location.search()['returnTo'] || '/kubernetes/apps');
+
+ function goBack() {
+ $location.path(returnTo.path()).search(returnTo.query(true));
+ }
+
+ function getAnnotations(obj) {
+ return Core.pathGet(obj, ['metadata', 'annotations']);
+ }
+
+ function getValueFor(obj, key) {
+ var annotations = getAnnotations(obj);
+ if (!annotations) {
+ return "";
+ }
+ var name = getName(obj);
+ if (name) {
+ var fullKey = "fabric8." + name + "/" + key;
+ var answer = annotations[fullKey];
+ if (answer) {
+ return answer;
+ }
+ }
+ var key: any = _.find(_.keys(annotations), (k: string) => _.endsWith(k, key));
+ if (key) {
+ return annotations[key];
+ } else {
+ return "";
+ }
+ }
+
+ $scope.cancel = () => {
+ if ($scope.formConfig) {
+ delete $scope.formConfig;
+ delete $scope.entity;
+ $scope.objects = undefined;
+ return;
+ }
+ goBack();
+ }
+
+ /*
+ $scope.$watch('model.templates.length', (newValue) => {
+ if (newValue === 0) {
+ goBack();
+ }
+ });
+ */
+
+ $scope.filterTemplates = (template) => {
+ if (Core.isBlank($scope.filterText)) {
+ return true;
+ }
+ return _.contains(angular.toJson(template), $scope.filterText.toLowerCase());
+ };
+
+ $scope.openFullDescription = (template) => {
+ var text = marked(getValueFor(template, 'description') || 'No description');
+ var modal = $modal.open({
+ templateUrl: UrlHelpers.join(templatePath, 'templateDescription.html'),
+ controller: ['$scope', '$modalInstance', ($scope, $modalInstance) => {
+ $scope.text = text,
+ $scope.ok = () => {
+ modal.close();
+ }
+ }]
+ });
+ };
+
+ $scope.getDescription = (template) => {
+ var answer:any = $(marked(getValueFor(template, 'description') || 'No description'));
+ var textDefault = answer.html();
+ var maxLength = 200;
+ if (textDefault.length > maxLength) {
+ var truncated = $.trim(textDefault).substring(0, maxLength).split(' ').slice(0, -1).join(' ');
+ answer.html(truncated + '...');
+ answer.append($templateCache.get('truncatedDescriptionTag.html'));
+ }
+ return answer.html();
+ };
+
+ $scope.getIconUrl = (template) => {
+ return getValueFor(template, 'iconUrl') || defaultIconUrl;
+ };
+
+ $scope.deployTemplate = (template) => {
+ log.debug("Template parameters: ", template.parameters);
+ log.debug("Template objects: ", template.objects);
+ log.debug("Template annotations: ", template.metadata.annotations);
+ var templateAnnotations = template.metadata.annotations;
+ if (templateAnnotations) {
+ _.forEach(template.objects, (object:any) => {
+ var annotations = object.metadata.annotations || {};
+ var name = getName(object);
+ var matches = _.filter(_.keys(templateAnnotations), (key) => key.match('.' + name + '/'));
+ matches.forEach((match) => {
+ if (!(match in annotations)) {
+ annotations[match] = templateAnnotations[match];
+ }
+ });
+ object.metadata.annotations = annotations;
+ });
+ }
+ var routeServiceName = undefined;
+ var service = _.find(template.objects, (obj) => {
+ if (getKind(obj) === "Service") {
+ var ports = getPorts(obj);
+ if (ports && ports.length === 1) {
+ return true;
+ }
+ } else {
+ return false;
+ }
+ });
+ if (service) {
+ routeServiceName = getName(service);
+ }
+ log.debug("Service: ", service);
+ if ((!routeServiceName || !isOpenShift) && (!template.parameters || template.parameters.length === 0)) {
+ log.debug("No parameters required, deploying objects");
+ applyObjects(template.objects);
+ return;
+ }
+ var formConfig = {
+ style: HawtioForms.FormStyle.STANDARD,
+ hideLegend: true,
+ properties: {}
+ };
+ var params = template.parameters;
+ _.forEach(params, (param:any) => {
+ var property = {};
+ property.label = _.startCase(param.name);
+ property.description = param.description;
+ property.default = param.value;
+ // TODO, do parameters support types?
+ property.type = 'string';
+ formConfig.properties[param.name] = property;
+ });
+ if (routeServiceName && isOpenShift) {
+ formConfig.properties.createRoute = {
+ type: 'boolean',
+ default: true,
+ label: "Create Route"
+ };
+/*
+ formConfig.properties.routeName = {
+ type: 'string',
+ label: 'Route Name',
+ default: routeServiceName,
+ 'control-group-attributes': {
+ 'ng-show': 'entity.createRoute'
+ }
+ };
+*/
+ formConfig.properties.routeServiceName = {
+ type: 'hidden',
+ default: routeServiceName
+ }
+
+ var namespace = currentKubernetesNamespace();
+ // TODO store this in localStorage!
+ var domain = "vagrant.f8";
+ var defaultRouteHostSuffix = '.' + (namespace === "default" ? "" : namespace + ".") + domain;
+ formConfig.properties.routeHostname = {
+ type: 'string',
+ default: defaultRouteHostSuffix,
+ label: "Route host name suffix",
+ 'control-group-attributes': {
+ 'ng-show': 'entity.createRoute'
+ }
+ };
+ }
+ $scope.entity = {};
+ $scope.formConfig = formConfig;
+ $scope.objects = template.objects;
+ log.debug("Form config: ", formConfig);
+ };
+
+ function substitute(str, data) {
+ return str.replace(/\${\w*}/g, (match) => {
+ var key = match.replace(/\${/, '').replace(/}/, '').trim();
+ return data[key] || match;
+ });
+ };
+
+ $scope.substituteAndDeployTemplate = () => {
+ var objects = $scope.objects;
+ var objectsText = angular.toJson(objects, true);
+ // pull these out of the entity object so they're not used in substitutions
+ var createRoute = $scope.entity.createRoute;
+ var routeHostnameSuffix = $scope.entity.routeHostname || "";
+ var routeName = $scope.entity.routeName;
+ var routeServiceName = $scope.entity.routeServiceName;
+ delete $scope.entity.createRoute;
+ delete $scope.entity.routeHostname;
+ delete $scope.entity.routeName;
+ delete $scope.entity.routeServiceName;
+ objectsText = substitute(objectsText, $scope.entity);
+ objects = angular.fromJson(objectsText);
+ if (createRoute) {
+ var routes = [];
+ angular.forEach(objects, (object) => {
+ var kind = object.kind;
+ var name = getName(object);
+ if (name && "Service" === kind) {
+ var routeHostname = name + routeHostnameSuffix;
+ var route = {
+ kind: "Route",
+ apiVersion: defaultOSApiVersion,
+ metadata: {
+ name: name,
+ },
+ spec: {
+ host: routeHostname,
+ to: {
+ kind: "Service",
+ name: name
+ }
+ }
+ };
+ routes.push(route);
+ }
+ });
+ objects = objects.concat(routes);
+ }
+ if ($scope.targetNamespace !== model.currentNamespace()) {
+ $scope.$on('WatcherNamespaceChanged', () => {
+ log.debug("Namespace changed");
+ setTimeout(() => {
+ applyObjects(objects);
+ Core.$apply($scope);
+ }, 500);
+ });
+ Core.notification('info', "Switching to namespace " + $scope.targetNamespace + " and deploying template");
+ model.kubernetes.selectedNamespace = $scope.targetNamespace;
+ } else {
+ applyObjects(objects);
+ }
+ };
+
+ function applyObjects(objects) {
+ var projectClient = Kubernetes.createKubernetesClient("projects");
+
+ _.forEach(objects, (object:any) => {
+ log.debug("Object: ", object);
+
+ var kind = getKind(object);
+ var name = getName(object);
+ var ns = getNamespace(object);
+
+ if (kind && name) {
+ if (ns && ns !== currentKubernetesNamespace()) {
+ var project = {
+ apiVersion: Kubernetes.defaultApiVersion,
+ kind: "Project",
+ metadata: {
+ name: ns,
+ labels: {
+ }
+ }
+ };
+ projectClient.put(project,
+ (data) => {
+ log.info("Created namespace: " + ns)
+ },
+ (err) => {
+ log.warn("Failed to create namespace: " + ns + ": " + angular.toJson(err));
+ });
+ }
+
+ var pluralKind = kind.toLowerCase() + "s";
+ var kubeClient = Kubernetes.createKubernetesClient(pluralKind, ns);
+ kubeClient.put(object,
+ (data) => {
+ log.info("updated " + kind + " name: " + name + (ns ? " ns: " + ns: ""));
+ },
+ (err) => {
+ log.warn("Failed to update " + kind + " name: " + name + (ns ? " ns: " + ns: "") + " error: " + angular.toJson(err));
+ });
+ }
+ });
+ goBack();
+ }
+
+ $scope.deleteTemplate = (template) => {
+ UI.multiItemConfirmActionDialog({
+ collection: [template],
+ index: 'metadata.name',
+ onClose: (result:boolean) => {
+ if (result) {
+ KubernetesModel['templatesResource'].delete({
+ id: template.metadata.name
+ }, undefined, () => {
+ KubernetesModel['templatesResource'].query((data) => {
+ KubernetesModel.templates = data.items;
+ });
+ }, (error) => {
+ log.debug("Error deleting template: ", error);
+ });
+ }
+ },
+ title: 'Delete Template?',
+ action: 'The following template will be deleted:',
+ okText: 'Delete',
+ okClass: 'btn-danger',
+ custom: "This operation is permanent once completed!",
+ customClass: "alert alert-warning"
+ }).open();
+ };
+ }]);
+}
+
diff --git a/plugins/kubernetes/ts/term.ts b/plugins/kubernetes/ts/term.ts
index bdcd49d..cb21ef0 100644
--- a/plugins/kubernetes/ts/term.ts
+++ b/plugins/kubernetes/ts/term.ts
@@ -1,323 +1,323 @@
-///
-///
-
-module Kubernetes {
-
- var log = Logger.get("kubernetes-term-windows");
-
- _module.config((kubernetesContainerSocketProvider) => {
- kubernetesContainerSocketProvider.WebSocketFactory = "CustomWebSockets";
- });
-
- _module.factory('CustomWebSockets', (userDetails:any) => {
- return function CustomWebSocket(url, protocols) {
- var paths = url.split('?');
- if (!_.startsWith(paths[0], masterApiUrl())) {
- paths[0] = UrlHelpers.join(masterApiUrl(), paths[0]);
- }
- url = KubernetesAPI.wsUrl(paths[0]);
- url.search(paths[1] + '&access_token=' + userDetails.token);
- log.debug("Using ws url: ", url.toString());
- return new WebSocket(url.toString(), protocols);
- };
- });
-
- _module.service('TerminalService', ($rootScope, $document, $compile, $interval, $templateCache) => {
- var body = $document.find('body');
- function positionTerminals(terminals) {
- var total = _.keys(terminals).length;
- var dist = (body.width() - 225) / total;
- var position = 5;
- angular.forEach(terminals, (value, key) => {
- if (!value.scope.docked) {
- return;
- }
- value.el.css('left', position + 'px');
- position = position + dist;
- });
- }
- var defaultTemplate = $templateCache.get(UrlHelpers.join(templatePath, 'termShell.html'));
- var self = {
- positionTerminals: () => {
- positionTerminals(self.terminals);
- },
- terminals: {},
- httpTask: {},
- newTerminal: ($interval, podLink, containerName, entity, template = defaultTemplate) => {
- var terminalId = UrlHelpers.join(podLink, containerName);
- if (terminalId in self.terminals) {
- log.debug("Already a terminal with id: ", terminalId);
- self.raiseTerminal(terminalId);
- return terminalId;
- }
- var scope = $rootScope.$new();
- getLogs(entity, scope);
- scope.podLink = podLink;
- scope.containerName = containerName;
- scope.id = terminalId;
- scope.docked = true;
- if(terminalId in self.httpTask){
- self.raiseTerminal(terminalId);
- return terminalId;
- }else{
- self.httpTask[terminalId] = $interval(() =>{
- getLogs(entity, scope);
- },2000);
- }
- var el = $($compile(template)(scope));
- var term = {
- scope: scope,
- el: el
- };
- body.append(el);
- self.terminals[terminalId] = term;
- positionTerminals(self.terminals);
- return terminalId;
- },
- closeTerminal: (id) => {
- var term = self.terminals[id];
- var timer = self.httpTask[id];
- if(timer){
- $interval.cancel(timer);
- delete self.httpTask[id];
- }
- if (term) {
- term.el.remove();
- delete self.terminals[id];
- positionTerminals(self.terminals);
- }
- },
- raiseTerminal: (id) => {
- angular.forEach(self.terminals, (value, key) => {
- if (key === id) {
- value.el.css('z-index', '4000');
- value.el.find('.terminal').focus();
- } else {
- value.el.css('z-index', '3000');
- }
- });
- }
- };
- return self;
- });
-
- export function addWindowActions(scope, element, TerminalService) {
- var moved = false;
- var lastX = 0;
- var lastY = 0;
- var header = element.find('.terminal-title');
- var body = element.find('.terminal-body');
- element.on('$destroy', () => {
- $('#main').css({ display: 'inherit' });
- });
-
- var HEIGHT = 348;
- var WIDTH = 600;
- var TITLE_HEIGHT = 35;
- var NAV_OFFSET = 46;
-
- element.css({
- height: HEIGHT,
- width: WIDTH
- });
- header.css({
- height: TITLE_HEIGHT
- });
- body.css({
- position: 'absolute',
- top: 35,
- left: 0,
- right: 0,
- bottom: 0
- });
- scope.close = () => {
- TerminalService.closeTerminal(scope.id);
- };
- scope.raise = () => {
- TerminalService.raiseTerminal(scope.id);
- };
- scope.$watch('docked', (docked) => {
- if (docked) {
- element.width(WIDTH);
- if (!element.hasClass('minimized')) {
- element.height(HEIGHT);
- }
- }
- });
- scope.startResize = (e) => {
- e.preventDefault();
- log.debug("Start resize");
- scope.resizing = true;
- element.on('mouseup', scope.stopResize);
- $(document).on('mousemove', scope.doResize);
- $(document).on('mouseleave', scope.stopResize);
- };
- scope.doResize = (e) => {
- if (scope.resizing) {
- log.debug("Resizing, e: ", e);
- if (!moved) {
- lastX = e.clientX;
- lastY = e.clientY;
- moved = true;
- return;
- }
- var height = element.height();
- var width = element.width();
- var deltaX = e.clientX - lastX;
- var deltaY = e.clientY - lastY;
- var newHeight = height + deltaY;
- var newWidth = width + deltaX;
- if (newHeight > 35 && newWidth > 80) {
- element.height(height + deltaY);
- element.width(width + deltaX);
- }
- lastX = e.clientX;
- lastY = e.clientY;
- }
- };
- scope.stopResize = (e) => {
- scope.resizing = false;
- moved = false;
- element.off('mouseup', scope.stopResize);
- $(document).off('mousemove', scope.doResize);
- $(document).off('mouseleave', scope.stopResize);
- }
- scope.mouseDown = (e) => {
- e.preventDefault();
- if (element.hasClass('minimized') || element.hasClass('maximized')) {
- return;
- }
- scope.dragging = true;
- element.on('mouseup', scope.mouseUp);
- $(document).on('mousemove', scope.mouseMove);
- $(document).on('mouseleave', scope.mouseUp);
- };
- scope.mouseUp = (e) => {
- e.preventDefault();
- scope.dragging = false;
- moved = false;
- var height = element.height();
- var offset = element.offset();
- var winHeight = $(window).height();
- if (offset.top > (winHeight - height - 20)) {
- element.css({ top: "inherit", left: "inherit" });
- scope.docked = true;
- TerminalService.positionTerminals();
- } else {
- scope.docked = false;
- }
- element.off('mouseup', scope.mouseUp);
- $(document).off('mousemove', scope.mouseMove);
- $(document).off('mouseleave', scope.mouseUp);
- };
- scope.mouseMove = (e) => {
- if (scope.dragging) {
- if (!moved) {
- lastX = e.clientX;
- lastY = e.clientY;
- moved = true;
- return;
- }
- var deltaX = e.clientX - lastX;
- var deltaY = e.clientY - lastY;
- var elOffset = element.offset();
- element.offset({ top: elOffset.top + deltaY, left: elOffset.left + deltaX });
- lastX = e.clientX;
- lastY = e.clientY;
- }
- }
-
- function restoreWindow(scope, element) {
- if (scope.offset) {
- element.offset(scope.offset);
- scope.docked = false;
- }
- if (scope.height) {
- element.height(scope.height);
- }
- if (scope.width) {
- element.width(scope.width);
- }
- }
-
- function saveWindow(scope, element) {
- scope.offset = element.offset();
- scope.height = element.height();
- scope.width = element.width();
- }
-
- scope.maximized = () => {
- return element.hasClass('maximized');
- }
-
- scope.maximize = ($e) => {
- $e.preventDefault();
- if (element.hasClass('minimized')) {
- scope.minimize();
- }
- if (element.hasClass('maximized')) {
- restoreWindow(scope, element);
- $('#main').css({ display: 'inherit' });
- } else {
- saveWindow(scope, element);
- $('#main').css({ display: 'none' });
- element.css({
- height: 'inherit',
- bottom: 0,
- width: '100%',
- top: NAV_OFFSET,
- left: 0
- });
- }
- element.toggleClass('maximized');
- }
- scope.minimize = ($e) => {
- $e.preventDefault();
- if (element.hasClass('maximized')) {
- scope.maximize();
- }
- if (element.hasClass('minimized')) {
- restoreWindow(scope, element);
- } else {
- saveWindow(scope, element);
- scope.docked = true;
- element.css({ height: TITLE_HEIGHT, top: "inherit", left: "inherit" });
- TerminalService.positionTerminals();
- }
- element.toggleClass('minimized');
- };
- }
-
- _module.directive('terminalWindow', ($compile, TerminalService) => {
- return {
- restrict: 'A',
- scope: false,
- link: (scope:any, element, attr) => {
- addWindowActions(scope, element, TerminalService);
- var body = element.find('.terminal-body');
- body.append($compile('')(scope));
- }
- };
- });
-
- function getLogs(rc, scope){
- console.log(scope);
- var xhr= new XMLHttpRequest();
- xhr.onreadystatechange = () => {
- if(xhr.readyState == 4){
- if (xhr.status == 200){
- var obj=JSON.parse(xhr.responseText);
- var text = obj.logContent.replace(/\\n/gmi, '\r\n');
- scope.logs = text;
- //return ({text: "aaaaaa"});
-
- }else{
- //log = "当前没有可以查看的日志!";
- }
- }
- }
- xhr.open("POST", "/oracleExtractLog?rcName=" + getName(rc),false);
- xhr.send(null);
- }
-}
-
+///
+///
+
+module Kubernetes {
+
+ var log = Logger.get("kubernetes-term-windows");
+
+ _module.config((kubernetesContainerSocketProvider) => {
+ kubernetesContainerSocketProvider.WebSocketFactory = "CustomWebSockets";
+ });
+
+ _module.factory('CustomWebSockets', (userDetails:any) => {
+ return function CustomWebSocket(url, protocols) {
+ var paths = url.split('?');
+ if (!_.startsWith(paths[0], masterApiUrl())) {
+ paths[0] = UrlHelpers.join(masterApiUrl(), paths[0]);
+ }
+ url = KubernetesAPI.wsUrl(paths[0]);
+ url.search(paths[1] + '&access_token=' + userDetails.token);
+ log.debug("Using ws url: ", url.toString());
+ return new WebSocket(url.toString(), protocols);
+ };
+ });
+
+ _module.service('TerminalService', ($rootScope, $document, $compile, $interval, $templateCache) => {
+ var body = $document.find('body');
+ function positionTerminals(terminals) {
+ var total = _.keys(terminals).length;
+ var dist = (body.width() - 225) / total;
+ var position = 5;
+ angular.forEach(terminals, (value, key) => {
+ if (!value.scope.docked) {
+ return;
+ }
+ value.el.css('left', position + 'px');
+ position = position + dist;
+ });
+ }
+ var defaultTemplate = $templateCache.get(UrlHelpers.join(templatePath, 'termShell.html'));
+ var self = {
+ positionTerminals: () => {
+ positionTerminals(self.terminals);
+ },
+ terminals: {},
+ httpTask: {},
+ newTerminal: ($interval, podLink, containerName, entity, template = defaultTemplate) => {
+ var terminalId = UrlHelpers.join(podLink, containerName);
+ if (terminalId in self.terminals) {
+ log.debug("Already a terminal with id: ", terminalId);
+ self.raiseTerminal(terminalId);
+ return terminalId;
+ }
+ var scope = $rootScope.$new();
+ getLogs(entity, scope);
+ scope.podLink = podLink;
+ scope.containerName = containerName;
+ scope.id = terminalId;
+ scope.docked = true;
+ if(terminalId in self.httpTask){
+ self.raiseTerminal(terminalId);
+ return terminalId;
+ }else{
+ self.httpTask[terminalId] = $interval(() =>{
+ getLogs(entity, scope);
+ },2000);
+ }
+ var el = $($compile(template)(scope));
+ var term = {
+ scope: scope,
+ el: el
+ };
+ body.append(el);
+ self.terminals[terminalId] = term;
+ positionTerminals(self.terminals);
+ return terminalId;
+ },
+ closeTerminal: (id) => {
+ var term = self.terminals[id];
+ var timer = self.httpTask[id];
+ if(timer){
+ $interval.cancel(timer);
+ delete self.httpTask[id];
+ }
+ if (term) {
+ term.el.remove();
+ delete self.terminals[id];
+ positionTerminals(self.terminals);
+ }
+ },
+ raiseTerminal: (id) => {
+ angular.forEach(self.terminals, (value, key) => {
+ if (key === id) {
+ value.el.css('z-index', '4000');
+ value.el.find('.terminal').focus();
+ } else {
+ value.el.css('z-index', '3000');
+ }
+ });
+ }
+ };
+ return self;
+ });
+
+ export function addWindowActions(scope, element, TerminalService) {
+ var moved = false;
+ var lastX = 0;
+ var lastY = 0;
+ var header = element.find('.terminal-title');
+ var body = element.find('.terminal-body');
+ element.on('$destroy', () => {
+ $('#main').css({ display: 'inherit' });
+ });
+
+ var HEIGHT = 348;
+ var WIDTH = 600;
+ var TITLE_HEIGHT = 35;
+ var NAV_OFFSET = 46;
+
+ element.css({
+ height: HEIGHT,
+ width: WIDTH
+ });
+ header.css({
+ height: TITLE_HEIGHT
+ });
+ body.css({
+ position: 'absolute',
+ top: 35,
+ left: 0,
+ right: 0,
+ bottom: 0
+ });
+ scope.close = () => {
+ TerminalService.closeTerminal(scope.id);
+ };
+ scope.raise = () => {
+ TerminalService.raiseTerminal(scope.id);
+ };
+ scope.$watch('docked', (docked) => {
+ if (docked) {
+ element.width(WIDTH);
+ if (!element.hasClass('minimized')) {
+ element.height(HEIGHT);
+ }
+ }
+ });
+ scope.startResize = (e) => {
+ e.preventDefault();
+ log.debug("Start resize");
+ scope.resizing = true;
+ element.on('mouseup', scope.stopResize);
+ $(document).on('mousemove', scope.doResize);
+ $(document).on('mouseleave', scope.stopResize);
+ };
+ scope.doResize = (e) => {
+ if (scope.resizing) {
+ log.debug("Resizing, e: ", e);
+ if (!moved) {
+ lastX = e.clientX;
+ lastY = e.clientY;
+ moved = true;
+ return;
+ }
+ var height = element.height();
+ var width = element.width();
+ var deltaX = e.clientX - lastX;
+ var deltaY = e.clientY - lastY;
+ var newHeight = height + deltaY;
+ var newWidth = width + deltaX;
+ if (newHeight > 35 && newWidth > 80) {
+ element.height(height + deltaY);
+ element.width(width + deltaX);
+ }
+ lastX = e.clientX;
+ lastY = e.clientY;
+ }
+ };
+ scope.stopResize = (e) => {
+ scope.resizing = false;
+ moved = false;
+ element.off('mouseup', scope.stopResize);
+ $(document).off('mousemove', scope.doResize);
+ $(document).off('mouseleave', scope.stopResize);
+ }
+ scope.mouseDown = (e) => {
+ e.preventDefault();
+ if (element.hasClass('minimized') || element.hasClass('maximized')) {
+ return;
+ }
+ scope.dragging = true;
+ element.on('mouseup', scope.mouseUp);
+ $(document).on('mousemove', scope.mouseMove);
+ $(document).on('mouseleave', scope.mouseUp);
+ };
+ scope.mouseUp = (e) => {
+ e.preventDefault();
+ scope.dragging = false;
+ moved = false;
+ var height = element.height();
+ var offset = element.offset();
+ var winHeight = $(window).height();
+ if (offset.top > (winHeight - height - 20)) {
+ element.css({ top: "inherit", left: "inherit" });
+ scope.docked = true;
+ TerminalService.positionTerminals();
+ } else {
+ scope.docked = false;
+ }
+ element.off('mouseup', scope.mouseUp);
+ $(document).off('mousemove', scope.mouseMove);
+ $(document).off('mouseleave', scope.mouseUp);
+ };
+ scope.mouseMove = (e) => {
+ if (scope.dragging) {
+ if (!moved) {
+ lastX = e.clientX;
+ lastY = e.clientY;
+ moved = true;
+ return;
+ }
+ var deltaX = e.clientX - lastX;
+ var deltaY = e.clientY - lastY;
+ var elOffset = element.offset();
+ element.offset({ top: elOffset.top + deltaY, left: elOffset.left + deltaX });
+ lastX = e.clientX;
+ lastY = e.clientY;
+ }
+ }
+
+ function restoreWindow(scope, element) {
+ if (scope.offset) {
+ element.offset(scope.offset);
+ scope.docked = false;
+ }
+ if (scope.height) {
+ element.height(scope.height);
+ }
+ if (scope.width) {
+ element.width(scope.width);
+ }
+ }
+
+ function saveWindow(scope, element) {
+ scope.offset = element.offset();
+ scope.height = element.height();
+ scope.width = element.width();
+ }
+
+ scope.maximized = () => {
+ return element.hasClass('maximized');
+ }
+
+ scope.maximize = ($e) => {
+ $e.preventDefault();
+ if (element.hasClass('minimized')) {
+ scope.minimize();
+ }
+ if (element.hasClass('maximized')) {
+ restoreWindow(scope, element);
+ $('#main').css({ display: 'inherit' });
+ } else {
+ saveWindow(scope, element);
+ $('#main').css({ display: 'none' });
+ element.css({
+ height: 'inherit',
+ bottom: 0,
+ width: '100%',
+ top: NAV_OFFSET,
+ left: 0
+ });
+ }
+ element.toggleClass('maximized');
+ }
+ scope.minimize = ($e) => {
+ $e.preventDefault();
+ if (element.hasClass('maximized')) {
+ scope.maximize();
+ }
+ if (element.hasClass('minimized')) {
+ restoreWindow(scope, element);
+ } else {
+ saveWindow(scope, element);
+ scope.docked = true;
+ element.css({ height: TITLE_HEIGHT, top: "inherit", left: "inherit" });
+ TerminalService.positionTerminals();
+ }
+ element.toggleClass('minimized');
+ };
+ }
+
+ _module.directive('terminalWindow', ($compile, TerminalService) => {
+ return {
+ restrict: 'A',
+ scope: false,
+ link: (scope:any, element, attr) => {
+ addWindowActions(scope, element, TerminalService);
+ var body = element.find('.terminal-body');
+ body.append($compile('')(scope));
+ }
+ };
+ });
+
+ function getLogs(rc, scope){
+ console.log(scope);
+ var xhr= new XMLHttpRequest();
+ xhr.onreadystatechange = () => {
+ if(xhr.readyState == 4){
+ if (xhr.status == 200){
+ var obj=JSON.parse(xhr.responseText);
+ var text = obj.logContent.replace(/\\n/gmi, '\r\n');
+ scope.logs = text;
+ //return ({text: "aaaaaa"});
+
+ }else{
+ //log = "当前没有可以查看的日志!";
+ }
+ }
+ }
+ xhr.open("POST", "/oracleExtractLog?rcName=" + getName(rc),false);
+ xhr.send(null);
+ }
+}
+
diff --git a/plugins/kubernetes/ts/utilHelpers.ts b/plugins/kubernetes/ts/utilHelpers.ts
index 8bce595..4e59615 100644
--- a/plugins/kubernetes/ts/utilHelpers.ts
+++ b/plugins/kubernetes/ts/utilHelpers.ts
@@ -1,241 +1,241 @@
-///
-module Kubernetes {
- export var hostPorts =[];
-
- /**
- * Sorts the the ip field
- *
- * @param ip the ip such as '10.1.2.13'
- * @returns {any}
- */
- export function sortByPodIp(ip) : any {
- // i guess there is maybe nicer ways of sort this without parsing and slicing
- var regex = /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- var groups = regex.exec(ip);
- if (angular.isDefined(groups)) {
- var g1 = ("00" + groups[1]).slice(-3);
- var g2 = ("00" + groups[2]).slice(-3);
- var g3 = ("00" + groups[3]).slice(-3);
- var g4 = ("00" + groups[4]).slice(-3);
- var answer = g1 + g2 + g3 + g4;
- return answer;
- } else {
- return 0;
- }
- }
-
- export function ramdomPort(): number{
- var hostPort=Math.floor(30000+Math.random()*(65535-30000));
- while(hostPorts.indexOf(hostPort) === 0){
- hostPort = Math.floor(30000+Math.random()*(65535-30000));
- }
- hostPorts.push(hostPort);
- return hostPort
- }
-
- export function getRandomString(len : number) : string{
- len = len || 32;
- var $chars = 'abcdefhijkmnprstwxyz'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1
- var maxPos = $chars.length;
- var pwd = '';
- for (var i = 0; i < len; i++) {
- pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
- }
- return pwd;
- }
-
- export class resourceRCTemplate{
-
- public image="oracle:utf8";
- public names = ["admin","cfgtoollogs","checkpoints","diag","flash-recovery-area","oradata"];
-
- public createRC(Obj){
- var labels = {
- "style": "oracle",
- "status": "0",
- "isExtract": "0",
- "isTarget": Obj.isTarget
- };
- for(var item in Obj.labels)
- labels[item] = Obj.labels[item];
-
- return {
- "apiVersion" : Kubernetes.defaultApiVersion,
- "kind" : "ReplicationController",
- "metadata" : {
- "name" : Obj.name,
- "labels" : labels,
- "annotations": Obj.annotations
- },
- "spec" : {
- replicas : Obj.replicas || 1,
- "template" : this.createTemplate(Obj)
- }
- }
- }
-
- public createVolumeMounts(){
- var volumeMounts = [];
- for(var item in this.names){
- if(this.names[item] === 'flash-recovery-area')
- volumeMounts.push({
- "name" : this.names[item],
- "mountPath" : "/opt/oracle/app/flash_recovery_area"
- });
- else
- volumeMounts.push({
- "name" : this.names[item],
- "mountPath" : "/opt/oracle/app/" + this.names[item]
- });
- }
- return volumeMounts;
- }
-
- public createVolumes(rootPath :string){
- var volumes = [];
- for(var item in this.names){
- if(this.names[item] === 'flash-recovery-area')
- volumes.push({
- "name" : this.names[item],
- "hostPath" :{
- "path" : rootPath + "flash_recovery_area"
- }
- });
- else
- volumes.push({
- "name" : this.names[item],
- "hostPath" :{
- "path" : rootPath + this.names[item]
- }
- });
- }
- return volumes;
- }
-
- public createContainers(Obj){
- var containers = [];
- containers.push(
- {
- "name" : "oracle",
- "image": this.image,
- "imagePullPolicy": "IfNotPresent",
- "command":["/assets/entrypoint.sh"],
- "ports": [
- {
- "containerPort": 1521,
- "hostPort": Obj.port || ramdomPort()
- }],
- "volumeMounts" : this.createVolumeMounts()
- });
- return containers
- }
-
- public createTemplate(Obj){
- return {
- "metadata":
- {
- //"name": Obj.name,
- "labels": Obj.labels
- },
- "spec" : {
- "terminationGracePeriodSeconds" : 0,
- "containers" : this.createContainers(Obj),
- "volumes" : this.createVolumes(Obj.path)
- }
- }
- }
- }
-
- export function labelToChinese(labels){
- var answer = {};
- angular.forEach(labels,(value, key) => {
- answer[key] = labelChangeToChines(value, key);
- });
- return answer
- }
-
- export function findSameNameReplicationControllers(replicationControllers, name){
- var names = [];
- replicationControllers.forEach((rc) => {
- var rcName = getName(rc);
- if(rcName.indexof(name) !== -1)
- names.push(rcName);
- });
-
- if(names.length === 0){
- return name + "_1";
- }else{
- var max = 0;
- names.forEach((value) => {
- var answer = value.split("_");
- var key = parseInt(answer[1]);
- if(max < key)
- max = key;
- });
- return name + (max+1);
- }
- }
-
- export function isFilterRC(rc){
- var answer = false;
- angular.forEach(Core.pathGet(rc, ["metadata", "labels"]),(value, key) => {
- if(key === 'isTarget' && value === 'true'){
- answer = true;
- }
- });
- return answer;
- }
-
- export function isInclude(rcs, rc){
- for(var i in rcs){
- if(getName(rcs[i]) === getName(rc))
- return true;
- }
- return false;
- }
-
- export function labelChangeToChines(value:string, key:string){
- var trueValue = '';
- switch(key){
- case 'type':
- if(value === '01')
- trueValue = '财政';
- else if(value === '02')
- trueValue = '社保';
- else
- trueValue = value;
- break;
- case 'batch':
- if(value === 'A')
- trueValue = '批次A';
- else if(value === 'B')
- trueValue = '批次B';
- else
- trueValue = value;
-
- break;
- case 'region':
- trueValue = Kubernetes.getCountyByCode(value);
- break;
- case 'system':
- trueValue = Kubernetes.getSystemNameById(value);
- break;
- case 'version':
- var reg= new RegExp('^[0-9]$').exec(value);
- if(reg)
- trueValue = '版本' + reg[0];
- else
- trueValue = value;
- break;
- case 'isTarget':
- if(value === 'true')
- trueValue = '汇总数据库';
- else
- trueValue = value;
- break;
- default:
- trueValue = value;
- }
- return trueValue;
- }
+///
+module Kubernetes {
+ export var hostPorts =[];
+
+ /**
+ * Sorts the the ip field
+ *
+ * @param ip the ip such as '10.1.2.13'
+ * @returns {any}
+ */
+ export function sortByPodIp(ip) : any {
+ // i guess there is maybe nicer ways of sort this without parsing and slicing
+ var regex = /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
+ var groups = regex.exec(ip);
+ if (angular.isDefined(groups)) {
+ var g1 = ("00" + groups[1]).slice(-3);
+ var g2 = ("00" + groups[2]).slice(-3);
+ var g3 = ("00" + groups[3]).slice(-3);
+ var g4 = ("00" + groups[4]).slice(-3);
+ var answer = g1 + g2 + g3 + g4;
+ return answer;
+ } else {
+ return 0;
+ }
+ }
+
+ export function ramdomPort(): number{
+ var hostPort=Math.floor(30000+Math.random()*(65535-30000));
+ while(hostPorts.indexOf(hostPort) === 0){
+ hostPort = Math.floor(30000+Math.random()*(65535-30000));
+ }
+ hostPorts.push(hostPort);
+ return hostPort
+ }
+
+ export function getRandomString(len : number) : string{
+ len = len || 32;
+ var $chars = 'abcdefhijkmnprstwxyz'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1
+ var maxPos = $chars.length;
+ var pwd = '';
+ for (var i = 0; i < len; i++) {
+ pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
+ }
+ return pwd;
+ }
+
+ export class resourceRCTemplate{
+
+ public image="oracle:utf8";
+ public names = ["admin","cfgtoollogs","checkpoints","diag","flash-recovery-area","oradata"];
+
+ public createRC(Obj){
+ var labels = {
+ "style": "oracle",
+ "status": "0",
+ "isExtract": "0",
+ "isTarget": Obj.isTarget
+ };
+ for(var item in Obj.labels)
+ labels[item] = Obj.labels[item];
+
+ return {
+ "apiVersion" : Kubernetes.defaultApiVersion,
+ "kind" : "ReplicationController",
+ "metadata" : {
+ "name" : Obj.name,
+ "labels" : labels,
+ "annotations": Obj.annotations
+ },
+ "spec" : {
+ replicas : Obj.replicas || 1,
+ "template" : this.createTemplate(Obj)
+ }
+ }
+ }
+
+ public createVolumeMounts(){
+ var volumeMounts = [];
+ for(var item in this.names){
+ if(this.names[item] === 'flash-recovery-area')
+ volumeMounts.push({
+ "name" : this.names[item],
+ "mountPath" : "/opt/oracle/app/flash_recovery_area"
+ });
+ else
+ volumeMounts.push({
+ "name" : this.names[item],
+ "mountPath" : "/opt/oracle/app/" + this.names[item]
+ });
+ }
+ return volumeMounts;
+ }
+
+ public createVolumes(rootPath :string){
+ var volumes = [];
+ for(var item in this.names){
+ if(this.names[item] === 'flash-recovery-area')
+ volumes.push({
+ "name" : this.names[item],
+ "hostPath" :{
+ "path" : rootPath + "flash_recovery_area"
+ }
+ });
+ else
+ volumes.push({
+ "name" : this.names[item],
+ "hostPath" :{
+ "path" : rootPath + this.names[item]
+ }
+ });
+ }
+ return volumes;
+ }
+
+ public createContainers(Obj){
+ var containers = [];
+ containers.push(
+ {
+ "name" : "oracle",
+ "image": this.image,
+ "imagePullPolicy": "IfNotPresent",
+ "command":["/assets/entrypoint.sh"],
+ "ports": [
+ {
+ "containerPort": 1521,
+ "hostPort": Obj.port || ramdomPort()
+ }],
+ "volumeMounts" : this.createVolumeMounts()
+ });
+ return containers
+ }
+
+ public createTemplate(Obj){
+ return {
+ "metadata":
+ {
+ //"name": Obj.name,
+ "labels": Obj.labels
+ },
+ "spec" : {
+ "terminationGracePeriodSeconds" : 0,
+ "containers" : this.createContainers(Obj),
+ "volumes" : this.createVolumes(Obj.path)
+ }
+ }
+ }
+ }
+
+ export function labelToChinese(labels){
+ var answer = {};
+ angular.forEach(labels,(value, key) => {
+ answer[key] = labelChangeToChines(value, key);
+ });
+ return answer
+ }
+
+ export function findSameNameReplicationControllers(replicationControllers, name){
+ var names = [];
+ replicationControllers.forEach((rc) => {
+ var rcName = getName(rc);
+ if(rcName.indexof(name) !== -1)
+ names.push(rcName);
+ });
+
+ if(names.length === 0){
+ return name + "_1";
+ }else{
+ var max = 0;
+ names.forEach((value) => {
+ var answer = value.split("_");
+ var key = parseInt(answer[1]);
+ if(max < key)
+ max = key;
+ });
+ return name + (max+1);
+ }
+ }
+
+ export function isFilterRC(rc){
+ var answer = false;
+ angular.forEach(Core.pathGet(rc, ["metadata", "labels"]),(value, key) => {
+ if(key === 'isTarget' && value === 'true'){
+ answer = true;
+ }
+ });
+ return answer;
+ }
+
+ export function isInclude(rcs, rc){
+ for(var i in rcs){
+ if(getName(rcs[i]) === getName(rc))
+ return true;
+ }
+ return false;
+ }
+
+ export function labelChangeToChines(value:string, key:string){
+ var trueValue = '';
+ switch(key){
+ case 'type':
+ if(value === '01')
+ trueValue = '财政';
+ else if(value === '02')
+ trueValue = '社保';
+ else
+ trueValue = value;
+ break;
+ case 'batch':
+ if(value === 'A')
+ trueValue = '批次A';
+ else if(value === 'B')
+ trueValue = '批次B';
+ else
+ trueValue = value;
+
+ break;
+ case 'region':
+ trueValue = Kubernetes.getCountyByCode(value);
+ break;
+ case 'system':
+ trueValue = Kubernetes.getSystemNameById(value);
+ break;
+ case 'version':
+ var reg= new RegExp('^[0-9]$').exec(value);
+ if(reg)
+ trueValue = '版本' + reg[0];
+ else
+ trueValue = value;
+ break;
+ case 'isTarget':
+ if(value === 'true')
+ trueValue = '汇总数据库';
+ else
+ trueValue = value;
+ break;
+ default:
+ trueValue = value;
+ }
+ return trueValue;
+ }
}
\ No newline at end of file
diff --git a/plugins/kubernetes/ts/watcher.ts b/plugins/kubernetes/ts/watcher.ts
index bdd5618..b91a32b 100644
--- a/plugins/kubernetes/ts/watcher.ts
+++ b/plugins/kubernetes/ts/watcher.ts
@@ -1,276 +1,276 @@
-///
-
-module Kubernetes {
- var log = Logger.get('kubernetes-watcher');
-
- var k8sTypes = KubernetesAPI.NamespacedTypes.k8sTypes;
- var osTypes = KubernetesAPI.NamespacedTypes.osTypes;
-
- var self = {};
-
- var updateFunction = () => {
-
- log.debug("Objects changed, firing listeners");
- var objects = {};
- _.forEach(self.getTypes(), (type:string) => {
- objects[type] = self.getObjects(type);
- });
- _.forEach(self.listeners, (listener:(ObjectMap) => void) => {
- listener(objects);
- });
- };
- var debouncedUpdate = _.debounce(updateFunction, 75, { trailing: true });
-
- var namespaceWatch = {
- selected: undefined,
- watch: undefined,
- objects: [],
- objectMap: {},
- watches: {}
- };
-
- hawtioPluginLoader.registerPreBootstrapTask({
- name: 'KubernetesWatcherInit',
- depends: ['KubernetesApiDiscovery'],
- task: (next) => {
- var booted = false;
- if (isOpenShift) {
- log.info("Backend is an Openshift instance");
- } else {
- log.info("Backend is a vanilla Kubernetes instance");
- }
- namespaceWatch.watch = KubernetesAPI.watch({
- kind: KubernetesAPI.WatchTypes.NAMESPACES,
- success: (objects) => {
- namespaceWatch.objects = objects;
- if (!booted) {
- booted = true;
- self.setNamespace(localStorage[Constants.NAMESPACE_STORAGE_KEY] || defaultNamespace);
- next();
- }
- log.debug("Got namespaces: ", namespaceWatch.objects);
- }, error: (error:any) => {
- log.warn("Error fetching namespaces: ", error);
- // TODO is this necessary?
- //HawtioOAuth.doLogout();
- if (!booted) {
- booted = true;
- next();
- }
- }
- });
- }
- });
-
- hawtioPluginLoader.registerPreBootstrapTask({
- name: 'KubernetesApiDiscovery',
- depends: ['hawtio-oauth'],
- task: (next) => {
- isOpenShift = false;
-
- var userProfile = HawtioOAuth.getUserProfile();
- log.debug("User profile: ", userProfile);
- if (userProfile && userProfile.provider === "hawtio-google-oauth") {
- log.debug("Possibly running on GCE");
- // api master is on GCE
- $.ajax({
- url: UrlHelpers.join(masterApiUrl(), 'api', 'v1', 'namespaces'),
- complete: (jqXHR, textStatus) => {
- if (textStatus === "success") {
- log.debug("jqXHR: ", jqXHR);
- userProfile.oldToken = userProfile.token;
- userProfile.token = undefined;
- $.ajaxSetup({
- beforeSend: (request) => {
-
- }
- });
- }
- next();
- },
- beforeSend: (request) => {
-
- }
- });
- } else {
- log.debug("Not running on GCE");
- // double-check if we're on vanilla k8s or openshift
- var rootUri = new URI(masterApiUrl()).path("/oapi").query("").toString();
- log.debug("Checking for an openshift backend");
- HawtioOAuth.authenticatedHttpRequest({
- url: rootUri,
- success: (data) => {
- if (data) {
- isOpenShift = true;
- }
- next();
- },
- error: (jqXHR, textStatus, errorThrown) => {
- var error = KubernetesAPI.getErrorObject(jqXHR);
- if (!error) {
- log.debug("Failed to find root paths: ", textStatus, ": ", errorThrown);
- } else {
- log.debug("Failed to find root paths: ", error);
- }
- isOpenShift = false;
- next();
- }
- });
- }
- }
- });
-
- var customUrlHandlers = {};
-
- self.setNamespace = (namespace: string) => {
- if (namespace === namespaceWatch.selected) {
- return;
- }
- if (namespaceWatch.selected) {
- log.debug("Stopping current watches");
- _.forOwn(namespaceWatch.watches, (watch, key) => {
- if (!KubernetesAPI.namespaced(key)) {
- return;
- }
- log.debug("Disconnecting watch: ", key);
- watch.disconnect();
- });
- _.forEach(_.keys(namespaceWatch.watches), (key) => {
- if (!KubernetesAPI.namespaced(key)) {
- return;
- }
- log.debug("Deleting kind: ", key);
- delete namespaceWatch.watches[key];
- });
- }
- namespaceWatch.selected = namespace;
- if (namespace) {
- _.forEach(self.getTypes(), (kind:string) => {
- if (kind === KubernetesAPI.WatchTypes.NAMESPACES) {
- return;
- }
- if (!namespaceWatch.watches[kind]) {
- log.debug("Creating watch for kind: ", kind);
- var config = {
- kind: kind,
- namespace: KubernetesAPI.namespaced(kind) ? namespace : undefined,
- success: (objects) => {
- watch.objects = objects;
- debouncedUpdate();
- }
- };
- if (kind in customUrlHandlers) {
- config.urlFunction = customUrlHandlers[kind];
- }
- var watch = KubernetesAPI.watch(config);
- watch.config = config;
- namespaceWatch.watches[kind] = watch;
- }
- });
- }
- };
-
- self.hasWebSocket = true;
-
- self.getNamespace = () => namespaceWatch.selected;
-
- self.registerCustomUrlFunction = (kind:string, url:(options:KubernetesAPI.K8SOptions) => string) => {
- customUrlHandlers[kind] = url;
- if (kind in namespaceWatch.watches) {
- var watch = namespaceWatch.watches[kind];
- var config = watch.config;
- config.urlFunction = url;
- watch.disconnect();
- delete namespaceWatch.watches[kind];
- config.success = (objects) => {
- watch.objects = objects;
- debouncedUpdate();
- }
- watch = KubernetesAPI.watch(config);
- watch.config = config;
- namespaceWatch.watches[kind] = watch;
- }
- }
-
- self.getTypes = () => {
- var filter = (kind:string) => {
- // filter out stuff we don't care about yet
- switch(kind) {
- case KubernetesAPI.WatchTypes.OAUTH_CLIENTS:
- case KubernetesAPI.WatchTypes.IMAGE_STREAMS:
- case KubernetesAPI.WatchTypes.POLICIES:
- case KubernetesAPI.WatchTypes.ROLES:
- case KubernetesAPI.WatchTypes.ROLE_BINDINGS:
- case KubernetesAPI.WatchTypes.POLICY_BINDINGS:
- case KubernetesAPI.WatchTypes.PERSISTENT_VOLUME_CLAIMS:
- case KubernetesAPI.WatchTypes.PERSISTENT_VOLUMES:
- case KubernetesAPI.WatchTypes.ENDPOINTS:
- case KubernetesAPI.WatchTypes.RESOURCE_QUOTAS:
- case KubernetesAPI.WatchTypes.SERVICE_ACCOUNTS:
- return false;
-
- default:
- return true;
- }
- }
- var answer = k8sTypes.concat([WatchTypes.NAMESPACES]);
- if (isOpenShift) {
- answer = answer.concat(osTypes);
- } else {
- answer = answer.concat(KubernetesAPI.WatchTypes.TEMPLATES);
- answer = answer.concat(KubernetesAPI.WatchTypes.BUILD_CONFIGS);
- }
- return _.filter(answer, filter);
- }
-
- self.getObjects = (kind: string) => {
- if (kind === WatchTypes.NAMESPACES) {
- return namespaceWatch.objects;
- }
- if (kind in namespaceWatch.watches) {
- return namespaceWatch.watches[kind].objects;
- } else {
- return undefined;
- }
- }
-
- self.listeners = void>> [];
-
- // listener gets notified after a bunch of changes have occurred
- self.registerListener = (fn:(objects:ObjectMap) => void) => {
- self.listeners.push(fn);
- }
-
- var projectsHandle = undefined;
-
- // kick off the project watcher a bit sooner also
- hawtioPluginLoader.registerPreBootstrapTask({
- name: 'ProjectsWatcher',
- depends: ['KubernetesApiDiscovery'],
- task: (next) => {
- if (isOpenShift) {
-
- projectsHandle = KubernetesAPI.watch({
- kind: KubernetesAPI.WatchTypes.PROJECTS,
- namespace: undefined,
- success: (objects) => {
- if (self.listeners && self.listeners.length) {
- log.debug("got projects: ", objects);
- _.forEach(self.listeners, (listener:(objects:ObjectMap) => void) => {
- listener({
- projects: objects
- });
- });
- }
- }
- });
- }
- next();
- }
- });
-
-
-_module.service('WatcherService', ['userDetails', '$rootScope', '$timeout', (userDetails, $rootScope, $timeout) => {
- return self;
-}]);
-}
+///
+
+module Kubernetes {
+ var log = Logger.get('kubernetes-watcher');
+
+ var k8sTypes = KubernetesAPI.NamespacedTypes.k8sTypes;
+ var osTypes = KubernetesAPI.NamespacedTypes.osTypes;
+
+ var self = {};
+
+ var updateFunction = () => {
+
+ log.debug("Objects changed, firing listeners");
+ var objects = {};
+ _.forEach(self.getTypes(), (type:string) => {
+ objects[type] = self.getObjects(type);
+ });
+ _.forEach(self.listeners, (listener:(ObjectMap) => void) => {
+ listener(objects);
+ });
+ };
+ var debouncedUpdate = _.debounce(updateFunction, 75, { trailing: true });
+
+ var namespaceWatch = {
+ selected: undefined,
+ watch: undefined,
+ objects: [],
+ objectMap: {},
+ watches: {}
+ };
+
+ hawtioPluginLoader.registerPreBootstrapTask({
+ name: 'KubernetesWatcherInit',
+ depends: ['KubernetesApiDiscovery'],
+ task: (next) => {
+ var booted = false;
+ if (isOpenShift) {
+ log.info("Backend is an Openshift instance");
+ } else {
+ log.info("Backend is a vanilla Kubernetes instance");
+ }
+ namespaceWatch.watch = KubernetesAPI.watch({
+ kind: KubernetesAPI.WatchTypes.NAMESPACES,
+ success: (objects) => {
+ namespaceWatch.objects = objects;
+ if (!booted) {
+ booted = true;
+ self.setNamespace(localStorage[Constants.NAMESPACE_STORAGE_KEY] || defaultNamespace);
+ next();
+ }
+ log.debug("Got namespaces: ", namespaceWatch.objects);
+ }, error: (error:any) => {
+ log.warn("Error fetching namespaces: ", error);
+ // TODO is this necessary?
+ //HawtioOAuth.doLogout();
+ if (!booted) {
+ booted = true;
+ next();
+ }
+ }
+ });
+ }
+ });
+
+ hawtioPluginLoader.registerPreBootstrapTask({
+ name: 'KubernetesApiDiscovery',
+ depends: ['hawtio-oauth'],
+ task: (next) => {
+ isOpenShift = false;
+
+ var userProfile = HawtioOAuth.getUserProfile();
+ log.debug("User profile: ", userProfile);
+ if (userProfile && userProfile.provider === "hawtio-google-oauth") {
+ log.debug("Possibly running on GCE");
+ // api master is on GCE
+ $.ajax({
+ url: UrlHelpers.join(masterApiUrl(), 'api', 'v1', 'namespaces'),
+ complete: (jqXHR, textStatus) => {
+ if (textStatus === "success") {
+ log.debug("jqXHR: ", jqXHR);
+ userProfile.oldToken = userProfile.token;
+ userProfile.token = undefined;
+ $.ajaxSetup({
+ beforeSend: (request) => {
+
+ }
+ });
+ }
+ next();
+ },
+ beforeSend: (request) => {
+
+ }
+ });
+ } else {
+ log.debug("Not running on GCE");
+ // double-check if we're on vanilla k8s or openshift
+ var rootUri = new URI(masterApiUrl()).path("/oapi").query("").toString();
+ log.debug("Checking for an openshift backend");
+ HawtioOAuth.authenticatedHttpRequest({
+ url: rootUri,
+ success: (data) => {
+ if (data) {
+ isOpenShift = true;
+ }
+ next();
+ },
+ error: (jqXHR, textStatus, errorThrown) => {
+ var error = KubernetesAPI.getErrorObject(jqXHR);
+ if (!error) {
+ log.debug("Failed to find root paths: ", textStatus, ": ", errorThrown);
+ } else {
+ log.debug("Failed to find root paths: ", error);
+ }
+ isOpenShift = false;
+ next();
+ }
+ });
+ }
+ }
+ });
+
+ var customUrlHandlers = {};
+
+ self.setNamespace = (namespace: string) => {
+ if (namespace === namespaceWatch.selected) {
+ return;
+ }
+ if (namespaceWatch.selected) {
+ log.debug("Stopping current watches");
+ _.forOwn(namespaceWatch.watches, (watch, key) => {
+ if (!KubernetesAPI.namespaced(key)) {
+ return;
+ }
+ log.debug("Disconnecting watch: ", key);
+ watch.disconnect();
+ });
+ _.forEach(_.keys(namespaceWatch.watches), (key) => {
+ if (!KubernetesAPI.namespaced(key)) {
+ return;
+ }
+ log.debug("Deleting kind: ", key);
+ delete namespaceWatch.watches[key];
+ });
+ }
+ namespaceWatch.selected = namespace;
+ if (namespace) {
+ _.forEach(self.getTypes(), (kind:string) => {
+ if (kind === KubernetesAPI.WatchTypes.NAMESPACES) {
+ return;
+ }
+ if (!namespaceWatch.watches[kind]) {
+ log.debug("Creating watch for kind: ", kind);
+ var config = {
+ kind: kind,
+ namespace: KubernetesAPI.namespaced(kind) ? namespace : undefined,
+ success: (objects) => {
+ watch.objects = objects;
+ debouncedUpdate();
+ }
+ };
+ if (kind in customUrlHandlers) {
+ config.urlFunction = customUrlHandlers[kind];
+ }
+ var watch = KubernetesAPI.watch(config);
+ watch.config = config;
+ namespaceWatch.watches[kind] = watch;
+ }
+ });
+ }
+ };
+
+ self.hasWebSocket = true;
+
+ self.getNamespace = () => namespaceWatch.selected;
+
+ self.registerCustomUrlFunction = (kind:string, url:(options:KubernetesAPI.K8SOptions) => string) => {
+ customUrlHandlers[kind] = url;
+ if (kind in namespaceWatch.watches) {
+ var watch = namespaceWatch.watches[kind];
+ var config = watch.config;
+ config.urlFunction = url;
+ watch.disconnect();
+ delete namespaceWatch.watches[kind];
+ config.success = (objects) => {
+ watch.objects = objects;
+ debouncedUpdate();
+ }
+ watch = KubernetesAPI.watch(config);
+ watch.config = config;
+ namespaceWatch.watches[kind] = watch;
+ }
+ }
+
+ self.getTypes = () => {
+ var filter = (kind:string) => {
+ // filter out stuff we don't care about yet
+ switch(kind) {
+ case KubernetesAPI.WatchTypes.OAUTH_CLIENTS:
+ case KubernetesAPI.WatchTypes.IMAGE_STREAMS:
+ case KubernetesAPI.WatchTypes.POLICIES:
+ case KubernetesAPI.WatchTypes.ROLES:
+ case KubernetesAPI.WatchTypes.ROLE_BINDINGS:
+ case KubernetesAPI.WatchTypes.POLICY_BINDINGS:
+ case KubernetesAPI.WatchTypes.PERSISTENT_VOLUME_CLAIMS:
+ case KubernetesAPI.WatchTypes.PERSISTENT_VOLUMES:
+ case KubernetesAPI.WatchTypes.ENDPOINTS:
+ case KubernetesAPI.WatchTypes.RESOURCE_QUOTAS:
+ case KubernetesAPI.WatchTypes.SERVICE_ACCOUNTS:
+ return false;
+
+ default:
+ return true;
+ }
+ }
+ var answer = k8sTypes.concat([WatchTypes.NAMESPACES]);
+ if (isOpenShift) {
+ answer = answer.concat(osTypes);
+ } else {
+ answer = answer.concat(KubernetesAPI.WatchTypes.TEMPLATES);
+ answer = answer.concat(KubernetesAPI.WatchTypes.BUILD_CONFIGS);
+ }
+ return _.filter(answer, filter);
+ }
+
+ self.getObjects = (kind: string) => {
+ if (kind === WatchTypes.NAMESPACES) {
+ return namespaceWatch.objects;
+ }
+ if (kind in namespaceWatch.watches) {
+ return namespaceWatch.watches[kind].objects;
+ } else {
+ return undefined;
+ }
+ }
+
+ self.listeners = void>> [];
+
+ // listener gets notified after a bunch of changes have occurred
+ self.registerListener = (fn:(objects:ObjectMap) => void) => {
+ self.listeners.push(fn);
+ }
+
+ var projectsHandle = undefined;
+
+ // kick off the project watcher a bit sooner also
+ hawtioPluginLoader.registerPreBootstrapTask({
+ name: 'ProjectsWatcher',
+ depends: ['KubernetesApiDiscovery'],
+ task: (next) => {
+ if (isOpenShift) {
+
+ projectsHandle = KubernetesAPI.watch({
+ kind: KubernetesAPI.WatchTypes.PROJECTS,
+ namespace: undefined,
+ success: (objects) => {
+ if (self.listeners && self.listeners.length) {
+ log.debug("got projects: ", objects);
+ _.forEach(self.listeners, (listener:(objects:ObjectMap) => void) => {
+ listener({
+ projects: objects
+ });
+ });
+ }
+ }
+ });
+ }
+ next();
+ }
+ });
+
+
+_module.service('WatcherService', ['userDetails', '$rootScope', '$timeout', (userDetails, $rootScope, $timeout) => {
+ return self;
+}]);
+}
diff --git a/plugins/main.less b/plugins/main.less
index 6ac88c1..fc8be45 100644
--- a/plugins/main.less
+++ b/plugins/main.less
@@ -1,260 +1,260 @@
-.nowrap {
- white-space: nowrap;
-}
-
-.ngCellText .app-icon-small {
- width: 24px;
- vertical-align: middle;
-}
-
-.filter-header {
- padding-bottom: 10px;
-}
-
-.app-name {
- padding-left: 10px;
-}
-
-.profile-selector-name .app-name {
- padding-left: 4px;
-}
-
-
-img.icon-small-app {
- width: 24px;
- height: 24px;
- vertical-align: text-bottom;
-}
-
-.profile-selector-name {
- line-height: 24px;
-}
-
-img.icon-selected-app {
- width: 64px;
- height: 64px;
- vertical-align: middle;
-}
-
-.selected-app-name {
- line-height: 36px;
- padding-left: 5px;
-}
-
-.controller-pod-counts {
- padding-right: 16px;
- padding-top: 8px;
-}
-
-.pipeline-build-block {
- background-color: rgb(238, 238, 238);
- display: inline-block;
- width: 100%;
-}
-
-.pipeline-build {
- background: white;
- -moz-border-radius: 10px;
- border-radius: 10px;
- padding-top: 10px;
- padding-bottom: 10px;
- padding-left: 20px;
- padding-right: 20px;
- margin-top: 10px;
- margin-bottom: 10px;
- margin-left: 20px;
- margin-right: 20px;
-}
-
-.pipeline-deploy {
- background: white;
- border:5px solid;
- -moz-border-radius: 10px;
- border-radius: 10px;
- padding-top: 10px;
- padding-bottom: 10px;
- padding-left: 20px;
- padding-right: 20px;
- margin-top: 10px;
- margin-bottom: 10px;
- margin-left: 20px;
- margin-right: 20px;
- color: black;
-}
-
-.widget-body > .pipeline-panel,
-.widget-body > .pipeline-panel > *,
-.widget-body > .pipeline-panel > * > *,
-.widget-body > .pipeline-panel > * > * > *,
-.widget-body > .pipeline-panel > * > * > * > * {
- height: 100%;
- vertical-align: middle;
-}
-
-.pipeline-block {
- width: 100%;
-}
-
-.build-fail {
- border-color: lightcoral;
-}
-
-.build-success {
- border-color: lightgreen;
-}
-
-.build-pending {
- border-color: khaki;
-}
-
-.build-aborted {
- border-color: silver;
-}
-
-.build-not-started {
- border-color: lightblue;
-}
-
-
-.pipeline-build a {
- color: black;
-}
-.pipeline-deploy a {
- color: black;
-}
-
-.pipeline-pod-counts {
- padding-right: 16px;
- padding-top: 8px;
-}
-
-.pipeline-row {
- background: lightgrey;
- border-radius: 4px;
- height: 80px;
- display: inline;
- border-radius: 4px;
- text-align: center;
- vertical-align: middle;
- border: 20px;
- margin: 5px;
-}
-
-.pipeline-arrow {
- font-size: 1.2em;
-}
-
-.icon-heading {
- font-size: 24px;
-}
-
-
-.row-header {
- padding-bottom: 20px;
-}
-
-.project-overview-title {
- padding-left: 80px;
- padding-top: 18px;
-}
-
-.project-overview-title a {
- color: black;
-}
-
-/*
-
-.raw-json-view {
- width: 90%; height: 700px;
-}
-*/
-
-.raw-json-view .CodeMirror {
- height: 90%;
-}
-
-.k8sServiceApp-menu {
- width: 260px;
-}
-
-.k8sServiceApp > a {
- padding-top: 5px !important;
- padding-bottom: 5px !important;
- line-height: 32px !important;
-}
-
-.k8sServiceApp > a > img {
- vertical-align: bottom;
-}
-
-.k8sServiceApp > a > span {
- font-size: 14px;
- line-height: 32px;
-}
-
-.breadcrumb-tabs {
- padding-top: 5px;
-}
-
-tbody .ngCellText i {
- margin-right: 5px;
-}
-
-.log-success {
- color: green;
-}
-
-.log-warn {
- color: orange
-}
-
-.log-error {
- color: red;
-}
-
-
-.form-warning.bg-danger {
- padding: 8px;
-}
-
-legend {
- border-bottom: none;
-}
-
-/* TODO lets work around some ui-bootstrap / patternfly css gremlins */
-.modal .modal-dialog {
- margin-top: 0px;
- margin-bottom: 0px;
-}
-
-/* lets set this to the same size as modal-dialog */
-.modal {
- width: 600px;
-}
-
-.btn.btn-padding {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.k8s-badge-batch {
- background-color: darkblue;
-}
-.k8s-badge-type {
- background-color: darkgreen;
-}
-.k8s-badge-region {
- background-color: darkred;
-}
-
-.k8s-badge-system {
- background-color: darkmagenta;
-}
-
-.k8s-badge-target {
- background-color: Red;
-}
-.badge-remind{
- background-color: Red;
-}
-
+.nowrap {
+ white-space: nowrap;
+}
+
+.ngCellText .app-icon-small {
+ width: 24px;
+ vertical-align: middle;
+}
+
+.filter-header {
+ padding-bottom: 10px;
+}
+
+.app-name {
+ padding-left: 10px;
+}
+
+.profile-selector-name .app-name {
+ padding-left: 4px;
+}
+
+
+img.icon-small-app {
+ width: 24px;
+ height: 24px;
+ vertical-align: text-bottom;
+}
+
+.profile-selector-name {
+ line-height: 24px;
+}
+
+img.icon-selected-app {
+ width: 64px;
+ height: 64px;
+ vertical-align: middle;
+}
+
+.selected-app-name {
+ line-height: 36px;
+ padding-left: 5px;
+}
+
+.controller-pod-counts {
+ padding-right: 16px;
+ padding-top: 8px;
+}
+
+.pipeline-build-block {
+ background-color: rgb(238, 238, 238);
+ display: inline-block;
+ width: 100%;
+}
+
+.pipeline-build {
+ background: white;
+ -moz-border-radius: 10px;
+ border-radius: 10px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ padding-left: 20px;
+ padding-right: 20px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ margin-left: 20px;
+ margin-right: 20px;
+}
+
+.pipeline-deploy {
+ background: white;
+ border:5px solid;
+ -moz-border-radius: 10px;
+ border-radius: 10px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ padding-left: 20px;
+ padding-right: 20px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ margin-left: 20px;
+ margin-right: 20px;
+ color: black;
+}
+
+.widget-body > .pipeline-panel,
+.widget-body > .pipeline-panel > *,
+.widget-body > .pipeline-panel > * > *,
+.widget-body > .pipeline-panel > * > * > *,
+.widget-body > .pipeline-panel > * > * > * > * {
+ height: 100%;
+ vertical-align: middle;
+}
+
+.pipeline-block {
+ width: 100%;
+}
+
+.build-fail {
+ border-color: lightcoral;
+}
+
+.build-success {
+ border-color: lightgreen;
+}
+
+.build-pending {
+ border-color: khaki;
+}
+
+.build-aborted {
+ border-color: silver;
+}
+
+.build-not-started {
+ border-color: lightblue;
+}
+
+
+.pipeline-build a {
+ color: black;
+}
+.pipeline-deploy a {
+ color: black;
+}
+
+.pipeline-pod-counts {
+ padding-right: 16px;
+ padding-top: 8px;
+}
+
+.pipeline-row {
+ background: lightgrey;
+ border-radius: 4px;
+ height: 80px;
+ display: inline;
+ border-radius: 4px;
+ text-align: center;
+ vertical-align: middle;
+ border: 20px;
+ margin: 5px;
+}
+
+.pipeline-arrow {
+ font-size: 1.2em;
+}
+
+.icon-heading {
+ font-size: 24px;
+}
+
+
+.row-header {
+ padding-bottom: 20px;
+}
+
+.project-overview-title {
+ padding-left: 80px;
+ padding-top: 18px;
+}
+
+.project-overview-title a {
+ color: black;
+}
+
+/*
+
+.raw-json-view {
+ width: 90%; height: 700px;
+}
+*/
+
+.raw-json-view .CodeMirror {
+ height: 90%;
+}
+
+.k8sServiceApp-menu {
+ width: 260px;
+}
+
+.k8sServiceApp > a {
+ padding-top: 5px !important;
+ padding-bottom: 5px !important;
+ line-height: 32px !important;
+}
+
+.k8sServiceApp > a > img {
+ vertical-align: bottom;
+}
+
+.k8sServiceApp > a > span {
+ font-size: 14px;
+ line-height: 32px;
+}
+
+.breadcrumb-tabs {
+ padding-top: 5px;
+}
+
+tbody .ngCellText i {
+ margin-right: 5px;
+}
+
+.log-success {
+ color: green;
+}
+
+.log-warn {
+ color: orange
+}
+
+.log-error {
+ color: red;
+}
+
+
+.form-warning.bg-danger {
+ padding: 8px;
+}
+
+legend {
+ border-bottom: none;
+}
+
+/* TODO lets work around some ui-bootstrap / patternfly css gremlins */
+.modal .modal-dialog {
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+/* lets set this to the same size as modal-dialog */
+.modal {
+ width: 600px;
+}
+
+.btn.btn-padding {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.k8s-badge-batch {
+ background-color: darkblue;
+}
+.k8s-badge-type {
+ background-color: darkgreen;
+}
+.k8s-badge-region {
+ background-color: darkred;
+}
+
+.k8s-badge-system {
+ background-color: darkmagenta;
+}
+
+.k8s-badge-target {
+ background-color: Red;
+}
+.badge-remind{
+ background-color: Red;
+}
+
diff --git a/plugins/navigation/less/navigation.less b/plugins/navigation/less/navigation.less
index fc91054..7d974a1 100644
--- a/plugins/navigation/less/navigation.less
+++ b/plugins/navigation/less/navigation.less
@@ -1,78 +1,78 @@
-.layout-pf.layout-pf-fixed .container-pf-nav-pf-vertical {
- margin-left: 170px;
-}
-
-.nav-pf-vertical {
- & .list-group > .list-group-item > a {
- width: auto;
- }
- width: auto;
- min-width: 170px;
-}
-
-.nav-pf-vertical > .list-group > .list-group-item > a .fa,
-.nav-pf-vertical > .list-group > .list-group-item > a .glyphicon,
-.nav-pf-vertical > .list-group > .list-group-item > a .pficon {
- line-height: 25px;
- margin-right: 3px;
-}
-
-.nav-pf-vertical > .list-group > .list-group-item > a img {
- max-height: 16px;
- max-width: 16px;
- margin-right: 10px;
-}
-
-.navbar-tab-vertical {
- height: 70px;
- width: 100%;
- display: block;
- background: #1d1d1d;
- border-color: #1d1d1d;
-}
-
-.navbar-tab-horizontal {
- height: 100%;
- width: 100px;
- display: block;
- background: #1d1d1d;
- border-color: #1d1d1d;
-}
-
-.gesture {
- cursor: pointer;
-}
-
-.navbar-lf {
- width: 200px;
- min-height: 800px;
- background: #1d1d1d;
- position: absolute;
- left: 0;
- top: 0px;
-}
-
-.navbar-lf-menu {
- display: block;
- text-decoration: none;
-}
-
-.log-img {
- width: "66";
- height: "21";
- alt: "logo";
-}
-
-.fl {
- float: left;
-}
-
-a.logo {
- display: block;
- width: 130px;
- padding: 20px 0 0 40px;
-}
-
-.content-margin {
- margin-left: 170px;
-}
+.layout-pf.layout-pf-fixed .container-pf-nav-pf-vertical {
+ margin-left: 170px;
+}
+
+.nav-pf-vertical {
+ & .list-group > .list-group-item > a {
+ width: auto;
+ }
+ width: auto;
+ min-width: 170px;
+}
+
+.nav-pf-vertical > .list-group > .list-group-item > a .fa,
+.nav-pf-vertical > .list-group > .list-group-item > a .glyphicon,
+.nav-pf-vertical > .list-group > .list-group-item > a .pficon {
+ line-height: 25px;
+ margin-right: 3px;
+}
+
+.nav-pf-vertical > .list-group > .list-group-item > a img {
+ max-height: 16px;
+ max-width: 16px;
+ margin-right: 10px;
+}
+
+.navbar-tab-vertical {
+ height: 70px;
+ width: 100%;
+ display: block;
+ background: #1d1d1d;
+ border-color: #1d1d1d;
+}
+
+.navbar-tab-horizontal {
+ height: 100%;
+ width: 100px;
+ display: block;
+ background: #1d1d1d;
+ border-color: #1d1d1d;
+}
+
+.gesture {
+ cursor: pointer;
+}
+
+.navbar-lf {
+ width: 200px;
+ min-height: 800px;
+ background: #1d1d1d;
+ position: absolute;
+ left: 0;
+ top: 0px;
+}
+
+.navbar-lf-menu {
+ display: block;
+ text-decoration: none;
+}
+
+.log-img {
+ width: "66";
+ height: "21";
+ alt: "logo";
+}
+
+.fl {
+ float: left;
+}
+
+a.logo {
+ display: block;
+ width: 130px;
+ padding: 20px 0 0 40px;
+}
+
+.content-margin {
+ margin-left: 170px;
+}
diff --git a/plugins/navigation/ts/navigationPlugin.ts b/plugins/navigation/ts/navigationPlugin.ts
index eace40f..7cb3998 100644
--- a/plugins/navigation/ts/navigationPlugin.ts
+++ b/plugins/navigation/ts/navigationPlugin.ts
@@ -1,254 +1,254 @@
-///
-module Navigation {
-
- export var pluginName = 'hawtio-navigation';
- export var log = Logger.get(pluginName);
- export var _module = angular.module(pluginName, []);
-
- _module.run(() => {
- });
-
- _module.service('HawtioBreadcrumbs', () => {
- var _config = [];
- var self = {
- apply: (config) => {
- _config.length = 0;
- _.forEach(config, (crumb) => {
- _config.push(crumb);
- });
- },
- get: () => {
- return _config;
- }
- };
- return self;
- });
-
- _module.service('HawtioSubTabs', () => {
- var _config = [];
- var self = {
- apply: (config) => {
- _config.length = 0;
- _.forEach(config, (crumb) => {
- _config.push(crumb);
- });
- },
- get: () => {
- return _config;
- }
- }
- return self;
- });
-
- _module.directive('hawtioRelativeHref', ['$location', ($location) => {
- return {
- restrict: 'A',
- link: (scope, element, attr) => {
- var targetPath = attr['hawtioRelativeHref'];
- var targetHref = new URI($location.url());
- targetHref.segment(targetPath);
- element.attr('href', targetHref.toString());
- }
- }
- }]);
-
- _module.directive('viewportHeight', ['$window', '$document', ($window, $document) => {
- return {
- restrict: 'A',
- link: (scope, element, attr) => {
- // log.debug("Window: ", $window);
- // log.debug("element: ", element);
- var win = $($window);
- var resizeFunc = () => {
- var viewportHeight = win.innerHeight();
- // log.debug("Viewport height: ", viewportHeight);
- var elTop = element.offset().top;
- // log.debug("Element top: ", elTop);
- var height = viewportHeight - elTop;
- element.css('height', height);
- };
- win.on('resize', resizeFunc);
- element.on('$destroy', () => {
- win.off('resize', resizeFunc);
- });
- setTimeout(resizeFunc, 50);
- }
- }
- }]);
-
- _module.directive('hawtioMainOutlet', ['HawtioSubTabs', (HawtioSubTabs) => {
- return {
- restrict: 'A',
- link: (scope, element, attrs) => {
- scope.tabs = HawtioSubTabs;
- scope.$watchCollection('tabs.get()', (tabs) => {
- // log.debug("subTabConfig: ", subTabConfig);
- if (tabs && tabs.length > 0) {
- element.removeClass('hidden-nav');
- element.css({ 'margin-left': '' });
- } else {
- element.addClass('hidden-nav');
- element.css({ 'margin-left': 'auto' });
- }
- });
- }
- };
-
- }]);
-
- _module.directive('hawtioTabsOutlet', ['HawtioSubTabs', (HawtioSubTabs) => {
- var initialized = false;
- return {
- restrict: 'AE',
- replace: true,
- template: `
-
-
- `,
- link: (scope, element, attrs) => {
- if (!initialized) {
- try {
- //(
$)().setupVerticalNavigation(false);
- } catch (err) {
- // ignore if we haven't loaded patternfly
- }
- initialized = true;
- }
- scope.HawtioSubTabs = HawtioSubTabs;
-
- var collapsed = false;
- scope.getClass = () => {
- //log.debug("My class: ", element.attr('class'));
- if (!scope.subTabConfig || !scope.subTabConfig.length) {
- return 'hidden';
- }
- if (collapsed) {
- return 'collapsed';
- }
- return '';
- }
- scope.$on('hawtioCollapseNav', () => {
- collapsed = !collapsed;
- });
- scope.$watch('HawtioSubTabs.get()', (subTabConfig) => {
- scope.subTabConfig = subTabConfig;
-
- });
- }
- };
- }]);
-
- _module.directive('hawtioBreadcrumbsOutlet', ['HawtioBreadcrumbs', 'HawtioSubTabs', (HawtioBreadcrumbs, HawtioSubTabs) => {
- return {
- restrict: 'E',
- scope: {},
- template: `
-
- `,
- link: (scope, element, attrs) => {
- scope.breadcrumbs = HawtioBreadcrumbs;
- scope.tabs = HawtioSubTabs;
- scope.$watchCollection('breadcrumbs.get()', (breadcrumbConfig) => {
- scope.breadcrumbConfig = breadcrumbConfig;
- });
- scope.$watchCollection('tabs.get()', (tabs) => {
- var active = _.find(tabs, (tab:any) => tab.active);
- if (active) {
- scope.pageTitle = active.label;
- } else {
- scope.pageTitle = undefined;
- }
- });
- }
- };
- }]);
-
- _module.directive('platformSubTabsOutlet', ['HawtioSubTabs', (HawtioSubTabs) => {
- var initialized = false;
- return {
- restrict: 'AE',
- replace: true,
- template: `
-
-
-
- `,
- link: (scope, element, attrs) => {
- if (!initialized) {
- try {
- //($)().setupVerticalNavigation(false);
- } catch (err) {
- // ignore if we haven't loaded patternfly
- }
- initialized = true;
- }
- scope.HawtioSubTabs = HawtioSubTabs;
-
- var collapsed = false;
- scope.getClass = () => {
- //log.debug("My class: ", element.attr('class'));
- if (!scope.subTabConfig || !scope.subTabConfig.length) {
- return 'hidden';
- }
- if (collapsed) {
- return 'collapsed';
- }
- return '';
- }
- scope.$on('hawtioCollapseNav', () => {
- collapsed = !collapsed;
- });
- scope.$watch('HawtioSubTabs.get()', (subTabConfig) => {
- scope.subTabConfig = subTabConfig;
-
- });
- }
- };
- }]);
-
- //hawtioPluginLoader.addModule('patternfly');
- hawtioPluginLoader.addModule(pluginName);
-
-}
-
+///
+module Navigation {
+
+ export var pluginName = 'hawtio-navigation';
+ export var log = Logger.get(pluginName);
+ export var _module = angular.module(pluginName, []);
+
+ _module.run(() => {
+ });
+
+ _module.service('HawtioBreadcrumbs', () => {
+ var _config = [];
+ var self = {
+ apply: (config) => {
+ _config.length = 0;
+ _.forEach(config, (crumb) => {
+ _config.push(crumb);
+ });
+ },
+ get: () => {
+ return _config;
+ }
+ };
+ return self;
+ });
+
+ _module.service('HawtioSubTabs', () => {
+ var _config = [];
+ var self = {
+ apply: (config) => {
+ _config.length = 0;
+ _.forEach(config, (crumb) => {
+ _config.push(crumb);
+ });
+ },
+ get: () => {
+ return _config;
+ }
+ }
+ return self;
+ });
+
+ _module.directive('hawtioRelativeHref', ['$location', ($location) => {
+ return {
+ restrict: 'A',
+ link: (scope, element, attr) => {
+ var targetPath = attr['hawtioRelativeHref'];
+ var targetHref = new URI($location.url());
+ targetHref.segment(targetPath);
+ element.attr('href', targetHref.toString());
+ }
+ }
+ }]);
+
+ _module.directive('viewportHeight', ['$window', '$document', ($window, $document) => {
+ return {
+ restrict: 'A',
+ link: (scope, element, attr) => {
+ // log.debug("Window: ", $window);
+ // log.debug("element: ", element);
+ var win = $($window);
+ var resizeFunc = () => {
+ var viewportHeight = win.innerHeight();
+ // log.debug("Viewport height: ", viewportHeight);
+ var elTop = element.offset().top;
+ // log.debug("Element top: ", elTop);
+ var height = viewportHeight - elTop;
+ element.css('height', height);
+ };
+ win.on('resize', resizeFunc);
+ element.on('$destroy', () => {
+ win.off('resize', resizeFunc);
+ });
+ setTimeout(resizeFunc, 50);
+ }
+ }
+ }]);
+
+ _module.directive('hawtioMainOutlet', ['HawtioSubTabs', (HawtioSubTabs) => {
+ return {
+ restrict: 'A',
+ link: (scope, element, attrs) => {
+ scope.tabs = HawtioSubTabs;
+ scope.$watchCollection('tabs.get()', (tabs) => {
+ // log.debug("subTabConfig: ", subTabConfig);
+ if (tabs && tabs.length > 0) {
+ element.removeClass('hidden-nav');
+ element.css({ 'margin-left': '' });
+ } else {
+ element.addClass('hidden-nav');
+ element.css({ 'margin-left': 'auto' });
+ }
+ });
+ }
+ };
+
+ }]);
+
+ _module.directive('hawtioTabsOutlet', ['HawtioSubTabs', (HawtioSubTabs) => {
+ var initialized = false;
+ return {
+ restrict: 'AE',
+ replace: true,
+ template: `
+
+
+ `,
+ link: (scope, element, attrs) => {
+ if (!initialized) {
+ try {
+ //(
$)().setupVerticalNavigation(false);
+ } catch (err) {
+ // ignore if we haven't loaded patternfly
+ }
+ initialized = true;
+ }
+ scope.HawtioSubTabs = HawtioSubTabs;
+
+ var collapsed = false;
+ scope.getClass = () => {
+ //log.debug("My class: ", element.attr('class'));
+ if (!scope.subTabConfig || !scope.subTabConfig.length) {
+ return 'hidden';
+ }
+ if (collapsed) {
+ return 'collapsed';
+ }
+ return '';
+ }
+ scope.$on('hawtioCollapseNav', () => {
+ collapsed = !collapsed;
+ });
+ scope.$watch('HawtioSubTabs.get()', (subTabConfig) => {
+ scope.subTabConfig = subTabConfig;
+
+ });
+ }
+ };
+ }]);
+
+ _module.directive('hawtioBreadcrumbsOutlet', ['HawtioBreadcrumbs', 'HawtioSubTabs', (HawtioBreadcrumbs, HawtioSubTabs) => {
+ return {
+ restrict: 'E',
+ scope: {},
+ template: `
+
+ `,
+ link: (scope, element, attrs) => {
+ scope.breadcrumbs = HawtioBreadcrumbs;
+ scope.tabs = HawtioSubTabs;
+ scope.$watchCollection('breadcrumbs.get()', (breadcrumbConfig) => {
+ scope.breadcrumbConfig = breadcrumbConfig;
+ });
+ scope.$watchCollection('tabs.get()', (tabs) => {
+ var active = _.find(tabs, (tab:any) => tab.active);
+ if (active) {
+ scope.pageTitle = active.label;
+ } else {
+ scope.pageTitle = undefined;
+ }
+ });
+ }
+ };
+ }]);
+
+ _module.directive('platformSubTabsOutlet', ['HawtioSubTabs', (HawtioSubTabs) => {
+ var initialized = false;
+ return {
+ restrict: 'AE',
+ replace: true,
+ template: `
+
+ `,
+ link: (scope, element, attrs) => {
+ if (!initialized) {
+ try {
+ //($)().setupVerticalNavigation(false);
+ } catch (err) {
+ // ignore if we haven't loaded patternfly
+ }
+ initialized = true;
+ }
+ scope.HawtioSubTabs = HawtioSubTabs;
+
+ var collapsed = false;
+ scope.getClass = () => {
+ //log.debug("My class: ", element.attr('class'));
+ if (!scope.subTabConfig || !scope.subTabConfig.length) {
+ return 'hidden';
+ }
+ if (collapsed) {
+ return 'collapsed';
+ }
+ return '';
+ }
+ scope.$on('hawtioCollapseNav', () => {
+ collapsed = !collapsed;
+ });
+ scope.$watch('HawtioSubTabs.get()', (subTabConfig) => {
+ scope.subTabConfig = subTabConfig;
+
+ });
+ }
+ };
+ }]);
+
+ //hawtioPluginLoader.addModule('patternfly');
+ hawtioPluginLoader.addModule(pluginName);
+
+}
+
diff --git a/resumable-node.js b/resumable-node.js
index 6389c7a..2207660 100644
--- a/resumable-node.js
+++ b/resumable-node.js
@@ -1,213 +1,213 @@
-var fs = require('fs'), path = require('path'), util = require('util'), Stream = require('stream').Stream;
-
-
-
-module.exports = resumable = function(temporaryFolder){
- var $ = this;
- $.temporaryFolder = temporaryFolder;
- $.maxFileSize = null;
- $.fileParameterName = 'file';
-
- try {
- fs.mkdirSync($.temporaryFolder);
- }catch(e){}
-
-
- var cleanIdentifier = function(identifier){
- return identifier.replace(/^0-9A-Za-z_-/img, '');
- }
-
- var getChunkFilename = function(chunkNumber, identifier){
- // Clean up the identifier
- identifier = cleanIdentifier(identifier);
- // What would the file name be?
- return path.join($.temporaryFolder, './resumable-'+identifier+'.'+chunkNumber);
- }
-
- var validateRequest = function(chunkNumber, chunkSize, totalSize, identifier, filename, fileSize){
- // Clean up the identifier
- identifier = cleanIdentifier(identifier);
-
- // Check if the request is sane
- if (chunkNumber==0 || chunkSize==0 || totalSize==0 || identifier.length==0 || filename.length==0) {
- return 'non_resumable_request';
- }
- var numberOfChunks = Math.max(Math.floor(totalSize/(chunkSize*1.0)), 1);
- if (chunkNumber>numberOfChunks) {
- return 'invalid_resumable_request1';
- }
-
- // Is the file too big?
- if($.maxFileSize && totalSize>$.maxFileSize) {
- return 'invalid_resumable_request2';
- }
-
- if(typeof(fileSize)!='undefined') {
- if(chunkNumber1 && chunkNumber==numberOfChunks && fileSize!=((totalSize%chunkSize)+chunkSize)) {
- // The chunks in the POST is the last one, and the fil is not the correct size
- return 'invalid_resumable_request4';
- }
- if(numberOfChunks==1 && fileSize!=totalSize) {
- // The file is only a single chunk, and the data size does not fit
- return 'invalid_resumable_request5';
- }
- }
-
- return 'valid';
- }
-
- //'found', filename, original_filename, identifier
- //'not_found', null, null, null
- $.get = function(req, callback){
- var chunkNumber = req.param('resumableChunkNumber', 0);
- var chunkSize = req.param('resumableChunkSize', 0);
- var totalSize = req.param('resumableTotalSize', 0);
- var identifier = req.param('resumableIdentifier', "");
- var filename = req.param('resumableFilename', "");
-
- if(validateRequest(chunkNumber, chunkSize, totalSize, identifier, filename)=='valid') {
- var chunkFilename = getChunkFilename(chunkNumber, identifier);
- fs.exists(chunkFilename, function(exists){
- if(exists){
- callback('found', chunkFilename, filename, identifier);
- } else {
- callback('not_found', chunkFilename, filename, identifier);
- }
- });
- } else {
- callback('not_found2', chunkFilename, filename, identifier);
- }
- }
-
- //'partly_done', filename, original_filename, identifier
- //'done', filename, original_filename, identifier
- //'invalid_resumable_request', null, null, null
- //'non_resumable_request', null, null, null
- $.post = function(req, callback){
-
- var fields = req.body;
- var files = req.files;
-
- var chunkNumber = fields['resumableChunkNumber'];
- var chunkSize = fields['resumableChunkSize'];
- var totalSize = fields['resumableTotalSize'];
- var identifier = cleanIdentifier(fields['resumableIdentifier']);
- var filename = fields['resumableFilename'];
-
- var original_filename = fields['resumableIdentifier'];
-
- if(!files[$.fileParameterName] || !files[$.fileParameterName].size) {
- callback('invalid_resumable_request', null, null, null);
- return;
- }
- var validation = validateRequest(chunkNumber, chunkSize, totalSize, identifier, files[$.fileParameterName].size);
- if(validation=='valid') {
- var chunkFilename = getChunkFilename(chunkNumber, identifier);
-
- // Save the chunk (TODO: OVERWRITE)
- fs.rename(files[$.fileParameterName].path, chunkFilename, function(){
-
- // Do we have all the chunks?
- var currentTestChunk = 1;
- var numberOfChunks = Math.max(Math.floor(totalSize/(chunkSize*1.0)), 1);
- var testChunkExists = function(){
- fs.exists(getChunkFilename(currentTestChunk, identifier), function(exists){
- if(exists){
- currentTestChunk++;
- if(currentTestChunk>numberOfChunks) {
- callback('done', filename, original_filename, identifier);
- } else {
- // Recursion
- testChunkExists();
- }
- } else {
- callback('partly_done', filename, original_filename, identifier);
- }
- });
- }
- testChunkExists();
- });
- } else {
- callback(validation, filename, original_filename, identifier);
- }
- }
-
-
- // Pipe chunks directly in to an existsing WritableStream
- // r.write(identifier, response);
- // r.write(identifier, response, {end:false});
- //
- // var stream = fs.createWriteStream(filename);
- // r.write(identifier, stream);
- // stream.on('data', function(data){...});
- // stream.on('end', function(){...});
- $.write = function(identifier, writableStream, options) {
- options = options || {};
- options.end = (typeof options['end'] == 'undefined' ? true : options['end']);
-
- // Iterate over each chunk
- var pipeChunk = function(number) {
-
- var chunkFilename = getChunkFilename(number, identifier);
-
- fs.exists(chunkFilename, function(exists) {
-
- if (exists) {
- // If the chunk with the current number exists,
- // then create a ReadStream from the file
- // and pipe it to the specified writableStream.
- var sourceStream = fs.createReadStream(chunkFilename);
- sourceStream.pipe(writableStream, {
- end: false
- });
- sourceStream.on('end', function() {
- // When the chunk is fully streamed,
- // jump to the next one
- pipeChunk(number + 1);
- });
- } else {
- // When all the chunks have been piped, end the stream
- if (options.end) writableStream.end();
- if (options.onDone) options.onDone();
- }
- });
- }
- pipeChunk(1);
- }
-
-
- $.clean = function(identifier, options) {
- options = options || {};
-
- // Iterate over each chunk
- var pipeChunkRm = function(number) {
-
- var chunkFilename = getChunkFilename(number, identifier);
-
- //console.log('removing pipeChunkRm ', number, 'chunkFilename', chunkFilename);
- fs.exists(chunkFilename, function(exists) {
- if (exists) {
-
- console.log('exist removing ', chunkFilename);
- fs.unlink(chunkFilename, function(err) {
- if (err && options.onError) options.onError(err);
- });
-
- pipeChunkRm(number + 1);
-
- } else {
-
- if (options.onDone) options.onDone();
-
- }
- });
- }
- pipeChunkRm(1);
- }
-
- return $;
-}
+var fs = require('fs'), path = require('path'), util = require('util'), Stream = require('stream').Stream;
+
+
+
+module.exports = resumable = function(temporaryFolder){
+ var $ = this;
+ $.temporaryFolder = temporaryFolder;
+ $.maxFileSize = null;
+ $.fileParameterName = 'file';
+
+ try {
+ fs.mkdirSync($.temporaryFolder);
+ }catch(e){}
+
+
+ var cleanIdentifier = function(identifier){
+ return identifier.replace(/^0-9A-Za-z_-/img, '');
+ }
+
+ var getChunkFilename = function(chunkNumber, identifier){
+ // Clean up the identifier
+ identifier = cleanIdentifier(identifier);
+ // What would the file name be?
+ return path.join($.temporaryFolder, './resumable-'+identifier+'.'+chunkNumber);
+ }
+
+ var validateRequest = function(chunkNumber, chunkSize, totalSize, identifier, filename, fileSize){
+ // Clean up the identifier
+ identifier = cleanIdentifier(identifier);
+
+ // Check if the request is sane
+ if (chunkNumber==0 || chunkSize==0 || totalSize==0 || identifier.length==0 || filename.length==0) {
+ return 'non_resumable_request';
+ }
+ var numberOfChunks = Math.max(Math.floor(totalSize/(chunkSize*1.0)), 1);
+ if (chunkNumber>numberOfChunks) {
+ return 'invalid_resumable_request1';
+ }
+
+ // Is the file too big?
+ if($.maxFileSize && totalSize>$.maxFileSize) {
+ return 'invalid_resumable_request2';
+ }
+
+ if(typeof(fileSize)!='undefined') {
+ if(chunkNumber1 && chunkNumber==numberOfChunks && fileSize!=((totalSize%chunkSize)+chunkSize)) {
+ // The chunks in the POST is the last one, and the fil is not the correct size
+ return 'invalid_resumable_request4';
+ }
+ if(numberOfChunks==1 && fileSize!=totalSize) {
+ // The file is only a single chunk, and the data size does not fit
+ return 'invalid_resumable_request5';
+ }
+ }
+
+ return 'valid';
+ }
+
+ //'found', filename, original_filename, identifier
+ //'not_found', null, null, null
+ $.get = function(req, callback){
+ var chunkNumber = req.param('resumableChunkNumber', 0);
+ var chunkSize = req.param('resumableChunkSize', 0);
+ var totalSize = req.param('resumableTotalSize', 0);
+ var identifier = req.param('resumableIdentifier', "");
+ var filename = req.param('resumableFilename', "");
+
+ if(validateRequest(chunkNumber, chunkSize, totalSize, identifier, filename)=='valid') {
+ var chunkFilename = getChunkFilename(chunkNumber, identifier);
+ fs.exists(chunkFilename, function(exists){
+ if(exists){
+ callback('found', chunkFilename, filename, identifier);
+ } else {
+ callback('not_found', chunkFilename, filename, identifier);
+ }
+ });
+ } else {
+ callback('not_found2', chunkFilename, filename, identifier);
+ }
+ }
+
+ //'partly_done', filename, original_filename, identifier
+ //'done', filename, original_filename, identifier
+ //'invalid_resumable_request', null, null, null
+ //'non_resumable_request', null, null, null
+ $.post = function(req, callback){
+
+ var fields = req.body;
+ var files = req.files;
+
+ var chunkNumber = fields['resumableChunkNumber'];
+ var chunkSize = fields['resumableChunkSize'];
+ var totalSize = fields['resumableTotalSize'];
+ var identifier = cleanIdentifier(fields['resumableIdentifier']);
+ var filename = fields['resumableFilename'];
+
+ var original_filename = fields['resumableIdentifier'];
+
+ if(!files[$.fileParameterName] || !files[$.fileParameterName].size) {
+ callback('invalid_resumable_request', null, null, null);
+ return;
+ }
+ var validation = validateRequest(chunkNumber, chunkSize, totalSize, identifier, files[$.fileParameterName].size);
+ if(validation=='valid') {
+ var chunkFilename = getChunkFilename(chunkNumber, identifier);
+
+ // Save the chunk (TODO: OVERWRITE)
+ fs.rename(files[$.fileParameterName].path, chunkFilename, function(){
+
+ // Do we have all the chunks?
+ var currentTestChunk = 1;
+ var numberOfChunks = Math.max(Math.floor(totalSize/(chunkSize*1.0)), 1);
+ var testChunkExists = function(){
+ fs.exists(getChunkFilename(currentTestChunk, identifier), function(exists){
+ if(exists){
+ currentTestChunk++;
+ if(currentTestChunk>numberOfChunks) {
+ callback('done', filename, original_filename, identifier);
+ } else {
+ // Recursion
+ testChunkExists();
+ }
+ } else {
+ callback('partly_done', filename, original_filename, identifier);
+ }
+ });
+ }
+ testChunkExists();
+ });
+ } else {
+ callback(validation, filename, original_filename, identifier);
+ }
+ }
+
+
+ // Pipe chunks directly in to an existsing WritableStream
+ // r.write(identifier, response);
+ // r.write(identifier, response, {end:false});
+ //
+ // var stream = fs.createWriteStream(filename);
+ // r.write(identifier, stream);
+ // stream.on('data', function(data){...});
+ // stream.on('end', function(){...});
+ $.write = function(identifier, writableStream, options) {
+ options = options || {};
+ options.end = (typeof options['end'] == 'undefined' ? true : options['end']);
+
+ // Iterate over each chunk
+ var pipeChunk = function(number) {
+
+ var chunkFilename = getChunkFilename(number, identifier);
+
+ fs.exists(chunkFilename, function(exists) {
+
+ if (exists) {
+ // If the chunk with the current number exists,
+ // then create a ReadStream from the file
+ // and pipe it to the specified writableStream.
+ var sourceStream = fs.createReadStream(chunkFilename);
+ sourceStream.pipe(writableStream, {
+ end: false
+ });
+ sourceStream.on('end', function() {
+ // When the chunk is fully streamed,
+ // jump to the next one
+ pipeChunk(number + 1);
+ });
+ } else {
+ // When all the chunks have been piped, end the stream
+ if (options.end) writableStream.end();
+ if (options.onDone) options.onDone();
+ }
+ });
+ }
+ pipeChunk(1);
+ }
+
+
+ $.clean = function(identifier, options) {
+ options = options || {};
+
+ // Iterate over each chunk
+ var pipeChunkRm = function(number) {
+
+ var chunkFilename = getChunkFilename(number, identifier);
+
+ //console.log('removing pipeChunkRm ', number, 'chunkFilename', chunkFilename);
+ fs.exists(chunkFilename, function(exists) {
+ if (exists) {
+
+ console.log('exist removing ', chunkFilename);
+ fs.unlink(chunkFilename, function(err) {
+ if (err && options.onError) options.onError(err);
+ });
+
+ pipeChunkRm(number + 1);
+
+ } else {
+
+ if (options.onDone) options.onDone();
+
+ }
+ });
+ }
+ pipeChunkRm(1);
+ }
+
+ return $;
+}