-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dcf47a
commit 908c02c
Showing
35 changed files
with
207 additions
and
1,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,52 @@ | ||
<template> | ||
<Console v-if="hasKubearmor" :url="consoleUrl" /> | ||
<Install v-else /> | ||
</template> | ||
|
||
<script> | ||
import { WORKLOAD_TYPES } from "@shell/config/types"; | ||
import Install from "./components/Install.vue"; | ||
import Console from "./components/Console.vue"; | ||
export default { | ||
name: "Dashboard", | ||
layout: "single", | ||
async beforeMount() { | ||
this.operatorPresence = await this.$store.dispatch(`cluster/findMatching`, { | ||
type: WORKLOAD_TYPES.DEPLOYMENT, | ||
selector: "kubearmor-app=kubearmor-operator", | ||
},{ root: true }); | ||
this.consoleUrl = "https://kubearmor.io/"; | ||
// type='networking.k8s.io.networkpolicies' | ||
const type= 'security.kubearmor.com.kubearmorpolicy' | ||
if ( this.$store.getters['cluster/canList'](type) ) { | ||
const res1 = await this.$store.dispatch('cluster/findAll', { type }); | ||
} | ||
else{ | ||
console.log("cannot list") | ||
} | ||
async beforeMount() { | ||
try { | ||
// Check for the KubeArmor operator by name and namespace | ||
const operatorDeployment = await this.$store.dispatch("cluster/find", { | ||
type: WORKLOAD_TYPES.DEPLOYMENT, | ||
id: "kubearmor/kubearmor-operator" | ||
}); | ||
// If found, set operatorPresence to true | ||
this.operatorPresence = !!operatorDeployment; | ||
this.consoleUrl = "https://kubearmor.io/"; | ||
} catch (error) { | ||
// If not found, operatorPresence remains false | ||
this.operatorPresence = false; | ||
console.error("KubeArmor operator not found:", error); | ||
} | ||
}, | ||
components: { | ||
Install, | ||
Console, | ||
}, | ||
data() { | ||
return { | ||
consoleUrl: "", | ||
operatorPresence: null, | ||
operatorPresence: false | ||
}; | ||
}, | ||
computed: { | ||
hasKubearmor() { | ||
return this.operatorPresence; | ||
}, | ||
async checkPolicies(){ | ||
var type='networking.k8s.io.networkpolicies' | ||
console.log(type) | ||
if ( this.$store.getters['cluster/canList'](type) ) { | ||
const res1 = await this.$store.dispatch('cluster/findAll', { type }); | ||
console.log(res1) | ||
} | ||
else{ | ||
console.log("cannot list") | ||
} | ||
} | ||
}, | ||
} | ||
}; | ||
</script> | ||
<template> | ||
|
||
<Console v-if="hasKubearmor" :url="consoleUrl" /> | ||
<Install v-else /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
pkg/kubearmor/chart/kubearmor/admission/artifacthubpackages.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<script> | ||
export default { | ||
props: { url: String }, | ||
components: {}, | ||
data() { | ||
return { computedUrl: `https://${ this.url }/ui` }; | ||
}, | ||
}; | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h2>Overview</h2> | ||
<p>Powered by: <a href="https://clastix.io/" target="_blank">Clastix</a></p> | ||
<a class="card" :href="computedUrl" target="_blank"> | ||
<svg | ||
class="open-link" | ||
width="1.5rem" | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
stroke-width="1.5" | ||
stroke="currentColor" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" | ||
/> | ||
</svg> | ||
|
||
<svg | ||
id="E" | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="60px" | ||
viewBox="0 0 800 800" | ||
> | ||
<path | ||
color="currentColor" | ||
d="m400,56.72c-192.15,0-348.5,154.01-348.5,343.26s156.35,343.3,348.5,343.3,348.5-154.01,348.5-343.3S592.15,56.72,400,56.72ZM117.24,267.04c50.56-103.58,158.3-175.27,282.76-175.27s232.2,71.69,282.76,175.27c1.3,2.7-2.31,5.01-4.16,2.7-58.85-74.81-161.62-124.36-278.6-124.36s-219.75,49.55-278.6,124.36c-1.85,2.31-5.46,0-4.16-2.7Zm523.66,20.6c-5.2,5.71-16.79,3.63-25.89-4.65-9.1-8.28-12.26-19.63-7.05-25.34,5.2-5.71,16.79-3.63,25.89,4.65s12.26,19.63,7.05,25.34Zm-46.33-45.12c-5.78,11.64-23.35,14.67-39.24,6.77-15.89-7.9-24.08-23.73-18.3-35.37s23.35-14.67,39.24-6.77c15.89,7.9,24.08,23.73,18.3,35.37Zm-92.35,47.6c0,23.77-19.31,43.11-43.11,43.11s-43.11-19.34-43.11-43.11,19.34-43.11,43.11-43.11,43.11,19.34,43.11,43.11Zm-118.21,0c0,23.77-19.34,43.11-43.11,43.11s-43.14-19.34-43.14-43.11,19.34-43.11,43.14-43.11,43.11,19.34,43.11,43.11Zm217.8,345.57c-54.59,45.22-125.01,72.53-201.8,72.53s-147.21-27.31-201.8-72.53c-2.34-1.98.26-5.66,2.89-4.03,55.37,34.04,124.26,54.23,198.91,54.23s143.54-20.19,198.91-54.23c2.63-1.63,5.23,2.05,2.89,4.03Zm26.95-173.84c.1.03,10.27,3.87,21.62,13.26-4.45-.52-9.53-.94-14.01-.81l-10.01.29,8.03,6.01c.23.16,21.46,16.13,34.92,27.93-15.77-3.12-46.91-8.71-71.75-10.05l-9.2-.46,6.57,6.47c.19.2,19.96,19.9,30.11,42.07-6.4-3.48-15.18-8-21.82-10.34l-7.9-2.76,3.54,7.58c.06.13,5.59,11.9,9.92,21.62-8.75-4.23-22.82-11.02-30.5-14.24l-13.43-5.66,9.36,11.15s15.61,18.5,26.46,31.44c-20.55-7.15-65.77-24.29-82.03-41.68l-17.52-18.73,11.83,22.76c.13.23,11.77,22.53,22.21,39.57-11.18-8.36-26.33-20.29-34.5-29.29l-12.61-13.92,6.76,17.56c.03.13,4.45,11.57,9.56,22.99-21-20.22-62.65-62.23-101.6-112.69l-2.76-3.58-2.76,3.58c-38.95,50.46-80.6,92.46-101.6,112.69,5.1-11.41,9.53-22.86,9.56-22.99l6.76-17.56-12.62,13.92c-8.16,9.01-23.31,20.94-34.5,29.29,10.44-17.04,22.08-39.34,22.21-39.6l11.83-22.73-17.52,18.73c-16.26,17.39-61.48,34.53-82.03,41.68,10.89-12.94,26.47-31.44,26.47-31.44l9.36-11.15-13.43,5.66c-7.51,3.19-20.97,9.62-30.5,14.24,4.32-9.72,9.85-21.49,9.92-21.62l3.54-7.58-7.9,2.76c-6.63,2.34-15.41,6.86-21.82,10.34,10.14-22.17,29.88-41.88,30.11-42.07l6.57-6.47-9.23.46c-24.81,1.33-55.95,6.93-71.72,10.05,13.46-11.8,34.69-27.77,34.92-27.93l8.03-6.01-10.01-.29c-4.45-.13-9.56.29-14.01.81,11.35-9.4,21.52-13.23,21.62-13.26l12.16-4.49-12.75-2.24c-13.79-2.44-40.54-1.5-55.34-.91,17.82-13.56,47.92-28.68,48.22-28.81l6.27-3.15-6.27-3.12c-9.49-4.78-27.86-9.88-41.68-13.36,11.96-.98,23.57-1.11,23.7-1.11l12.39-.13-10.63-6.4c-14.99-8.97-30.79-15.22-41.71-18.95,31.67-4.06,67.24-1.85,67.63-1.82l17.62,1.14-15.87-7.8c-6.01-2.96-12.39-5.62-18.99-8,23.25-3.28,47.6-3.35,47.86-3.35h15.51l-13.98-6.66c-12.48-5.95-35.63-13.53-51.14-18.37,23.93-1.53,45.71-1.95,45.97-1.95l8.81-.16-6.5-5.95c-1.95-1.76-4.39-3.61-7.32-5.56,124.85,12.35,202.26,55.76,203.07,56.21l1.72.98,1.72-.98c.81-.45,78.22-43.86,203.07-56.21-2.93,1.95-5.36,3.8-7.32,5.56l-6.5,5.95,8.81.16c.23,0,22.04.42,45.97,1.95-15.51,4.84-38.66,12.42-51.14,18.37l-13.98,6.66h15.51c.26,0,24.61.07,47.89,3.35-5.2,1.85-11.96,4.52-19.02,8l-15.87,7.8,17.62-1.14c.39-.03,35.93-2.24,67.63,1.82-10.92,3.74-26.72,9.98-41.71,18.95l-10.63,6.4,12.39.13c.13,0,11.74.13,23.7,1.11-13.82,3.48-32.19,8.62-41.68,13.36l-6.27,3.12,6.27,3.15c.29.13,30.4,15.25,48.15,29-14.73-.78-41.49-1.72-55.27.72l-12.74,2.24,12.16,4.49Z" | ||
/> | ||
</svg> | ||
<div> | ||
<h3>Kamaji Console</h3> | ||
<p> | ||
Deploys and operates Kubernetes Control Plane at scale with a fraction | ||
of the operational burden | ||
</p> | ||
</div> | ||
</a> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.card { | ||
background-color: white; | ||
color: black !important; | ||
position: relative; | ||
color: inherit; | ||
text-decoration: none; | ||
margin-top: 10px; | ||
border: 1px solid #eee; | ||
border-radius: 1rem; | ||
padding: 1rem; | ||
border-left: 1rem solid lightblue; | ||
display: grid; | ||
grid-template-columns: auto 1fr; | ||
gap: 10px; | ||
max-width: 30rem; | ||
&:hover { | ||
background-color: lightblue; | ||
} | ||
h3 { | ||
color: black; | ||
} | ||
.open-link { | ||
position: absolute; | ||
top: 1rem; | ||
right: 1rem; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.