我正在尝试使用 Terraform 资源创建一个带有 ALB 入口的 AWS EKS 集群。
该文档表明入口将自动创建一个带有关联侦听器和目标组的负载均衡器。
Kubernetes Ingress 创建 ALB 负载均衡器、安全组和规则,但不创建目标组或侦听器。我曾尝试使用网关或应用程序子网,但没有任何区别。我尝试设置安全组,但 ALB 设置并使用了它自己的自我管理的安全组。
我依赖本指南
ALB 的卷曲让我感到
无法连接到 de59ecbf-default-mainingre-8687-1051686593.ap-southeast-1.elb.amazonaws.com 端口 80:连接被拒绝
我分别创建了 IAM 角色和 ACM 证书,因为 AWS 对这些有配额限制。我的 EKS 集群和节点角色是标准的,节点角色附加了最新的策略。
我曾经kubectl单独应用 kubernetes 入口,但结果相同。它创建 ALB 和一个安全组,其中包含端口规则,但没有目标组或侦听器。
当我将集群端点粘贴aws eks describe-cluster --name my-tf-eks-cluster --query "cluster.endpoint"到浏览器中时,我得到以下信息:
{ "kind": "Status", "apiVersion": "v1", "metadata": { }, "status": "Failure", "message": "forbidden: User "system:anonymous" cannot get path "/ "", "reason": "Forbidden", "details": { }, "code": 403 }
此外,入口没有 IP 地址。 …
terraform kubernetes-ingress terraform-provider-aws amazon-eks
WhitelistingTextInputFormatter我正在尝试在Flutter 应用程序中使用,TextFormField但我得到
未定义名称 WhitelistingTextInputFormatter
这是我的代码:
child: TextFormField(
keyboardType: TextInputType.number,
inputFormatters: [WhitelistingTextInputFormatter.digitsOnly],
decoration: InputDecoration(labelText: 'Staff Number', hintText: 'enter staff number'),
),
Run Code Online (Sandbox Code Playgroud) 我使用Screencast 335部署到VPS教程成功设置了rails站点.现在我想在新域上添加另一个rails应用程序,但我对所需的步骤感到困惑.
在上面的设置中,site-available或/etc/nginx/nginx.conf没有变化.唯一的配置是在我的apps配置目录中的unicorn.rb,unicorn_init.sh和nginx.conf中.nginx.conf文件如下所示: -
upstream unicorn {
server unix:/tmp/unicorn.my_app.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# server_name my_app.com.au www.my_app.com.au;
root /var/www/my_app/current/public;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
Run Code Online (Sandbox Code Playgroud)
在我的Capistrano配方中,我有这条线
sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}"
Run Code Online (Sandbox Code Playgroud)
添加第二个域只是在监听和取消注释server_name部分之后删除默认延迟,然后使用不同的上游套接字名称和第二个应用程序的服务器名称重复此配置文件?这样做还是我需要将此文件传输到可用的站点并创建启用站点的符号链接?
我一直在尝试使用 Terraform 在 AWS 上创建一个具有自我管理节点的 EKS 集群,但我无法让我的 Kubernetes Ingress 创建负载均衡器。没有错误,但没有创建负载均衡器,它只是超时。
我确实首先在我的帐户中手动创建了一个负载均衡器,并验证了负载均衡器角色是否存在。AWSElasticLoadBalancingServiceRolePolicy当我的 Terraform 代码运行时访问该策略。
我非常依赖本教程
变量:
aws_region = "ap-southeast-1"
domain = "*.mydomain.com"
cluster_name = "my-tf-eks-cluster"
vpc_id = "vpc-0d7700e26db6b3e21"
app_subnet_ids = "subnet-03c1e8c57110c92e0, subnet-0413e8bf24cb32595, subnet-047dcce0b810f0fbd"
// gateway subnet IDs
Run Code Online (Sandbox Code Playgroud)
地形代码:
terraform {
}
provider "aws" {
region = var.aws_region
version = "~> 2.8"
}
data "aws_acm_certificate" "default" {
domain = var.domain
statuses = ["ISSUED"]
}
resource "kubernetes_service_account" "alb-ingress" {
metadata {
name = "alb-ingress-controller"
namespace = "kube-system"
labels = { …Run Code Online (Sandbox Code Playgroud) amazon-web-services kubernetes terraform kubernetes-ingress amazon-eks
我正在构建rails 4 jQuery移动应用程序,但我发现很多次,而不是所有表单都被提交两次,导致记录的双重插入.无论是开发还是生产.
我试过删除UJS和turbolinks,但没有任何区别.如果我禁用ajax,我的应用程序将不会将jQuery css应用于返回的视图,除非刷新浏览器.
我的javascript文件没有被调用两次,并且没有资产安装在公共/资产中.我没有预先编译任何资产.
我想知道这可能是在手机上使用鼠标而不是触摸屏的问题吗?该应用程序虽然只使用JQM,但也需要在桌面浏览器中使用.
该问题似乎与重复使用相同的Web操作有关,例如,将销售项目添加到帐单或在单独的Web操作中的菜单项之后选择子菜单项.
的application.js
//= require jquery
//= require jquery_ujs
//= require clubapp
//= require jquery.mobile
//= require turbolinks
Run Code Online (Sandbox Code Playgroud)
宝石文件
gem 'rails', '4.0.0.rc2'
gem 'jquery-rails'
gem 'jquery_mobile_rails'
Run Code Online (Sandbox Code Playgroud) 我已经在我的应用程序中设置了自动完成功能,我在测试期间注意到它刚刚刚刚工作时突然失败了.应用程序返回了一个pg错误,声称employee_id值为null.
我意识到浏览器本机自动完成功能提示我输入值,因此js没有将id值插入隐藏字段.
在检查Mozilla文档时,我发现他们建议在表单级别关闭自动填充功能.我正在使用simple_form但无法弄清楚如何做到这一点.
<form name="form1" id="form1" method="post" autocomplete="off"
Run Code Online (Sandbox Code Playgroud) 我有以下 file_picker 代码。当我在 Linux 客户端中运行它时,我得到以下结果。这是一个错误吗?
flutter: fatsquid.jpg
flutter: null
flutter: 497741
flutter: jpg
flutter: /home/mark/Pictures/fatsquid.jpg
Run Code Online (Sandbox Code Playgroud)
我无法从 file.path 映射表单数据,因为我使用的是 flutter web。
FilePickerResult? result;
PlatformFile? file;
selectFile() async {
result = await FilePicker.platform.pickFiles(type: FileType.any);
if (result != null) {
file = result?.files.first;
}
print(file?.name);
print(file?.bytes);
print(file?.size);
print(file?.extension);
print(file?.path);
setState(() {});
}
Run Code Online (Sandbox Code Playgroud)
文件选择器:^5.0.1
编辑:
应用下面的答案,我得到以下结果。
flutter: fatsquid.jpg
flutter: 497741
flutter: 497741
flutter: jpg
flutter: /home/mark/Pictures/fatsquid.jpg
Run Code Online (Sandbox Code Playgroud)
更新的代码:
result =
await FilePicker.platform.pickFiles(type: FileType.any, withData: true);
Run Code Online (Sandbox Code Playgroud) 在Rails 3.2中我有这样的语法:
validates_uniqueness_of :sport_name, :scope => :sports_org_id
Run Code Online (Sandbox Code Playgroud)
这在rails 4中已被弃用,但我无法弄清楚新的语法.我想验证数据字段的存在性和唯一性.
我有一个UICollectionView,它在网格中显示图像但是当我快速滚动时,它会暂时在单元格中显示错误的图像,直到从S3存储器下载图像,然后显示正确的图像.
我之前在SO上看到过与此问题有关的问题和答案,但没有一个解决方案适合我.let items = [[String: Any]]()API调用后填充字典.我需要细胞从废弃的细胞中丢弃图像.现在有一种令人不快的形象"跳舞"效果.
这是我的代码:
var searchResults = [[String: Any]]()
let cellId = "cellId"
override func viewDidLoad() {
super.viewDidLoad()
collectionView = UICollectionView(frame: self.view.frame, collectionViewLayout: layout)
collectionView.delegate = self
collectionView.dataSource = self
collectionView.register(MyCollectionViewCell.self, forCellWithReuseIdentifier: cellId)
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cellId, for: indexPath) as! MyCollectionViewCell
let item = searchResults[indexPath.item]
cell.backgroundColor = .white
cell.itemLabel.text = item["title"] as? String
let imageUrl = item["img_url"] as! String
let url = URL(string: imageUrl) …Run Code Online (Sandbox Code Playgroud) 我无法让 Loki 使用docker-compose. 日志在 Grafana 中可见,但 S3 存储桶保持为空。
s3 存储桶是公开的,我附加了一个 IAM 角色以允许s3:FullAccess.
我将 loki 更新为 v2.0.0 并将时间段更改为 24 小时,但没有任何区别。loki 日志中没有错误。
以下是 docker 日志 (loki) 中的选定行:
msg="Starting Loki" version="(version=master-4e661cd, branch=master, revision=4e661cde)"
caller=server.go:225 http=[::]:3100 grpc=[::]:9095 msg="server listening on addresses"
caller=worker.go:65 msg="no address specified, not starting worker"
msg="cleaning up mapped rules directory" path=/loki/tmprules
msg=initialising module=memberlist-kv
msg=initialising module=store
msg=initialising module=server
msg=initialising module=ring
msg="value is nil" key=collectors/ring index=1
msg=initialising module=ingester
msg="not loading tokens from file, tokens file path is empty"
msg="instance …Run Code Online (Sandbox Code Playgroud) amazon-eks ×2
flutter ×2
terraform ×2
amazon-s3 ×1
boltdb ×1
fluentd ×1
grafana-loki ×1
ios ×1
kubernetes ×1
nginx ×1
simple-form ×1
swift3 ×1
ubuntu ×1
unicorn ×1