Skip to main content

7 posts tagged with "Biweekly-Newsletter"

View All Tags

· 4 min read

KCL is a constraint-based record and functional language hosted by Cloud Native Computing Foundation(CNCF) that enhances the writing of complex configurations, including those for cloud-native scenarios. With its advanced programming language technology and practices, KCL is dedicated to promoting better modularity, scalability, and stability for configurations. It enables simpler logic writing and offers ease of automation APIs and integration with homegrown systems.

This section will update the KCL language community's latest developments every two weeks, including features, website updates, and the latest community news, helping everyone better understand the KCL community!

KCL Website: https://kcl-lang.io

Overview

Thank you to all contributors for their outstanding work over the past two weeks (10.12 - 10.25 2023). Here is an overview of the key content:

🔧 Language and Toolchain Updates

  • KCL IDE Updates - Supports for symbol find-references and rename; Optimized the formatting output for import statements and union types; Fixed the bug where file changes caused the language server to crash.
  • KCL Package Management Tool KPM Updates - kpm is integrating with ArtifactHub, enabling KCL packages publishing to ArtifactHub.
  • KCL Language Updates - Optimized error messages for mismatched parameter types in methods, providing clearer indications of the mismatch.
  • Unified Interface of KCL Command-Line - Redesigned the command-line interface and workflow for KCL tools to achieve a unified experience.

Special Thanks

The following are listed in no particular order:

IDE Extension Updates

In the upcoming release, the KCL IDE extension will support find/go-to references navigation, symbol renaming, and some optimizations for formatting import statements and union types. Additionally, virtual file system-related bugs causing language service crashes have been fixed.

Go-to references:

Rename symbols:

Formatting improvements for import statements and union types: optimized behavior for newlines between reference statements and other code blocks (formatted as a single newline) and spacing between union types (formatted with | as separators):

KCL Package Manager Updates

In the upcoming release, KPM will support integration with ArtifactHub. You can now submit a PR to the kcl-lang Registry repository to publish your KCL packages on ArtifactHub. The pre-uploaded KCL Kubernetes package can be seen on the ArtifactHub staging page. The functionality will be released in version v0.6.1:

KCL Language Updates

The compilation command of KCL continues to improve error message output, aiming to provide clear and understandable guidance to help developers quickly identify and fix errors while writing correct code. Recently, error messages related to method parameter type mismatches have been optimized, clearly indicating parameter type mismatches:

Additionally, a fix addressed the issue of lazy evaluation in property assignments, deferring the computation and constraint validation of property assignments until after configuration merging to avoid unnecessary compilation errors.

Unified Interface of KCL Command-Line

We are redesigning the command-line interface of KCL tools to achieve a unified user workflow, seamless integration with related tools and multi-language APIs, and command-line tool extensibility. Welcome to join the discussion if anyone are insterested: https://github.com/kcl-lang/kcl/issues/756.

Community Updates

With the inclusion in CNCF Sandbox, we are glad to announce that the CNCF KCL Slack channel is now available for KCL-related discussions. Feel free to join:

  1. Join the CNCF workspace by providing your email address: https://communityinviter.com/apps/cloud-native/cncf
  2. Join the CNCF KCL channel: https://cloud-native.slack.com/archives/C05TC96NWN8

Resources

❤️ Thanks to all KCL users and community members for their valuable feedback and suggestions in the community.

For more resources, please refer to

· 4 min read

KCL is an open-source, constraint-based record and functional language that enhances the writing of complex configurations, including those for cloud-native scenarios. With its advanced programming language technology and practices, KCL is dedicated to promoting better modularity, scalability, and stability for configurations. It enables simpler logic writing and offers ease of automation APIs and integration with homegrown systems.

This section will update the KCL language community's latest developments every two weeks, including features, website updates, and the latest community news, helping everyone better understand the KCL community!

KCL Website: https://kcl-lang.io

Overview

