A fundamental flaw in software supply chains is assuming you’re working with a vendor or traditional supplier (I have stories already and I haven’t even dug yet) | I am not a supplier
For the past few years, we have seen a lot of discussions around the concept of the Software Supply Chain. These discussions started around the time of LeftPad and escalated with multiple incidents in the past few years. The problem of all the work in this domain is that it forgets a fundamental point.
Show this to your family member that won’t upgrade their devices | Verizon tells 3G customers to upgrade before they lose service
There’s nothing like an abrupt shutdown of a mobile phone to get someone’s attention. | Verizon is the last of the Big 3 wireless carriers in the U.S. to shut down a 3G network and repurpose the spectrum for newer technology.
Java’s BlockingQueue hierarchy is widely used for coordinating work between different producer and consumer threads.
When set up with a maximum capacity (i.e. a bounded queue), no more elements can be added by producers to the queue once it is full, until a consumer has taken at least one element.
For scenarios where new work may arrive more quickly than it can be consumed, this applies means of back-pressure,
ensuring the application doesn’t run out of memory eventually, while enqueuing more and more work items.
A bright green comet will soon make its first and likely only appearance in recorded history — and it may be visible to the naked eye
The comet C/2022 E3 (ZTF) is believed to have traveled billions of miles from the most distant region of the solar system — and this will likely be the only time it's visible from Earth for thousands of years.
Remove self from large chat groups is interesting and doesn’t require a company mandate | Shopify Tells Employees to Just Say No to Meetings
The e-commerce firm is canceling all recurring meetings with more than two people and encouraging staffers to decline invitations and detach from big internal chat groups.
I’m a designer & front-end engineer, co-founder of Iterate, and the creator of the iOS app Input. I write about prototyping, front-end
development, and design.
I recently started using almond milk more. I realized most almonds are produced in California. Switching to a lower environmentally impactful alternative (oat milk) could be much better | Dairy vs. plant-based milk: what are the environmental impacts?
A growing number of people are interested in switching to plant-based alternatives to dairy. But are they better for the environment, and which is best?
Blog: Kubernetes v1.26: Alpha support for cross-namespace storage data sources
Author: Takafumi Takahashi (Hitachi Vantara)
Kubernetes v1.26, released last month, introduced an alpha feature that
lets you specify a data source for a PersistentVolumeClaim, even where the source
data belong to a different namespace.
With the new feature enabled, you specify a namespace in the dataSourceRef field of
a new PersistentVolumeClaim. Once Kubernetes checks that access is OK, the new
PersistentVolume can populate its data from the storage source specified in that other
namespace.
Before Kubernetes v1.26, provided your cluster had the AnyVolumeDataSource feature enabled,
you could already provision new volumes from a data source in the same
namespace.
However, that only worked for the data source in the same namespace,
therefore users couldn't provision a PersistentVolume with a claim
in one namespace from a data source in other namespace.
To solve this problem, Kubernetes v1.26 added a new alpha namespace field
to dataSourceRef field in PersistentVolumeClaim the API.
How it works
Once the csi-provisioner finds that a data source is specified with a dataSourceRef that
has a non-empty namespace name,
it checks all reference grants within the namespace that's specified by the.spec.dataSourceRef.namespace
field of the PersistentVolumeClaim, in order to see if access to the data source is allowed.
If any ReferenceGrant allows access, the csi-provisioner provisions a volume from the data source.
Trying it out
The following things are required to use cross namespace volume provisioning:
Enable the AnyVolumeDataSource and CrossNamespaceVolumeDataSource feature gates for the kube-apiserver and kube-controller-manager
Install a CRD for the specific VolumeSnapShot controller
Install the CSI Provisioner controller and enable the CrossNamespaceVolumeDataSource feature gate
Install the CSI driver
Install a CRD for ReferenceGrants
Putting it all together
To see how this works, you can install the sample and try it out.
This sample do to create PVC in dev namespace from VolumeSnapshot in prod namespace.
That is a simple example. For real world use, you might want to use a more complex approach.
Assumptions for this example
Your Kubernetes cluster was deployed with AnyVolumeDataSource and CrossNamespaceVolumeDataSource feature gates enabled
There are two namespaces, dev and prod
CSI driver is being deployed
There is an existing VolumeSnapshot named new-snapshot-demo in the prod namespace
The ReferenceGrant CRD (from the Gateway API project) is already deployed
Grant ReferenceGrants read permission to the CSI Provisioner
Access to ReferenceGrants is only needed when the CSI driver
has the CrossNamespaceVolumeDataSource controller capability.
For this example, the external-provisioner needs get , list , and watch
permissions for referencegrants (API group gateway.networking.k8s.io ).
- apiGroups : ["gateway.networking.k8s.io" ]
resources : ["referencegrants" ]
verbs : ["get" , "list" , "watch" ]
Enable the CrossNamespaceVolumeDataSource feature gate for the CSI Provisioner
Add --feature-gates=CrossNamespaceVolumeDataSource=true to the csi-provisioner command line.
For example, use this manifest snippet to redefine the container:
- args :
- -v=5
- --csi-address=/csi/csi.sock
- --feature-gates=Topology=true
- --feature-gates=CrossNamespaceVolumeDataSource=true
image : csi-provisioner:latest
imagePullPolicy : IfNotPresent
name : csi-provisioner
Create a ReferenceGrant
Here's a manifest for an example ReferenceGrant.
apiVersion : gateway.networking.k8s.io/v1beta1
kind : ReferenceGrant
metadata :
name : allow-prod-pvc
namespace : prod
spec :
from :
- group : ""
kind : PersistentVolumeClaim
namespace : dev
to :
- group : snapshot.storage.k8s.io
kind : VolumeSnapshot
name : new-snapshot-demo
Create a PersistentVolumeClaim by using cross namespace data source
Kubernetes creates a PersistentVolumeClaim on dev and the CSI driver populates
the PersistentVolume used on dev from snapshots on prod.
apiVersion : v1
kind : PersistentVolumeClaim
metadata :
name : example-pvc
namespace : dev
spec :
storageClassName : example
accessModes :
- ReadWriteOnce
resources :
requests :
storage : 1Gi
dataSourceRef :
apiGroup : snapshot.storage.k8s.io
kind : VolumeSnapshot
name : new-snapshot-demo
namespace : prod
volumeMode : Filesystem
How can I learn more?
The enhancement proposal,
Provision volumes from cross-namespace snapshots , includes lots of detail about the history and technical implementation of this feature.
Please get involved by joining the Kubernetes Storage Special Interest Group (SIG)
to help us enhance this feature.
There are a lot of good ideas already and we'd be thrilled to have more!
Acknowledgments
It takes a wonderful group to make wonderful software.
Special thanks to the following people for the insightful reviews,
thorough consideration and valuable contribution to the CrossNamespaceVolumeDataSouce feature:
Michelle Au (msau42)
Xing Yang (xing-yang)
Masaki Kimura (mkimuram)
Tim Hockin (thockin)
Ben Swartzlander (bswartz)
Rob Scott (robscott)
John Griffith (j-griffith)
Michael Henriksen (mhenriks)
Mustafa Elbehery (Elbehery)
It’s been a joy to work with y'all on this.
Changelog SECURITY Remove ReverseProxy authentication from the API (#22219) (#22251) Support Go Vulnerability Management (#21139) Forbid HTML string tooltips (#20935) BREAKING Rework mailer se...
Golang is evil on shitty networks – Somewhere Within Boredom
This adventure starts with git-lfs. It was a normal day and I added a 500 MB binary asset to my server templates. When I went to push it, I found it interesting that git-lfs was uploading at 50KB p…
The news has been proclaimed
loudly and often: the SHA-1 hash algorithm is terminally broken and should
not be used in any situation where security matters. Among other things,
this news gave some impetus to the longstanding
effort to support a more robust hash algorithm in the Git source-code
management system. As time has passed, though, that work seems to have
slowed to a stop, leaving some users wondering when, if ever, Git will
support a hash algorithm other than SHA-1.