vermacodes / one-click-aks Goto Github PK
View Code? Open in Web Editor NEWOne click AKS Deployment & Then Destroy.
One click AKS Deployment & Then Destroy.
╷
│ Error: creating Kubernetes Cluster (Subscription: "da846304-0089-48e0-bfa7-65f68a3eb74f"
│ Resource Group Name: "default-vmej-rg"
│ Kubernetes Cluster Name: "default-vmej-aks"): managedclusters.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="AddonInvalid" Message="Application Gateway Ingress Controller addon is not supported with Azure CNI Overlay" Target="networkProfile.networkPluginMode"
│
│ with azurerm_kubernetes_cluster.this[0],
│ on kubernetes_main.tf line 34, in resource "azurerm_kubernetes_cluster" "this":
│ 34: resource "azurerm_kubernetes_cluster" "this" {
│
╵
[2023-11-03T22:03:46+0000]: ERROR - Terraform Apply Failed
Right now, we are still using legacy add/delete workspace APIs.
Plan is to move all this as a single API operation from UI to be handled by server itself. That will give better control over rollbacks.
Workspace Names are inherited by resources. It then impacts the naming requirements of the resources. For example, you can add a workspace with name My_Loved_Workspace. But, when creating a log analytics workspace in that workspace, LAW will be named My_Loved_Workspace-law.
This will fail because workspace names cant have underscore ( _ )
This is also a potential issue with resources like keyvault where length of the name matters too.
Potential Fix would be to enforce workspace naming restrictions.
Right now user can go to settings and update his preferred region. This is the region where they will be deploying stuff primarily. We can pre-populate this field with all the available regions by getting data from this AZ CLI command.
az account list-locations
The lab builder has a Terraform bar with some actions, we must correct the typo error for Download and Extension.
Current: Downlaod
Change to: Download
Current: Extention
Change to: Extension
Sometimes WebSocket connection is broken, make sure user is displayed the appropriate message and steps to reconnect. (repro steps needed)
There are many ways to achieve this.
Clicking on 'Plan' (or any other action button) is not giving appropriate user feedback instantly causing confusion. As the buttons are disabled only after server action status changes, User can send multiple operations causing issue.
Ensure that the buttons are disable immediately. (optimistic update) and user is given feedback.
Assignments are not showing to the 'user' if you have 'mentor' or 'admin' role it show up.
Quite frequently, some initial things are not working.
Recommend user to check that in setup steps and manually implement if not done automatically.
something like this on server side would be needed.
package main
import (
"fmt"
"net/http"
"github.com/gin-gonic/gin"
"github.com/googollee/go-socket.io"
)
func main() {
// Start a HTTP server using gin
r := gin.Default()
r.GET("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
go func() {
if err := r.Run(":8080"); err != nil {
fmt.Println(err)
}
}()
// Start a socket.io server
server, err := socketio.NewServer(nil)
if err != nil {
fmt.Println(err)
}
server.OnConnect("/", func(s socketio.Conn) error {
s.SetContext("")
fmt.Println("connected:", s.ID())
return nil
})
server.OnEvent("/", "notice", func(s socketio.Conn, msg string) {
fmt.Println("notice:", msg)
s.Emit("reply", "have "+msg)
})
server.OnEvent("/chat", "msg", func(s socketio.Conn, msg string) string {
s.SetContext(msg)
return "recv " + msg
})
server.OnEvent("/", "bye", func(s socketio.Conn) string {
last := s.Context().(string)
s.Emit("bye", last)
s.Close()
return last
})
server.OnError("/", func(s socketio.Conn, e error) {
fmt.Println("meet error:", e)
})
server.OnDisconnect("/", func(s socketio.Conn, reason string) {
fmt.Println("closed", reason)
})
go func() {
http.Handle("/socket.io/", server)
if err := http.ListenAndServe(":8000", nil); err != nil {
fmt.Println(err)
}
}()
// Wait indefinitely
select {}
}
I've created a TypeScript type called TfvarAddonsType
, and I want to use default values for this type at multiple places throughout my code. Here's how I'm going to do it:
Defining Default Values:
First, I'll define default values for the TfvarAddonsType
. I'll create a constant object with these default values:
const defaultTfvarAddons: TfvarAddonsType = {
appGateway: false,
microsoftDefender: false,
virtualNode: false,
httpApplicationRouting: false,
};
Using Default Values:
I can now use the defaultTfvarAddons
object as a starting point wherever I need to create an instance of TfvarAddonsType
with default values. For example:
const someComponentConfig: TfvarAddonsType = { ...defaultTfvarAddons };
// If needed, I can also modify specific properties
someComponentConfig.appGateway = true;
Reusing Default Values:
To maintain consistency and make it easy to update defaults in the future, I'll reuse the defaultTfvarAddons
object throughout my code whenever I need to initialize an object of type TfvarAddonsType
with default values.
Here's the complete example:
const defaultTfvarAddons: TfvarAddonsType = {
appGateway: false,
microsoftDefender: false,
virtualNode: false,
httpApplicationRouting: false,
};
// Example usage
const someComponentConfig: TfvarAddonsType = { ...defaultTfvarAddons };
// I can modify specific properties as needed
someComponentConfig.appGateway = true;
// Reusing default values in other parts of my code
const anotherComponentConfig: TfvarAddonsType = { ...defaultTfvarAddons };
This approach allows me to maintain and apply default values consistently throughout my code.
az provider register -n Microsoft.RedHatOpenShift --wait
Show how long ago a lab was updated and attach a freshness scale along with that.
If you know terraform, you know that it often crashes. And when it does, the lock on state file is often not removed. It's too much work to go to your storage account and break the lock. Add a button on UI to do that which just does that.
May be add another API in storage account service which does exactly that.
To be able to provide feature to add multiple virutal network, we need to fix the vnet and subnets relationship. I propose that subnets should be part of a specific vnet. so instead of
"virtualNetworks": [
{
"addressSpace": [
"10.1.0.0/16"
]
}
],
"subnets": [
{
"addressPrefixes": [
"10.1.1.0/24"
],
"name": "AzureFirewallSubnet"
},
{
"addressPrefixes": [
"10.1.2.0/24"
],
"name": "JumpServerSubnet"
},
{
"addressPrefixes": [
"10.1.3.0/24"
],
"name": "KubernetesSubnet"
},
{
"addressPrefixes": [
"10.1.4.0/24"
],
"name": "AppGatewaySubnet"
},
{
"addressPrefixes": [
"10.1.5.0/24"
],
"name": "AROMasterSubnet"
},
{
"addressPrefixes": [
"10.1.6.0/24"
],
"name": "AROWorkerSubnet"
},
{
"addressPrefixes": [
"10.1.7.0/24"
],
"name": "KubernetesVirtualNodeSubnet"
}
],
it should be
"virtualNetworks": [
{
"addressSpace": [
"10.1.0.0/16"
],
"subnets": [
{
"addressPrefixes": [
"10.1.1.0/24"
],
"name": "AzureFirewallSubnet"
},
{
"addressPrefixes": [
"10.1.2.0/24"
],
"name": "JumpServerSubnet"
},
{
"addressPrefixes": [
"10.1.3.0/24"
],
"name": "KubernetesSubnet"
},
{
"addressPrefixes": [
"10.1.4.0/24"
],
"name": "AppGatewaySubnet"
},
{
"addressPrefixes": [
"10.1.5.0/24"
],
"name": "AROMasterSubnet"
},
{
"addressPrefixes": [
"10.1.6.0/24"
],
"name": "AROWorkerSubnet"
},
{
"addressPrefixes": [
"10.1.7.0/24"
],
"name": "KubernetesVirtualNodeSubnet"
}
],
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.