Thank you to all contributors for their outstanding work over the past two weeks (09.07 - 10.11 2023). Here is an overview of the key content:

🔧 Language and Toolchain Updates

  • KCL v0.6.0 Release on 9/15 - Updates to the language, toolchain, and community integration. Detailed information could be found here.
  • KCL IDE Updates - Supports for hover tooltips on standard library and built-in functions, and quick fixes for KCL code errors. And a plugin compatible with Intellij IDEA 2023.2 is released.
  • KCL Package Management Tool KPM Updates - kpm run now could compile KCL files and embeded with the import tool.
  • KCL Documentation Tool Updates - The docstring Examples section is added to the output documentation.
  • KCL Language Updates - Optimized error message output and added suggestions for fixing some errors.

📰 Official Website and Use Case Updates

Special Thanks

The following are listed in no particular order:

IDE Extension Updates

In the recent v0.6.0 release, the KCL IDE plugin has enhanced on hover tooltips for the standard library and builtin functions, along with support for quick fixes for KCL code errors. Additionally, end-to-end tests for the language server and integration tests for the konfig repository have been added to ensure the stability and iteration of the IDE plugin. In the upcoming release, a new kcl-language-server version subcommand has been added to display version information. Please refer to https://kcl-lang.io/docs/user_docs/getting-started/install/#2-install-kcl-ide-extension for instructions on how to upgrade and install the KCL IDE extension in various IDE platforms.

IntelliJ Plugin

Besides, the IntelliJ plugin is now compatible with version 2023.2+ and can be downloaded from the following link: https://github.com/kcl-lang/intellij-kcl/releases

KCL Package Manager Updates

The kpm run command now supports compiling KCL files and has integrated an import tool. Additionally, the --quiet option has been added to suppress output logs.

KCL Language Updates

In the upcoming release, the KCL compilation command has optimized error message output and added repair suggestions on some cases:

KCL Models Updates

In the past few weeks, we have provided more usage examples for configuring and validating containers, services, and Pod Security Policy (PSP).

  • readonly-root-fs
  • allowed-image-repos
  • deny-all
  • deny-endpoint-edit-default-role
  • disallow-ingress-wildcard
  • disallow-svc-lb
  • disallow-svc-node-port
  • disallowed-image-repos
  • horizontal-pod-auto-scaler
  • psp-allow-privilege-escalation
  • psp-app-armor
  • psp-capabilities
  • psp-flexvolume-drivers
  • required-image-digests
  • required-probes
  • validate-auto-mount-service-account-token
  • validate-container-limits
  • validate-container-requests
  • validate-deprecated-api
  • k8s_manifests_containers

You can refer to the corresponding examples to incorporate the above configurations and validations: https://github.com/kcl-lang/krm-kcl/tree/main/examples. Now, let's explain using the Kubectl KCL plugin and the disallow-svc-lb model. The purpose of disallow-svc-lb is to validate Service resources and disallow the use of LoadBalancer as the Service type. Write the following YAML file (manifests.yaml):

apiVersion: krm.kcl.dev/v1alpha1
kind: KCLRun
metadata:
name: disallow-svc-lb
annotations:
krm.kcl.dev/version: 0.0.1
krm.kcl.dev/type: validation
documentation: >-
A validation that prevents the creation of Service resources of type `LoadBalancer`
spec:
source: oci://ghcr.io/kcl-lang/disallow-svc-lb
---
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
selector:
app.kubernetes.io/name: MyApp
ports:
- name: http
protocol: TCP
port: 80
type: LoadBalancer # The service type is incorrectly set to LoadBalancer.

Using the Kubectl KCL tool for resource validation on the client-side, we will get the following result:

kubectl kcl apply -f manifests.yaml

The output is

A validation that prevents the creation of Service resources of type `LoadBalancer`, for Service: my-service

Resources

❤️ Thanks to all KCL users and community members for their valuable feedback and suggestions in the community.

For more resources, please refer to